/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: February 21, 1992 9:45:18 pm PST */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: BasicTimeImpl, module: BasicTimeImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [1774341153,1689753261] BasicTimeImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef struct {word f0, f1, f2, f3;} W4;
typedef word (*fPt)();
typedef struct {word f0, f1;} W2;
typedef W2 *W2Pt;
typedef struct {word f0, f1, f2;} W3;
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {W8 f; W3 r;} W11;
typedef W11 *W11Pt;
typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7;
typedef W3 *W3Pt;
#define SOURCE(p, l) /* source p, l */
static float fc9 = 1.0e-6;
#define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i )
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
#define MAX(cast, x, y)  ( ( cast x) > ( cast y) ? (x) : (y) )
#define IOP2(op, x, y)  ( (word) ((x) op (y)) )
#define IABS(i) ( ((int)(word)(i) > 0) ? (i) : (word)(-(int)(word)(i)) )
#define INEG(x)  ( (word) ( - ((int) (word) (x)) ) )
static void NoName←Q1464();
static void BasicTimeImpl←P0();
static word GetClockPulses←P60();
static word PulsesToMicroseconds←P120();
static word PulsesToSeconds←P180();
static word MicrosecondsToPulses←P240();
static word Now←P300();
static void ExtendedNow←P360();
static word Period←P420();
static word Update←P480();
static word ToPupTime←P540();
static word ToNSTime←P600();
static word FromPupTime←P660();
static word FromNSTime←P720();
static void UnpackZ←P780();
static void Unpack←P840();
static word Pack←P900();
static word CheckDateGE←P960();
static void UnpackPeriod←P1020();
static word PackPeriod←P1080();
static word GetTPFromHost←P1140();
static void SetZoneAndDST←P1200();
static word NoName←Q1524();
static void GetZoneAndDST←P1260();
static word NoName←Q1584();
static void NoName←Q1644();
static void NoName←Q1704();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\151\302\114\041\300\144\267\226\255\100\164\000\000"};
static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\273\264\166\314\300\142\321\237\137\100\150\000\000"};
static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\212\174\364\337\300\361\376\000\156\100\150\000\000"};
static struct {unsigned f; char r[20];} string4 = {1048596, "\211\004\003\107\115\124\300\212\174\364\337\300\361\376\000\156\000\000\000"};
static struct {unsigned f; char r[4];} string5 = {65540, "\242\000\000"};
static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\230\171\104\016\300\260\376\371\017\100\150\000\000"};
static struct {
   word f0[12]; word f12; word f13; word f14[4]; 
   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; word f32; word f33; 
   word f34; word f35; word f36; word f37; 
   word f38; word f39; word f40; word f41; 
   word f42; word f43; word f44; word f45; 
   word f46; word f47; word f48; word f49; 
   word f50; word f51; word f52; word f53; 
   word f54; word f55; word f56; word f57; 
   word f58; word f59; word f60; word f61[2]; 
   word f63; word f64; word f65; word f66; 
   word f67; word f68; word f69; word f70; 
   word f71; word f72; word f73; word f74; 
   word f75[2]; 
   } globalframe = {
   {0}, 43260, 2147483645, {0}, 
   (word) GetZoneAndDST←P1260, 0, (word) SetZoneAndDST←P1200, 0, 
   (word) GetTPFromHost←P1140, 0, (word) PackPeriod←P1080, 0, 
   (word) UnpackPeriod←P1020, 0, (word) CheckDateGE←P960, 0, 
   (word) Pack←P900, 0, (word) Unpack←P840, 0, 
   (word) UnpackZ←P780, 0, (word) FromNSTime←P720, 0, 
   (word) FromPupTime←P660, 0, (word) ToNSTime←P600, 0, 
   (word) ToPupTime←P540, 0, (word) Update←P480, 0, 
   (word) Period←P420, 0, (word) ExtendedNow←P360, 0, 
   (word) Now←P300, 0, (word) MicrosecondsToPulses←P240, 0, 
   (word) PulsesToSeconds←P180, 0, (word) PulsesToMicroseconds←P120, 0, 
   (word) GetClockPulses←P60, 0, (word) BasicTimeImpl←P0, {0}, 
   31, 60, 91, 121, 
   152, 182, 213, 244, 
   274, 305, 335, 366, 
   {0}
   };

static void NoName←Q1464()
   {
   register ptr gf←c0137 =  (ptr) &globalframe;
   word var←c10416;
   (void) XR←DeclareGlobalFrame((word) "BasicTimeImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string1)), (word) (( (bPt) gf←c0137)+240)
      /* var←c9744 */ );
   var←c10416 = (word) XR←ImportInterface((word) "HostTime", (word) XR←GetTypeIndexS((word) (&string2)), 8);
   (* (( (ptr) gf←c0137)+75)/* var←c9904 */  ) = var←c10416;
   (void) XR←ImportProcS(var←c10416, 201328384);
   (void) XR←ImportProcS(var←c10416, 135266305);
   (void) XR←ImportProcS(var←c10416, 268435968);
   (void) XR←ImportProcS(var←c10416, 68158209);
   var←c10416 = (word) XR←ExportInterface((word) "BasicTime", (word) XR←GetTypeIndexS((word) (&string3)), 24);
   (* (( (ptr) gf←c0137)+76)/* var←c10448 */  ) = var←c10416;
   (void) XR←ExportVar(var←c10416, 0, (word) (( (bPt) gf←c0137)+60));
   (void) XR←ExportVar(var←c10416, 1, (word) (( (bPt) gf←c0137)+64));
   (void) XR←ExportVar(var←c10416, 2, (word) (( (bPt) gf←c0137)+68));
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+232)/* var←c9712 */ , 67109632);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+224)/* var←c9680 */ , 67372033);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+216)/* var←c9648 */ , 67372289);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+208)/* var←c9616 */ , 67372545);
   (void) XR←ExportType((word) "GMT", (word) XR←GetTypeIndexS((word) (&string4)), (word) XR←GetTypeIndexS((word) (&string5))
      );
   (void) XR←ExportVar(var←c10416, 8, (word) (( (bPt) gf←c0137)+48)/* earliestGMT←v2944 */ );
   (void) XR←ExportVar(var←c10416, 9, (word) (( (bPt) gf←c0137)+52)/* latestGMT←v2972 */ );
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+200)/* var←c9584 */ , 67111424);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+192)/* var←c9552 */ , 134220544);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+184)/* var←c9520 */ , 67636226);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+176)/* var←c9488 */ , 67636482);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+168)/* var←c9456 */ , 67374593);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+160)/* var←c9424 */ , 67374849);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+152)/* var←c9392 */ , 67375105);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+144)/* var←c9360 */ , 67375361);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+128)/* var←c9296 */ , 738464257);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+136)/* var←c9328 */ , 739250946);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+120)/* var←c9264 */ , 69997569);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+104)/* var←c9200 */ , 268702977);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+96)/* var←c9168 */ , 68163073);
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+72)/* var←c9072 */ , 201332480);
   var←c10416 = (word) XR←ExportInterface((word) "BasicTimeBackdoor", (word) XR←GetTypeIndexS((word) (&string6)), 1);
   (* (( (ptr) gf←c0137)+76)/* var←c10448 */  ) = var←c10416;
   (void) XR←ExportProcS(var←c10416, (word) (( (bPt) gf←c0137)+80)/* var←c9104 */ , 786433);
   }

static void BasicTimeImpl←P0(formal←c036, formal←c035)
   word formal←c036;
   word formal←c035;
   {
   /* BasicTimeImpl: */ 
SOURCE(300, 7559)
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   /* moved to installation proc */ 
   }

static word GetClockPulses←P60()
   {
   register ptr gf←c10480 =  (ptr) &globalframe;
   word var←c3688;
   /* GetClockPulses: */ 
SOURCE(568, 111)
SOURCE(623, 56)
   {
      W4 var←c039;
      W4 var←c9872;
      {
         word pd7;
         pd7 = (* (( (ptr) (* (( (ptr) gf←c10480)+75)/* var←c9904 */  ))+6) );
         (void) ( *( (fPt) ((*  (ptr) pd7 ))))((word) (&var←c039), pd7);
         };
      var←c9872 = var←c039;
      {
         word pd8;
         pd8 = (* (( (ptr) (* (( (ptr) gf←c10480)+75)/* var←c9904 */  ))+7) );
         return((word) ( *( (fPt) ((*  (ptr) pd8 ))))(var←c9872, pd8));
         };
      };
   }

static word PulsesToMicroseconds←P120(p←v3748)
   word p←v3748;
   {
   word var←c3792;
   /* PulsesToMicroseconds: */ 
SOURCE(683, 75)
SOURCE(748, 10)
   return(p←v3748);
   }

static word PulsesToSeconds←P180(p←v3852)
   word p←v3852;
   {
   word s←v3896;
   /* PulsesToSeconds: */ 
SOURCE(764, 80)
SOURCE(827, 17)
   {
      word x10;
      float tf11;
      return((
         tf11 = (float)(unsigned)p←v3852 * (
            x10 = (*  (ptr) &fc9 ),  *(float*)&x10
            ),  *(word*)&tf11
         ));
      };
   }

static word MicrosecondsToPulses←P240(m←v3956)
   word m←v3956;
   {
   word var←c4000;
   /* MicrosecondsToPulses: */ 
SOURCE(850, 75)
SOURCE(915, 10)
   return(m←v3956);
   }

static word Now←P300()
   {
   register ptr gf←c10512 =  (ptr) &globalframe;
   word gmt←v4060;
   W4 var←c9936;
   W2 var←c049;
   /* Now: */ 
SOURCE(1616, 110)
SOURCE(1664, 62)
   {
      word pd12;
      pd12 = (* (( (ptr) (* (( (ptr) gf←c10512)+75)/* var←c9904 */  ))+6) );
      (void) ( *( (fPt) ((*  (ptr) pd12 ))))((word) (&var←c9936), pd12);
      };
   {
      word pd13;
      pd13 = (* (( (ptr) (* (( (ptr) gf←c10512)+75)/* var←c9904 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd13 ))))((word) &var←c049, var←c9936, pd13);
      };
   gmt←v4060 = var←c049.f0;
SOURCE(1616, 110)
   return(gmt←v4060);
   }

static void ExtendedNow←P360(formal←c054)
   word formal←c054;
   {
   register ptr gf←c10544 =  (ptr) &globalframe;
   W2 egmt←v4120;
   /* ExtendedNow: */ 
SOURCE(1732, 124)
SOURCE(1797, 59)
   {
      W4 var←c9968;
      {
         word pd14;
         pd14 = (* (( (ptr) (* (( (ptr) gf←c10544)+75)/* var←c9904 */  ))+6) );
         (void) ( *( (fPt) ((*  (ptr) pd14 ))))((word) (&var←c9968), pd14);
         };
      {
         W2 var←c053;
         {
            word pd15;
            pd15 = (* (( (ptr) (* (( (ptr) gf←c10544)+75)/* var←c9904 */  ))+4) );
            (void) ( *( (fPt) ((*  (ptr) pd15 ))))((word) &var←c053, var←c9968, pd15);
            };
         egmt←v4120 = var←c053;
         };
      };
   /* removed tail goto */ 
   (*  (W2Pt) formal←c054 ) = egmt←v4120;
   return;
   }

static word Period←P420(from←v4180, to←v4208)
   word from←v4180;
   word to←v4208;
   {
   word var←c4252;
   /* Period: */ 
SOURCE(1862, 70)
SOURCE(1916, 16)
   return((to←v4208 - from←v4180));
   }

static word Update←P480(base←v4312, period←v4340)
   word base←v4312;
   word period←v4340;
   {
   register ptr gf←c10576 =  (ptr) &globalframe;
   word var←c4384;
   /* Update: */ 
SOURCE(1938, 158)
SOURCE(2001, 95)
   if ( ( ( (int)period←v4340 >=  (int)(0 - base←v4312)) ? ( (int)period←v4340 <=  (int)(2147483645 - base←v4312)) : 0 ) ) {
SOURCE(2054, 26)
      return((base←v4312 + period←v4340));
      }
   else {
SOURCE(2080, 16)
      (void) XR←RaiseError((word) (( (bPt) gf←c10576)+60), 0);
      };
   }

static word ToPupTime←P540(g←v4444)
   word g←v4444;
   {
   word var←c4488;
   /* ToPupTime: */ 
SOURCE(2102, 88)
SOURCE(2155, 35)
   return((SGNCK(g←v4444) + 2114294400));
   }

static word ToNSTime←P600(g←v4548)
   word g←v4548;
   {
   word var←c4592;
   /* ToNSTime: */ 
SOURCE(2196, 87)
SOURCE(2248, 35)
   return((SGNCK(g←v4548) + 2114294400));
   }

static word FromPupTime←P660(p←v4652)
   word p←v4652;
   {
   register ptr gf←c10608 =  (ptr) &globalframe;
   word var←c4696;
   /* FromPupTime: */ 
SOURCE(2289, 130)
SOURCE(2344, 75)
   if ((p←v4652 >= 2114294400)) {
SOURCE(2366, 37)
      return((p←v4652 - 2114294400));
      }
   else {
SOURCE(2403, 16)
      (void) XR←RaiseError((word) (( (bPt) gf←c10608)+60), 0);
      };
   }

static word FromNSTime←P720(p←v4756)
   word p←v4756;
   {
   register ptr gf←c10640 =  (ptr) &globalframe;
   word var←c4800;
   /* FromNSTime: */ 
SOURCE(2425, 129)
SOURCE(2479, 75)
   if ((p←v4756 >= 2114294400)) {
SOURCE(2501, 37)
      return((p←v4756 - 2114294400));
      }
   else {
SOURCE(2538, 16)
      (void) XR←RaiseError((word) (( (bPt) gf←c10640)+60), 0);
      };
   }

static void UnpackZ←P780(formal←c085, time←v4876, tp←v4904)
   word formal←c085;
   word time←v4876;
   W3 tp←v4904;
   {
   register ptr gf←c10672 =  (ptr) &globalframe;
   W11 unpacked←v4948;
   word secs←v5732;
   word mins←v5760;
   word hrs←v5788;
   /* UnpackZ: */ 
SOURCE(2736, 1852)
SOURCE(2736, 1852)
   (*  (ptr) &unpacked←v4948 ) = 0;
   (* (( (ptr) &unpacked←v4948)+1) ) = 12;
   (* (( (ptr) &unpacked←v4948)+2) ) = 0;
   (* (( (ptr) &unpacked←v4948)+3) ) = 24;
   (* (( (ptr) &unpacked←v4948)+4) ) = 60;
   (* (( (ptr) &unpacked←v4948)+5) ) = 60;
   (* (( (ptr) &unpacked←v4948)+6) ) = 1441;
   (* (( (ptr) &unpacked←v4948)+7) ) = 2;
   (* (( (ptr) &unpacked←v4948)+8) ) = 7;
   (* (( (ptr) &unpacked←v4948)+9) ) = 2147483647;
   (* (( (ptr) &unpacked←v4948)+10) ) = 366;
SOURCE(2843, 65)
   if (( (int)time←v4876 <  (int)(* (( (ptr) gf←c10672)+12)/* earliestGMT←v2944 */  )) || ( (int)time←v4876 >  (int)(* (( (ptr) gf←c10672)+13)
   /* latestGMT←v2972 */  ))) {
SOURCE(2890, 18)
      (void) XR←RaiseError((word) (( (bPt) gf←c10672)+60), 0);
      };
SOURCE(2910, 23)
   secs←v5732 = SGNCK(time←v4876);
SOURCE(2935, 69)
   mins←v5760 = ((secs←v5732 / 60) -  ( ( (int)tp←v4904.f0 ==  (int)1441) ? 0 : (tp←v4904.f0 - 720) ) );
SOURCE(3006, 15)
   hrs←v5788 = (mins←v5760 / 60);
SOURCE(3023, 29)
   (* (( (ptr) &unpacked←v4948)+5) ) = (secs←v5732 % 60);
SOURCE(3054, 29)
   (* (( (ptr) &unpacked←v4948)+4) ) = (mins←v5760 % 60);
SOURCE(3085, 66)
   {
      word idx16;
      (* (( (ptr) &unpacked←v4948)+6) ) = (
         idx16 = (word) ( ( ( (int)tp←v4904.f0 ==  (int)1441) ? 0 : (tp←v4904.f0 - 720) )  + 720),
         BCK(idx16, 1442)
         );
      };
SOURCE(3153, 17)
   (* (( (ptr) &unpacked←v4948)+7) ) = 1;
SOURCE(3172, 1416)
   lab←L100004: ;
SOURCE(3172, 1416)
   {
      word daysSinceBase←v5832;
      word fourYears←v5888;
      word daysBeyondFourYears←v5916;
      word pseudoDaysBeyond←v5944;
      word oddYears←v5972;
      word dayOfYear←v6000;
SOURCE(3208, 34)
      daysSinceBase←v5832 = (hrs←v5788 / 24);
SOURCE(3289, 53)
      fourYears←v5888 = (daysSinceBase←v5832 / 1461);
SOURCE(3344, 65)
      daysBeyondFourYears←v5916 = (daysSinceBase←v5832 % 1461);
SOURCE(3411, 138)
      pseudoDaysBeyond←v5944 = (daysBeyondFourYears←v5916 + (((MAX( (unsigned) , 60, daysBeyondFourYears←v5916)) - 60) / 365));
SOURCE(3551, 41)
      {
         word idx17;
         oddYears←v5972 = (
            idx17 = (word) (pseudoDaysBeyond←v5944 / 366),
            BCK(idx17, 4)
            );
         };
SOURCE(3594, 50)
      dayOfYear←v6000 = ((pseudoDaysBeyond←v5944 % 366) + 1);
SOURCE(3676, 52)
      {
         word idx18;
         (*  (ptr) &unpacked←v4948 ) = (
            idx18 = (word) (((fourYears←v5888 << 2) + oddYears←v5972) + 1968),
            BCK(idx18, 2051)
            );
         };
SOURCE(3730, 31)
      (* (( (ptr) &unpacked←v4948)+8) ) = 0;
SOURCE(3763, 153)
      {
         register word noName←c10000 = 0;
         register word noName←c10032;
         noName←c10032 = (daysSinceBase←v5832 % 7);
         if ((noName←c10000 >= noName←c10032)) {
            goto lab←L100005;
            };
         lab←L100008: ;
SOURCE(3799, 41)
         {
            word idx19;
            (* (( (ptr) &unpacked←v4948)+8) ) = (
               idx19 = (word) ((* (( (ptr) &unpacked←v4948)+8) ) + 1),
               BCK(idx19, 8)
               );
            };
SOURCE(3842, 74)
         if (((* (( (ptr) &unpacked←v4948)+8) ) == 7)) {
SOURCE(3881, 35)
            (* (( (ptr) &unpacked←v4948)+8) ) = 0;
            };
         noName←c10000 = (noName←c10000 + 1);
         if ((noName←c10000 < noName←c10032)) {
            goto lab←L100008;
            };
         lab←L100005: ;
         };
SOURCE(3927, 128)
      {
         register word month←v6064 = 0;
         lab←L100012: ;
SOURCE(3987, 68)
         if ((dayOfYear←v6000 <= (* ((( (ptr) gf←c10672)+62)/* var←c9808 */ +BCK((month←v6064 + 1), 13)) ))) {
SOURCE(4033, 22)
            (* (( (ptr) &unpacked←v4948)+1) ) = month←v6064;
SOURCE(4057, 4)
            goto lab←L100010;
            };
         if ((month←v6064 >= 11)) {
            goto lab←L100009;
            };
         month←v6064 = (month←v6064 + 1);
         goto lab←L100012;
         lab←L100009: ;
SOURCE(4083, 13)
         (void) XR←RaiseUnnamedError();
         lab←L100010: ;
         };
SOURCE(4098, 51)
      {
         word idx20;
         (* (( (ptr) &unpacked←v4948)+2) ) = (
            idx20 = (word) (dayOfYear←v6000 - (* ((( (ptr) gf←c10672)+62)/* var←c9808 */ +(* (( (ptr) &unpacked←v4948)+1) )) )),
            BCK(idx20, 32)
            );
         };
SOURCE(4151, 26)
      (* (( (ptr) &unpacked←v4948)+3) ) = (hrs←v5788 % 24);
SOURCE(4179, 229)
      {
         word yearStart←v6108;
SOURCE(4181, 104)
         yearStart←v6108 = ((fourYears←v5888 * 1461) +  ( (oddYears←v5972 == 0) ? 0 : (IOP2( * ,  (int)(oddYears←v5972 - 1),  (int)365)
          + 366) ) );
SOURCE(4287, 49)
         (* (( (ptr) &unpacked←v4948)+10) ) = BCK((daysSinceBase←v5832 - yearStart←v6108), 367);
SOURCE(4338, 68)
         (* (( (ptr) &unpacked←v4948)+9) ) = (secs←v5732 - (((yearStart←v6108 * 24) * 60) * 60));
         };
SOURCE(4411, 140)
      if (((((* (( (ptr) &unpacked←v4948)+7) ) == 0) || ( (int)tp←v4904.f0 ==  (int)1441)) || (0 == (word) CheckDateGE←P960(unpacked←v4948, tp←v4904.f1, 2)
      )) || (0 != (word) CheckDateGE←P960(unpacked←v4948, tp←v4904.f2, 1))) {
SOURCE(4551, 4)
         goto lab←L100003;
         };
SOURCE(4557, 11)
      hrs←v5788 = (hrs←v5788 + 1);
SOURCE(4570, 18)
      (* (( (ptr) &unpacked←v4948)+7) ) = 0;
      };
   goto lab←L100004;
   lab←L100003: ;
   /* removed tail goto */ 
   (*  (W11Pt) formal←c085 ) = unpacked←v4948;
   return;
   }

static void Unpack←P840(formal←c092, time←v5008)
   word formal←c092;
   word time←v5008;
   {
   W11 var←c5052;
   /* Unpack: */ 
SOURCE(4603, 94)
SOURCE(4658, 39)
   {
      W11 var←c10128;
      {
         W3 var←c10096;
         (void) GetZoneAndDST←P1260((word) (&var←c10096));
         {
            W11 var←c091;
            (void) UnpackZ←P780((word) &var←c091, time←v5008, var←c10096);
            var←c10128 = var←c091;
            };
         };
      var←c5052 = var←c10128;
      /* removed tail goto */ 
      };
   (*  (W11Pt) formal←c092 ) = var←c5052;
   return;
   }

static word Pack←P900(unpacked←v5112)
   W11 unpacked←v5112;
   {
   register ptr gf←c10704 =  (ptr) &globalframe;
   word time←v5156;
   W3 tp←v6152;
   word yearsSinceBase←v6208;
   word oddYears←v6236;
   word day←v6264;
   word daysSinceBase←v6292;
   word zone←v6320;
   /* Pack: */ 
SOURCE(4703, 1445)
SOURCE(4768, 32)
   (void) GetZoneAndDST←P1260((word) (&tp←v6152));
SOURCE(4847, 112)
   yearsSinceBase←v6208 =  ( ((*  (ptr) &unpacked←v5112 ) < 1968) ? (
      XR←RaiseError((word) (( (bPt) gf←c10704)+60), 0), 0
      ) : ((*  (ptr) &unpacked←v5112 ) - 1968) ) ;
SOURCE(4961, 39)
   oddYears←v6236 = (yearsSinceBase←v6208 & 3);
SOURCE(5002, 263)
   day←v6264 = ((((* ((( (ptr) gf←c10704)+62)/* var←c9808 */ +(* (( (ptr) &unpacked←v5112)+1) )) ) + (* (( (ptr) &unpacked←v5112)+2)
    )) - 1) -  (  ( (oddYears←v6236 != 0) ? ((* (( (ptr) &unpacked←v5112)+1) ) > 1) : 0 )  ? 1 : 0 ) );
SOURCE(5267, 132)
   daysSinceBase←v6292 = (((((yearsSinceBase←v6208 >> 2) * 1461) + (oddYears←v6236 * 365)) + day←v6264) +  ( (oddYears←v6236 != 0) ? 1 : 0 ) );
SOURCE(5401, 160)
   {
      word idx21;
      zone←v6320 = (
         idx21 = (word) ( ( ( (int)(* (( (ptr) &unpacked←v5112)+6) ) !=  (int)1441) ? ((* (( (ptr) &unpacked←v5112)+6) ) - 720) :  ( ( (int)tp←v6152.f0 !=  (int)1441) ? (tp←v6152.f0 - 720) : (
            XR←RaiseError((word) (( (bPt) gf←c10704)+68), 0), 0
            ) )  )  + 780),
         BCK(idx21, 1502)
         );
      };
SOURCE(5563, 432)
   {
      word var←c10160;
      var←c10160 = (* (( (ptr) &unpacked←v5112)+7) );
      switch (var←c10160) {
         case 2: 
SOURCE(5605, 31)
            (* (( (ptr) &unpacked←v5112)+8) ) = 0;
SOURCE(5638, 153)
            {
               register word noName←c10192 = 0;
               register word noName←c10224;
               noName←c10224 = (daysSinceBase←v6292 % 7);
               if ((noName←c10192 >= noName←c10224)) {
                  goto lab←L100014;
                  };
               lab←L100017: ;
SOURCE(5674, 41)
               {
                  word idx22;
                  (* (( (ptr) &unpacked←v5112)+8) ) = (
                     idx22 = (word) ((* (( (ptr) &unpacked←v5112)+8) ) + 1),
                     BCK(idx22, 8)
                     );
                  };
SOURCE(5717, 74)
               if (((* (( (ptr) &unpacked←v5112)+8) ) == 7)) {
SOURCE(5756, 35)
                  (* (( (ptr) &unpacked←v5112)+8) ) = 0;
                  };
               noName←c10192 = (noName←c10192 + 1);
               if ((noName←c10192 < noName←c10224)) {
                  goto lab←L100017;
                  };
               lab←L100014: ;
               };
SOURCE(5802, 64)
            if (( (int)tp←v6152.f0 ==  (int)1441)) {
SOURCE(5836, 30)
               (void) XR←RaiseError((word) (( (bPt) gf←c10704)+68), 0);
               };
SOURCE(5868, 99)
            if ( ( (0 != (word) CheckDateGE←P960(unpacked←v5112, tp←v6152.f1, 2)) ? (0 == (word) CheckDateGE←P960(unpacked←v5112, tp←v6152.f2, 2)
            ) : 0 ) ) {
SOURCE(5951, 16)
               zone←v6320 = BCK((zone←v6320 - 60), 1502);
               };
            break;
         case 0: 
SOURCE(5979, 16)
            zone←v6320 = BCK((zone←v6320 - 60), 1502);
            break;
         case 1: 
            break;
         default: 
SOURCE(6020, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
SOURCE(6027, 121)
   return((IOP2( * ,  (int)(((((daysSinceBase←v6292 * 24) + (* (( (ptr) &unpacked←v5112)+3) )) * 60) + (* (( (ptr) &unpacked←v5112)+4)
       )) + (zone←v6320 - 780)),  (int)60) + (* (( (ptr) &unpacked←v5112)+5) )));
   }

static word CheckDateGE←P960(unpacked←v5216, dstDay←v5244, dstHour←v5272)
   W11 unpacked←v5216;
   word dstDay←v5244;
   word dstHour←v5272;
   {
   register ptr gf←c10736 =  (ptr) &globalframe;
   word var←c5316;
   word day←v6404;
   /* CheckDateGE: */ 
SOURCE(6152, 566)
SOURCE(6237, 57)
   day←v6404 = ((* ((( (ptr) gf←c10736)+62)/* var←c9808 */ +(* (( (ptr) &unpacked←v5216)+1) )) ) + (* (( (ptr) &unpacked←v5216)+2)
    ));
   if ((day←v6404 < (dstDay←v5244 - 6))) {
SOURCE(6331, 14)
      return(0);
      }
   else {
      if ((day←v6404 > dstDay←v5244)) {
SOURCE(6394, 13)
         return(1);
         }
      else {
         if (((* (( (ptr) &unpacked←v5216)+8) ) == 6)) {
SOURCE(6468, 33)
            return(((* (( (ptr) &unpacked←v5216)+3) ) >= dstHour←v5272));
            }
         else {
SOURCE(6535, 68)
            {
               register word noName←c10256 = 0;
               register word noName←c10288;
               noName←c10288 = (* (( (ptr) &unpacked←v5216)+8) );
               if ((noName←c10256 >= noName←c10288)) {
                  goto lab←L100018;
                  };
               lab←L100021: ;
SOURCE(6592, 11)
               day←v6404 = (day←v6404 - 1);
               noName←c10256 = (noName←c10256 + 1);
               if ((noName←c10256 < noName←c10288)) {
                  goto lab←L100021;
                  };
               lab←L100018: ;
               };
SOURCE(6658, 60)
            return((day←v6404 > (dstDay←v5244 - 6)));
            };
         };
      };
   }

static void UnpackPeriod←P1020(formal←c0117, period←v5376)
   word formal←c0117;
   word period←v5376;
   {
   word var←c0164;
   word var←c0165;
   word var←c0166;
   word var←c0167;
   word seconds←v6448;
   word minutes←v6476;
   word hours←v6504;
   /* UnpackPeriod: */ 
SOURCE(6781, 305)
   /* Return var split */ 
SOURCE(6850, 27)
   seconds←v6448 = IABS(period←v5376);
SOURCE(6879, 40)
   minutes←v6476 = (seconds←v6448 / 60);
SOURCE(6921, 36)
   hours←v6504 = (minutes←v6476 / 60);
SOURCE(6959, 127)
   var←c0164 = SGNCK(hours←v6504);
   {
      word idx23;
      var←c0165 = (
         idx23 = (word) (minutes←v6476 - (hours←v6504 * 60)),
         BCK(idx23, 60)
         );
      };
   {
      word idx24;
      var←c0166 = (
         idx24 = (word) (seconds←v6448 - (minutes←v6476 * 60)),
         BCK(idx24, 60)
         );
      };
   var←c0167 = ( (int)period←v5376 <  (int)0);
   /* removed tail goto */ 
   (* (( (ptr) formal←c0117)+3) ) = var←c0167;
   (* (( (ptr) formal←c0117)+2) ) = var←c0166;
   (* (( (ptr) formal←c0117)+1) ) = var←c0165;
   (*  (ptr) formal←c0117 ) = var←c0164;
   return;
   }

static word PackPeriod←P1080(period←v5480)
   W4 period←v5480;
   {
   register ptr gf←c10768 =  (ptr) &globalframe;
   word seconds←v5524;
   word part←v6548;
   /* PackPeriod: */ 
SOURCE(7091, 346)
SOURCE(7167, 59)
   part←v6548 = (period←v5480.f2 + (period←v5480.f1 * 60));
SOURCE(7228, 39)
   if (( (int)period←v5480.f0 <  (int)0)) {
SOURCE(7251, 16)
      (void) XR←RaiseError((word) (( (bPt) gf←c10768)+60), 0);
      };
SOURCE(7269, 80)
   {
      word idx25;
      if (((
         idx25 = (word) period←v5480.f0,
         SGNCK(idx25)
         ) > IOP2( / ,  (int)(2147483647 - part←v6548),  (int)3600))) {
SOURCE(7333, 16)
         (void) XR←RaiseError((word) (( (bPt) gf←c10768)+60), 0);
         };
      };
SOURCE(7351, 42)
   seconds←v5524 = (part←v6548 + IOP2( * ,  (int)period←v5480.f0,  (int)3600));
SOURCE(7395, 42)
   if ((0 != period←v5480.f3)) {
SOURCE(7419, 18)
      seconds←v5524 = INEG(seconds←v5524);
      };
SOURCE(7091, 346)
   return(seconds←v5524);
   }

static word GetTPFromHost←P1140()
   {
   register ptr gf←c10800 =  (ptr) &globalframe;
   word ok←v5584;
   /* GetTPFromHost: */ 
SOURCE(7443, 114)
SOURCE(7443, 114)
   ok←v5584 = 1;
SOURCE(7502, 34)
   {
      word pd26;
      pd26 = (* (( (ptr) (* (( (ptr) gf←c10800)+75)/* var←c9904 */  ))+11) );
      (void) ( *( (fPt) ((*  (ptr) pd26 ))))((word) ((( (bPt) gf←c10800)+32)/* knownTP←v2524 */ ), pd26);
      };
SOURCE(7538, 19)
   (* (( (ptr) gf←c10800)+11)/* knownTPValid←v2552 */  ) = 1;
SOURCE(7443, 114)
   return(ok←v5584);
   }

static void SetZoneAndDST←P1200(formal←c0163)
   W3 formal←c0163;
   {
   W7 var←c10832;
   /* declaration of tp←v5644 skipped */ 
   register ptr gf←c10864 =  (ptr) &globalframe;
   (*  (W3Pt) (( (ptr) &var←c10832)+4)/* tp←v5644 */  ) = formal←c0163;
   /* SetZoneAndDST: */ 
SOURCE(7563, 110)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c10864)+16)/* LOCK←v2496 */ ));
SOURCE(7617, 56)
   {
      word var←c0157;
      var←c0157 = (word) &var←c10832;
       (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q1524) ), ( ((word)  (fPt) NoName←Q1704) ), var←c0157);
      };
SOURCE(7563, 110)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c10864)+16)/* LOCK←v2496 */ ));
   return;
   }

static word NoName←Q1524(formal←c0151)
   word formal←c0151;
   {
   register ptr gf←c0150 =  (ptr) &globalframe;
SOURCE(7640, 12)
   (*  (W3Pt) (( (ptr) gf←c0150)+8)/* knownTP←v2524 */  ) = (*  (W3Pt) (( (ptr) formal←c0151)+4) );
SOURCE(7654, 19)
   (* (( (ptr) gf←c0150)+11)/* knownTPValid←v2552 */  ) = 1;
   return(0);
   }

static void GetZoneAndDST←P1260(formal←c0125)
   word formal←c0125;
   {
   W7 var←c10896;
   register ptr gf←c10928 =  (ptr) &globalframe;
   /* declaration of tp←v5704 skipped */ 
   /* GetZoneAndDST: */ 
SOURCE(7679, 180)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c10928)+16)/* LOCK←v2496 */ ));
SOURCE(7741, 118)
   {
      word var←c01;
      {
         word var←c0158;
         var←c0158 = (word) &var←c10896;
         var←c01 = (word) XR←Enable(( ((word)  (fPt) NoName←Q1584) ), ( ((word)  (fPt) NoName←Q1644) ), var←c0158);
         };
      /* removed trivial cond node */ 
      };
   (void) (XR←MonitorExit((word) (( (bPt) gf←c10928)+16)/* LOCK←v2496 */ ));
   (*  (W3Pt) formal←c0125 ) = (*  (W3Pt) (( (ptr) &var←c10896)+4)/* tp←v5704 */  );
   return;
   }

static word NoName←Q1584(formal←c0154)
   word formal←c0154;
   {
   register ptr gf←c0153 =  (ptr) &globalframe;
SOURCE(7764, 59)
   if ((0 != (* (( (ptr) gf←c0153)+11)/* knownTPValid←v2552 */  )) || (0 != (word) GetTPFromHost←P1140())) {
SOURCE(7807, 16)
      (*  (W3Pt) (( (ptr) formal←c0154)+4) ) = (*  (W3Pt) (( (ptr) gf←c0153)+8)/* knownTP←v2524 */  );
      return(2);
      };
SOURCE(7825, 34)
   (* (( (ptr) formal←c0154)+4) ) = 1441;
   (* (( (ptr) formal←c0154)+5) ) = 366;
   (* (( (ptr) formal←c0154)+6) ) = 366;
   return(2);
   /* c2c skipped dead code */ 
   }

static void NoName←Q1644(formal←c0131, formal←c200004, formal←c200005, formal←c200006, formal←c200007)
   word formal←c0131;
   word formal←c200004;
   word formal←c200005;
   word formal←c200006;
   word formal←c200007;
   {
   register ptr gf←c0155 =  (ptr) &globalframe;
   if ((formal←c200005 == XR←Unwind)) {
      (void) (XR←MonitorExit((word) (( (bPt) gf←c0155)+16)/* LOCK←v2496 */ ));
      };
   (*  (ptr) formal←c0131 ) = 0;
   (* (( (ptr) formal←c0131)+1) ) = 0;
   return;
   }

static void NoName←Q1704(formal←c0136, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c0136;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c0156 =  (ptr) &globalframe;
   if ((formal←c200001 == XR←Unwind)) {
      (void) (XR←MonitorExit((word) (( (bPt) gf←c0156)+16)/* LOCK←v2496 */ ));
      };
   (*  (ptr) formal←c0136 ) = 0;
   (* (( (ptr) formal←c0136)+1) ) = 0;
   return;
   }

/* file: BasicTimeImpl, module: BasicTimeImpl, compiled at: February 21, 1992 9:45:18 pm PST */ 
extern void XR←install←BasicTimeImpl() {
   NoName←Q1464();
   }
extern void XR←run←BasicTimeImpl() { XR←Start(&globalframe); }