/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: February 27, 1992 5:59:20 pm PST */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: TEditDocumentsCacheImpl, module: TEditDocumentsCacheImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [1006287697,2652468246] TEditDocumentsCacheImpl";
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;} W2;
typedef struct {word f0, f1, f2, f3, f4, f5;} W6;
typedef struct {word f0, f1, f2, f3, f4;} W5;
typedef struct {W8 f; W5 r;} W13;
typedef struct {W8 f; W8 r;} W16;
typedef struct {W8 f; W6 r;} W14;
typedef struct {W16 f; W14 r;} W30;
typedef struct {word f0, f1, f2, f3;} W4;
typedef struct {W8 f; W4 r;} W12;
typedef struct {W16 f; W12 r;} W28;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W8 f; W3 r;} W11;
typedef struct {W16 f; W11 r;} W27;
typedef W27 *W27Pt;
typedef W28 *W28Pt;
typedef struct {unsigned u1:5, f:1, u2:2;} * P1x5b;
#define SOURCE(p, l) /* source p, l */
#define MAX(cast, x, y)  ( ( cast x) > ( cast y) ? (x) : (y) )
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
static void NoName←Q1008();
static void TEditDocumentsCacheImpl←P0();
static word GetList←P60();
static word GetListInternal←P120();
static void RecordUnsavedDocument←P180();
static word NoName←Q1068();
static word Size←P576();
static word FindUnsavedDocument←P240();
static word NoName←Q1128();
static void DiscardOldest←P300();
static word SearchList←P360();
static void Update←P420();
static word NoName←Q1188();
static word ViewerOk←P828();
static void Put←P888();
static word action←P948();
static void NoName←Q1248();
static void NoName←Q1308();
static void NoName←Q1368();
static word NoName←Q1428();
static word NoName←Q1488();
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[16];} string3 = {851984, "\257\300\073\372\273\121\300\236\031\164\026\100\200\000\000"};
static struct {unsigned f; char r[4];} string4 = {131074, "\004\003\000"};
static struct {unsigned f; char r[48];} string5 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\073\372\273\121\300\236\031\164\026\100\200\005\004\162\145\163\164\214\216\257\300\073\372\273\121\300\236\031\164\026\100\200\261\000\000\000"};
static struct {unsigned f; char r[4];} string6 = {131076, "\216\251\000"};
static struct {unsigned f; char r[24];} string7 = {1441816, "Unsaved Documents List\000"};
static struct {unsigned f; char r[8];} string8 = {262152, "Text\000\000\000"};
static struct {unsigned f; char r[4];} string9 = {65540, "\012\000\000"};
static struct {unsigned f; char r[12];} string10 = {524300, "ReadOnly\000\000\000"};
static struct {unsigned f; char r[8];} string11 = {262152, "note\000\000\000"};
static struct {unsigned f; char r[192];} string12 = {12517568, "The following files were edited but not saved.  They may still be restored with edits intact simply by loading them.  If you really want to get rid of the edits, load the file and hit Reset.\012"};
static struct {unsigned f; char r[8];} string13 = {262152, "lead\000\000\000"};
static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\073\372\273\121\300\236\031\164\026\100\164\000\000"};
static struct {unsigned f; char r[12];} string15 = {720907, "\006\003 \001$\001@D\004@\177"};
static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\317\042\141\053\300\247\142\073\274\100\150\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\240\236\274\315\300\111\163\325\023\100\150\000\000"};
static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"};
static struct {unsigned f; char r[16];} string19 = {851984, "\257\300\013\141\323\354\300\341\005\243\127\100\150\000\000"};
static struct {unsigned f; char r[16];} string20 = {851984, "\257\300R-\356\251\300YX]$@h\000\000"};
static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\056\236\052\251\300\206\175\213\250\100\150\000\000"};
static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\160\267\337\115\300\374\200\221\327\100\150\000\000"};
static struct {unsigned f; char r[16];} string23 = {851984, "\257\300\354\332\367\333\300\361\203\205\173\100\150\000\000"};
static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\263\250\256\142\300\214\116\106\070\100\150\000\000"};
static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\165\053\345\211\300\333\235\216\021\100\150\000\000"};
static struct {
   word f0[24]; 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[10]; 
   } globalframe = {
   {0}, (word) Update←P420, 0, (word) SearchList←P360, 
   0, (word) DiscardOldest←P300, 0, (word) FindUnsavedDocument←P240, 
   0, (word) RecordUnsavedDocument←P180, 0, (word) GetListInternal←P120, 
   0, (word) GetList←P60, 0, (word) TEditDocumentsCacheImpl←P0, 
   {0}
   };

static void NoName←Q1008()
   {
   register ptr gf←c091 =  (ptr) &globalframe;
   word var←c16072;
   (* (( (ptr) gf←c091)+12) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c091)+14) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4);
   (* (( (ptr) gf←c091)+15) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string4);
   (* (( (ptr) gf←c091)+16) ) = (word) XR←GetTypeIndex((word) &string6, 0, (word) &string2);
   (*  (ptr) (( (bPt) gf←c091)+68) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+12) ), (word) &string7);
   (*  (ptr) (( (bPt) gf←c091)+72) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+16) ), (word) &string8);
   (*  (ptr) (( (bPt) gf←c091)+76) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+12) ), (word) &string9);
   (*  (ptr) (( (bPt) gf←c091)+80) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+16) ), (word) &string10);
   (*  (ptr) (( (bPt) gf←c091)+84) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+16) ), (word) &string11);
   (*  (ptr) (( (bPt) gf←c091)+88) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+12) ), (word) &string12);
   (*  (ptr) (( (bPt) gf←c091)+92) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c091)+16) ), (word) &string13);
   (void) XR←DeclareGlobalFrame((word) "TEditDocumentsCacheImpl", &globalframe, (word) XR←GetTypeIndex((word) &string14, 0, (word) &string15)
      , (word) (( (bPt) gf←c091)+152)/* var←c15304 */ );
   var←c16072 = (word) XR←ImportInterface((word) "Menus", (word) XR←GetTypeIndexS((word) (&string16)), 21);
   (* (( (ptr) gf←c091)+46)/* var←c15880 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 528642);
   var←c16072 = (word) XR←ImportInterface((word) "Process", (word) XR←GetTypeIndexS((word) (&string17)), 22);
   (* (( (ptr) gf←c091)+43)/* var←c15624 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 526081);
   var←c16072 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string18)), 43);
   (* (( (ptr) gf←c091)+40)/* var←c15400 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 68163076);
   (void) XR←ImportProcS(var←c16072, 67373825);
   (void) XR←ImportProcS(var←c16072, 67896323);
   (void) XR←ImportProcS(var←c16072, 67633666);
   var←c16072 = (word) XR←ImportInterface((word) "TEditInput", (word) XR←GetTypeIndexS((word) (&string19)), 44);
   (* (( (ptr) gf←c091)+41)/* var←c15464 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 269825);
   var←c16072 = (word) XR←ImportInterface((word) "TEditProfile", (word) XR←GetTypeIndexS((word) (&string20)), 19);
   (* (( (ptr) gf←c091)+42)/* var←c15560 */  ) = var←c16072;
   var←c16072 = (word) XR←ImportInterface((word) "TiogaAccess", (word) XR←GetTypeIndexS((word) (&string21)), 32);
   (* (( (ptr) gf←c091)+44)/* var←c15784 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 1576194);
   (void) XR←ImportProcS(var←c16072, 67111936);
   var←c16072 = (word) XR←ImportInterface((word) "TiogaAccessViewers", (word) XR←GetTypeIndexS((word) (&string22)), 4);
   (* (( (ptr) gf←c091)+47)/* var←c15912 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 525058);
   var←c16072 = (word) XR←ImportInterface((word) "ViewerOps", (word) XR←GetTypeIndexS((word) (&string23)), 43);
   (* (( (ptr) gf←c091)+45)/* var←c15816 */  ) = var←c16072;
   (void) XR←ImportProcS(var←c16072, 1051652);
   (void) XR←ImportProcS(var←c16072, 1319173);
   (void) XR←ImportProcS(var←c16072, 74973699);
   (void) XR←ImportProcS(var←c16072, 527106);
   var←c16072 = (word) XR←ExportInterface((word) "TEditDocumentsCache", (word) XR←GetTypeIndexS((word) (&string24)), 2);
   (* (( (ptr) gf←c091)+48)/* var←c16104 */  ) = var←c16072;
   (void) XR←ExportProcS(var←c16072, (word) (( (bPt) gf←c091)+96)/* var←c15080 */ , 0);
   (void) XR←ExportProcS(var←c16072, (word) (( (bPt) gf←c091)+144)/* var←c15272 */ , 67109120);
   var←c16072 = (word) XR←ExportInterface((word) "TEditDocumentPrivate", (word) XR←GetTypeIndexS((word) (&string25)), 67);
   (* (( (ptr) gf←c091)+48)/* var←c16104 */  ) = var←c16072;
   (void) XR←ExportProcS(var←c16072, (word) (( (bPt) gf←c091)+128)/* var←c15208 */ , 524290);
   (void) XR←ExportProcS(var←c16072, (word) (( (bPt) gf←c091)+120)/* var←c15176 */ , 67371265);
   }

static void TEditDocumentsCacheImpl←P0(formal←c026, formal←c025)
   word formal←c026;
   word formal←c025;
   {
   /* TEditDocumentsCacheImpl: */ 
   }

static word GetList←P60()
   {
   register ptr gf←c16136 =  (ptr) &globalframe;
   word var←c3528;
   /* GetList: */ 
SOURCE(924, 73)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c16136)+16)/* LOCK←v2944 */ ));
SOURCE(970, 27)
   {
      word var←c15336;
      var←c15336 = (word) GetListInternal←P120();
      (void) (XR←MonitorExit((word) (( (bPt) gf←c16136)+16)/* LOCK←v2944 */ ));
      return(var←c15336);
      };
   }

static word GetListInternal←P120()
   {
   register ptr gf←c16168 =  (ptr) &globalframe;
   word rope←v3588;
   /* GetListInternal: */ 
SOURCE(1001, 182)
SOURCE(1001, 182)
   rope←v3588 = 0;
SOURCE(1057, 126)
   {
      register word l←v3944;
      l←v3944 = (* (( (ptr) gf←c16168)+8)/* list←v3056 */  );
      lab←L100003: ;
      if ((l←v3944 != 0)) {
         }
      else {
         goto lab←L100000;
         };
SOURCE(1122, 61)
      {
         word var←c15368;
         {
            word pd26;
            pd26 = (* (( (ptr) (* (( (ptr) gf←c16168)+40)/* var←c15400 */  ))+6) );
            var←c15368 = (word) ( *( (fPt) ((*  (ptr) pd26 ))))((* (( (ptr) gf←c16168)+19) ), (*  (ptr) (*  (ptr) l←v3944 ) ), pd26);
            };
         {
            word pd27;
            pd27 = (* (( (ptr) (* (( (ptr) gf←c16168)+40)/* var←c15400 */  ))+6) );
            rope←v3588 = (word) ( *( (fPt) ((*  (ptr) pd27 ))))(rope←v3588, var←c15368, pd27);
            };
         };
      l←v3944 = (* (( (ptr) l←v3944)+1) );
      goto lab←L100003;
      lab←L100000: ;
      };
SOURCE(1001, 182)
   return(rope←v3588);
   }

static void RecordUnsavedDocument←P180(formal←c0127, formal←c0128)
   word formal←c0127;
   word formal←c0128;
   {
   W8 var←c16200;
   /* declaration of fileName←v3648 skipped */ 
   /* declaration of root←v3676 skipped */ 
   register ptr gf←c16232 =  (ptr) &globalframe;
   /* declaration of var←c15432 skipped */ 
   var←c16200.f4/* fileName←v3648 */  = formal←c0127;
   var←c16200.f5/* root←v3676 */  = formal←c0128;
   /* RecordUnsavedDocument: */ 
SOURCE(1198, 642)
   {
      word tmpAddr28;
      tmpAddr28 = (word) (( (ptr) &var←c16200)+6)/* var←c15432 */ ;
      (*  (ptr) tmpAddr28 ) = ( ((word)  (fPt) Size←P576) );
      (* (( (ptr) tmpAddr28) + 1) ) = 1;
      };
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c16232)+16)/* LOCK←v2944 */ ));
SOURCE(1280, 560)
   {
      word var←c0116;
      var←c0116 = (word) &var←c16200;
       (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q1068) ), ( ((word)  (fPt) NoName←Q1368) ), var←c0116);
      };
SOURCE(1198, 642)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c16232)+16)/* LOCK←v2944 */ ));
   return;
   }

static word NoName←Q1068(formal←c096)
   word formal←c096;
   {
   register ptr gf←c095 =  (ptr) &globalframe;
SOURCE(1303, 20)
   {
      word info←v4100 = 0;
      word oldRoot←v4128 = 0;
SOURCE(1519, 109)
      oldRoot←v4128 = (word) SearchList←P360((* ((( (ptr) formal←c096)+4)) ));
      if ((oldRoot←v4128 != 0)) {
SOURCE(1600, 28)
         {
            word pd29;
            pd29 = (* (( (ptr) (* (( (ptr) gf←c095)+41)/* var←c15464 */  ))+34) );
            (void) ( *( (fPt) ((*  (ptr) pd29 ))))(oldRoot←v4128, pd29);
            };
         };
SOURCE(1630, 53)
      {
         word var←c15496;
         var←c15496 = XR←NewObject(8, (* (( (ptr) gf←c095)+14) ));
         (*  (ptr) var←c15496 ) = (* (( (ptr) formal←c096)+4) );
         (* (( (ptr) var←c15496)+1) ) = (* (( (ptr) formal←c096)+5) );
         info←v4100 = var←c15496;
         };
SOURCE(1685, 23)
      {
         word var←c15528;
         var←c15528 = XR←NewObject(8, (* (( (ptr) gf←c095)+15) ));
         (*  (ptr) var←c15528 ) = info←v4100;
         (* (( (ptr) var←c15528)+1) ) = (* (( (ptr) gf←c095)+8)/* list←v3056 */  );
         (* (( (ptr) gf←c095)+8)/* list←v3056 */  ) = var←c15528;
         };
SOURCE(1710, 79)
      lab←L100008: ;
      {
         word x30;
         if (( (int)(word) Size←P576((word) ((( (bPt) formal←c096)+24))) >  (int)(x30 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c095)+42)
               /* var←c15560 */  ))+18) ) ),
            MAX((int)(word), x30, 0)))) {
            }
         else {
            goto lab←L100006;
            };
         };
SOURCE(1774, 15)
      (void) DiscardOldest←P300();
      goto lab←L100008;
      lab←L100006: ;
SOURCE(1808, 32)
SOURCE(1810, 30)
      {
         W2 var←c15592;
         {
            W2 var←c041;
            word var←c040;
            var←c040 = XR←ExtensionAlloc(4);
            {
               word tmpAddr31;
               tmpAddr31 = (word) var←c040;
               (*  (ptr) tmpAddr31 ) = ( ((word)  (fPt) NoName←Q1428) );
               (* (( (ptr) tmpAddr31) + 1) ) = 0;
               (* (( (ptr) tmpAddr31) + 2) ) = (word) (( (bPt) gf←c095)+96)/* var←c15080 */ ;
               (* (( (ptr) tmpAddr31) + 3) ) = 0;
               };
            (void) XR←Fork((word) &var←c041, var←c040);
            var←c15592 = var←c041;
            };
         {
            word pd32;
            pd32 = (* (( (ptr) (* (( (ptr) gf←c095)+43)/* var←c15624 */  ))+11) );
            (void) ( *( (fPt) ((*  (ptr) pd32 ))))(var←c15592, pd32);
            };
         };
      };
   return(0);
   }

static word Size←P576(formal←c16296)
   word formal←c16296;
   {
   register ptr gf←c16264 =  (ptr) &globalframe;
   word size←v4204;
   formal←c16296 = (formal←c16296 - 24);
   /* Size: */ 
SOURCE(1303, 20)
SOURCE(1342, 8)
   size←v4204 = 0;
SOURCE(1352, 23)
   if (((* (( (ptr) gf←c16264)+8)/* list←v3056 */  ) == 0)) {
SOURCE(1369, 6)
      return(size←v4204);
      };
SOURCE(1377, 78)
   {
      register word l←v4232;
      l←v4232 = (* (( (ptr) gf←c16264)+8)/* list←v3056 */  );
      lab←L100012: ;
      if ((l←v4232 != 0)) {
         }
      else {
         goto lab←L100009;
         };
SOURCE(1442, 13)
      size←v4204 = (size←v4204 + 1);
      l←v4232 = (* (( (ptr) l←v4232)+1) );
      goto lab←L100012;
      lab←L100009: ;
      };
SOURCE(1303, 20)
   return(size←v4204);
   }

static word FindUnsavedDocument←P240(formal←c0129)
   word formal←c0129;
   {
   W6 var←c16328;
   /* declaration of fileName←v3736 skipped */ 
   register ptr gf←c16360 =  (ptr) &globalframe;
   /* declaration of root←v3780 skipped */ 
   var←c16328.f4/* fileName←v3736 */  = formal←c0129;
   /* FindUnsavedDocument: */ 
SOURCE(1847, 195)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c16360)+16)/* LOCK←v2944 */ ));
SOURCE(1847, 195)
   var←c16328.f5/* root←v3780 */  = 0;
SOURCE(1936, 106)
   {
      word var←c0117;
      var←c0117 = (word) &var←c16328;
       (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q1128) ), ( ((word)  (fPt) NoName←Q1308) ), var←c0117);
      };
SOURCE(1847, 195)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c16360)+16)/* LOCK←v2944 */ ));
   return(var←c16328.f5/* root←v3780 */ );
   }

static word NoName←Q1128(formal←c0101)
   word formal←c0101;
   {
   register ptr gf←c0100 =  (ptr) &globalframe;
SOURCE(1959, 83)
   (* (( (ptr) formal←c0101)+5) ) = (word) SearchList←P360((* ((( (ptr) formal←c0101)+4)) ));
   if (((* (( (ptr) formal←c0101)+5) ) != 0)) {
SOURCE(2011, 31)
SOURCE(2012, 30)
      {
         W2 var←c15656;
         {
            W2 var←c050;
            word var←c049;
            var←c049 = XR←ExtensionAlloc(4);
            {
               word tmpAddr33;
               tmpAddr33 = (word) var←c049;
               (*  (ptr) tmpAddr33 ) = ( ((word)  (fPt) NoName←Q1488) );
               (* (( (ptr) tmpAddr33) + 1) ) = 0;
               (* (( (ptr) tmpAddr33) + 2) ) = (word) (( (bPt) gf←c0100)+96)/* var←c15080 */ ;
               (* (( (ptr) tmpAddr33) + 3) ) = 0;
               };
            (void) XR←Fork((word) &var←c050, var←c049);
            var←c15656 = var←c050;
            };
         {
            word pd34;
            pd34 = (* (( (ptr) (* (( (ptr) gf←c0100)+43)/* var←c15624 */  ))+11) );
            (void) ( *( (fPt) ((*  (ptr) pd34 ))))(var←c15656, pd34);
            };
         };
      };
   return(0);
   }

static void DiscardOldest←P300()
   {
   register ptr gf←c16392 =  (ptr) &globalframe;
   /* DiscardOldest: */ 
SOURCE(2048, 224)
SOURCE(2072, 23)
   if (((* (( (ptr) gf←c16392)+8)/* list←v3056 */  ) == 0)) {
SOURCE(2089, 6)
      return;
      };
SOURCE(2097, 175)
   {
      register word l←v4360;
      l←v4360 = (* (( (ptr) gf←c16392)+8)/* list←v3056 */  );
      lab←L100018: ;
SOURCE(2150, 21)
      if (((* (( (ptr) l←v4360)+1) ) != 0)) {
SOURCE(2171, 4)
         goto lab←L100017;
         };
SOURCE(2215, 49)
      {
         word var←c15688;
         var←c15688 = (word) SearchList←P360((*  (ptr) ((*  (ptr) l←v4360 )) ));
         {
            word pd35;
            pd35 = (* (( (ptr) (* (( (ptr) gf←c16392)+41)/* var←c15464 */  ))+34) );
            (void) ( *( (fPt) ((*  (ptr) pd35 ))))(var←c15688, pd35);
            };
         };
SOURCE(2266, 6)
      return;
      lab←L100017: ;
      l←v4360 = (* (( (ptr) l←v4360)+1) );
      goto lab←L100018;
      };
   }

static word SearchList←P360(fileName←v3856)
   word fileName←v3856;
   {
   register ptr gf←c16424 =  (ptr) &globalframe;
   word root←v3900;
   word prev←v4488 = 0;
   /* SearchList: */ 
SOURCE(2287, 491)
SOURCE(2287, 491)
   root←v3900 = 0;
SOURCE(2413, 29)
   if (((* (( (ptr) gf←c16424)+8)/* list←v3056 */  ) == 0)) {
SOURCE(2430, 12)
      return(0);
      };
SOURCE(2444, 107)
   {
      word pd36;
      pd36 = (* (( (ptr) (* (( (ptr) gf←c16424)+40)/* var←c15400 */  ))+8) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd36 ))))((*  (ptr) (*  (ptr) (* (( (ptr) gf←c16424)+8)/* list←v3056 */  ) ) ), fileName←v3856, 0, pd36)
      )) {
SOURCE(2503, 22)
         root←v3900 = (* (( (ptr) (*  (ptr) (* (( (ptr) gf←c16424)+8)/* list←v3056 */  ) ))+1) );
SOURCE(2527, 16)
         (* (( (ptr) gf←c16424)+8)/* list←v3056 */  ) = (* (( (ptr) (* (( (ptr) gf←c16424)+8)/* list←v3056 */  ))+1) );
SOURCE(2545, 6)
         return(root←v3900);
         };
      };
SOURCE(2556, 11)
   prev←v4488 = (* (( (ptr) gf←c16424)+8)/* list←v3056 */  );
SOURCE(2569, 186)
   {
      register word l←v4616;
      l←v4616 = (* (( (ptr) (* (( (ptr) gf←c16424)+8)/* list←v3056 */  ))+1) );
      lab←L100022: ;
      if ((l←v4616 != 0)) {
         }
      else {
         goto lab←L100019;
         };
SOURCE(2639, 103)
      {
         word pd37;
         pd37 = (* (( (ptr) (* (( (ptr) gf←c16424)+40)/* var←c15400 */  ))+8) );
         if ((0 != (word) ( *( (fPt) ((*  (ptr) pd37 ))))((*  (ptr) (*  (ptr) l←v4616 ) ), fileName←v3856, 0, pd37))) {
SOURCE(2695, 19)
            root←v3900 = (* (( (ptr) (*  (ptr) l←v4616 ))+1) );
SOURCE(2716, 18)
            (* (( (ptr) prev←v4488)+1) ) = (* (( (ptr) l←v4616)+1) );
SOURCE(2736, 6)
            return(root←v3900);
            };
         };
SOURCE(2747, 8)
      prev←v4488 = l←v4616;
      l←v4616 = (* (( (ptr) l←v4616)+1) );
      goto lab←L100022;
      lab←L100019: ;
      };
SOURCE(2766, 12)
   return(0);
   }

static void Update←P420()
   {
   W13 var←c16456;
   register ptr gf←c16488 =  (ptr) &globalframe;
   /* declaration of var←c15720 skipped */ 
   /* declaration of var←c15752 skipped */ 
   /* Update: */ 
SOURCE(2784, 1705)
   {
      word tmpAddr38;
      tmpAddr38 = (word) (( (ptr) &var←c16456)+4)/* var←c15720 */ ;
      (*  (ptr) tmpAddr38 ) = ( ((word)  (fPt) Put←P888) );
      (* (( (ptr) tmpAddr38) + 1) ) = 1;
      };
   {
      word tmpAddr39;
      tmpAddr39 = (word) (( (ptr) &var←c16456)+6)/* var←c15752 */ ;
      (*  (ptr) tmpAddr39 ) = ( ((word)  (fPt) ViewerOk←P828) );
      (* (( (ptr) tmpAddr39) + 1) ) = 1;
      };
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c16488)+16)/* LOCK←v2944 */ ));
SOURCE(2814, 1675)
   {
      /* declaration of writer←v4828 skipped */ 
      /* declaration of looks←v4856 skipped */ 
      /* declaration of format←v4884 skipped */ 
      /* declaration of comment←v4912 skipped */ 
      /* declaration of deltaLevel←v4940 skipped */ 
      word var←c01;
      {
         word var←c0118;
         var←c0118 = (word) &var←c16456;
         var←c01 = (word) XR←Enable(( ((word)  (fPt) NoName←Q1188) ), ( ((word)  (fPt) NoName←Q1248) ), var←c0118);
         };
      if ((var←c01 == 1)) {
         goto lab←L04;
         };
      };
SOURCE(2784, 1705)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c16488)+16)/* LOCK←v2944 */ ));
   return;
   lab←L04: ;
   return;
   }

static word NoName←Q1188(formal←c0106)
   word formal←c0106;
   {
   register ptr gf←c0105 =  (ptr) &globalframe;
SOURCE(2837, 30)
   {
      word rope←v4744;
SOURCE(2837, 30)
      rope←v4744 = (word) GetListInternal←P120();
SOURCE(3104, 49)
      {
         word pd40;
         pd40 = (* (( (ptr) (* (( (ptr) gf←c0105)+44)/* var←c15784 */  ))+16) );
         (* (( (ptr) formal←c0106)+8) ) = (word) ( *( (fPt) ((*  (ptr) pd40 ))))(pd40);
         };
SOURCE(3155, 37)
      (* (( (ptr) formal←c0106)+9) ) = 0;
SOURCE(3194, 18)
      (* (( (ptr) formal←c0106)+10) ) = 0;
SOURCE(3214, 21)
      (* (( (ptr) formal←c0106)+11) ) = 0;
SOURCE(3237, 19)
      (* (( (ptr) formal←c0106)+12) ) = 1;
SOURCE(3549, 56)
      if ((0 == (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c0105)+42)/* var←c15560 */  ))+12) ) ))) {
SOURCE(3599, 6)
         (void) (XR←MonitorExit((word) (( (bPt) gf←c0105)+16)/* LOCK←v2944 */ ));
         return(1);
         };
SOURCE(3607, 90)
      {
         word pd41;
         pd41 = (* (( (ptr) (* (( (ptr) gf←c0105)+40)/* var←c15400 */  ))+15) );
         if (( (int)(word) ( *( (fPt) ((*  (ptr) pd41 ))))(rope←v4744, pd41) ==  (int)0)) {
SOURCE(3637, 50)
            if ((0 != (word) ViewerOk←P828((word) ((( (bPt) formal←c0106)+24))))) {
SOURCE(3656, 31)
               {
                  word pd42;
                  pd42 = (* (( (ptr) (* (( (ptr) gf←c0105)+45)/* var←c15816 */  ))+15) );
                  (void) ( *( (fPt) ((*  (ptr) pd42 ))))((* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ), 1, pd42);
                  };
               };
SOURCE(3689, 8)
            (void) (XR←MonitorExit((word) (( (bPt) gf←c0105)+16)/* LOCK←v2944 */ ));
            return(1);
            };
         };
SOURCE(3700, 382)
      if ((0 == (word) ViewerOk←P828((word) ((( (bPt) formal←c0106)+24))))) {
SOURCE(3725, 100)
         {
            W28 var←c15848;
            W30 var←c068;
            (*  (ptr) (word) &var←c068 ) = (* (( (ptr) gf←c0105)+18) );
            XR←FillWords(&(* (W27Pt) (&var←c15848)), 27, 0);
            (* (( (ptr) &var←c15848)+13) ) = (* (( (ptr) gf←c0105)+17) );
            (* (( (ptr) &var←c15848)+17) ) =  (word) -1;
            (* (( (ptr) &var←c15848)+18) ) = 1;
            (* (( (ptr) &var←c15848)+19) ) = 1493172224;
            (* (( (ptr) &var←c15848)+27) ) = 27;
            (*  (W28Pt) (( (ptr) (word) &var←c068) + 1) ) = var←c15848;
            (* (( (ptr) (word) &var←c068) + 29) ) = 0;
            {
               word pd43;
               pd43 = (* (( (ptr) (* (( (ptr) gf←c0105)+45)/* var←c15816 */  ))+6) );
               (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ) = (word) ( *( (fPt) ((*  (ptr) pd43 ))))((word) (&var←c068), pd43);
               };
            };
SOURCE(3827, 56)
         {
            word pd44;
            pd44 = (* (( (ptr) (*  (ptr) (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ) ))+6) );
            (void) ( *( (fPt) ((*  (ptr) pd44 ))))((* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ), 0, 1, (* (( (ptr) gf←c0105)+20) ), pd44)
            ;
            };
SOURCE(3885, 41)
         {
            word pd45;
            pd45 = (* (( (ptr) (* (( (ptr) gf←c0105)+46)/* var←c15880 */  ))+21) );
            (void) ( *( (fPt) ((*  (ptr) pd45 ))))((* (( (ptr) (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ))+16) ), 0, pd45);
            };
SOURCE(3959, 85)
         {
            word pd46;
            pd46 = (* (( (ptr) (* (( (ptr) gf←c0105)+45)/* var←c15816 */  ))+37) );
            (void) ( *( (fPt) ((*  (ptr) pd46 ))))((* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ), (* (( (ptr) (* (( (ptr) gf←c0105)+9)
                  /* viewer←v3084 */  ))+1) ), (* (( (ptr) (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ))+2) ), (* (( (ptr) (* (( (ptr) gf←c0105)+9)
                  /* viewer←v3084 */  ))+3) ), (* (( (ptr) (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ))+4) ), pd46);
            };
SOURCE(4046, 36)
         {
            word pd47;
            pd47 = (* (( (ptr) (* (( (ptr) gf←c0105)+45)/* var←c15816 */  ))+16) );
            (void) ( *( (fPt) ((*  (ptr) pd47 ))))((* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ), 0, 1, 0, pd47);
            };
         };
SOURCE(4086, 14)
      (* (( (ptr) formal←c0106)+10) ) = (* (( (ptr) gf←c0105)+21) );
SOURCE(4102, 199)
      (void) Put←P888((* (( (ptr) gf←c0105)+22) ), (word) (( (bPt) formal←c0106)+16));
SOURCE(4303, 14)
      (* (( (ptr) formal←c0106)+10) ) = (* (( (ptr) gf←c0105)+23) );
SOURCE(4319, 14)
      (* (( (ptr) formal←c0106)+12) ) = 0;
SOURCE(4335, 9)
      (void) Put←P888(rope←v4744, (word) (( (bPt) formal←c0106)+16));
SOURCE(4346, 9)
      (void) Put←P888((* (( (ptr) gf←c0105)+19) ), (word) (( (bPt) formal←c0106)+16));
SOURCE(4357, 46)
      {
         word pd48;
         pd48 = (* (( (ptr) (* (( (ptr) gf←c0105)+47)/* var←c15912 */  ))+7) );
         (void) ( *( (fPt) ((*  (ptr) pd48 ))))((* (( (ptr) formal←c0106)+8) ), (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ), pd48)
         ;
         };
SOURCE(4405, 24)
      ((P1x5b) (( (bPt) (* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  )) + 76))->f = 1;
SOURCE(4449, 40)
      {
         word pd49;
         pd49 = (* (( (ptr) (* (( (ptr) gf←c0105)+45)/* var←c15816 */  ))+16) );
         (void) ( *( (fPt) ((*  (ptr) pd49 ))))((* (( (ptr) gf←c0105)+9)/* viewer←v3084 */  ), 3, 1, 0, pd49);
         };
      };
   return(0);
   }

static word ViewerOk←P828(formal←c16552)
   word formal←c16552;
   {
   register ptr gf←c16520 =  (ptr) &globalframe;
   word var←c5044;
   formal←c16552 = (formal←c16552 - 24);
   /* ViewerOk: */ 
SOURCE(2959, 24)
SOURCE(2993, 108)
   {
      word tc50;
      word pd51;
      if ( (  ( ((* (( (ptr) gf←c16520)+9)/* viewer←v3084 */  ) != 0) ?  ! ((* (( (bPt) (* (( (ptr) gf←c16520)+9)/* viewer←v3084 */  ))+77)
       ) & 0100) : 0 )  ? ((* (( (ptr) (* (( (ptr) gf←c16520)+9)/* viewer←v3084 */  ))+14) ) == 0) : 0 ) ) {
         pd51 = (* (( (ptr) (* (( (ptr) gf←c16520)+40)/* var←c15400 */  ))+8) );
         tc50 =  (word) (0 != (word) ( *( (fPt) ((*  (ptr) pd51 ))))((* (( (ptr) (* (( (ptr) gf←c16520)+9)/* viewer←v3084 */  ))+13)
             ), (* (( (ptr) gf←c16520)+17) ), 1, pd51));
         }
      else {
         tc50 =  (word) 0;
         };
      return(tc50);
      };
   }

static void Put←P888(rope←v5104, formal←c16648)
   word rope←v5104;
   word formal←c16648;
   {
   W6 var←c16584;
   register ptr gf←c16616 =  (ptr) &globalframe;
   /* declaration of var←c15976 skipped */ 
   formal←c16648 = (formal←c16648 - 16);
   var←c16584.f0 = formal←c16648;
   /* Put: */ 
SOURCE(3258, 11)
   {
      word tmpAddr52;
      tmpAddr52 = (word) (( (ptr) &var←c16584)+4)/* var←c15976 */ ;
      (*  (ptr) tmpAddr52 ) = ( ((word)  (fPt) action←P948) );
      (* (( (ptr) tmpAddr52) + 1) ) = 1;
      };
SOURCE(3503, 41)
   {
      word var←c16008;
      word pd53;
      pd53 = (* (( (ptr) (* (( (ptr) gf←c16616)+40)/* var←c15400 */  ))+26) );
      var←c16008 = (word) ( *( (fPt) ((*  (ptr) pd53 ))))(rope←v5104, 0, 2147483647, (word) (( (bPt) &var←c16584)+16)/* var←c15976 */ , pd53)
      ;
      };
   }

static word action←P948(c←v5208, formal←c16712)
   word c←v5208;
   word formal←c16712;
   {
   register ptr gf←c16680 =  (ptr) &globalframe;
   word quit←v5252;
   formal←c16712 = (formal←c16712 - 16);
   /* action: */ 
SOURCE(3285, 14)
SOURCE(3285, 14)
   quit←v5252 = 0;
SOURCE(3341, 157)
   {
      W5 var←c16040;
      var←c16040.f0 = (c←v5208 & 0377);
      var←c16040.f1 = (* (( (ptr) (*  (ptr) formal←c16712 ))+9) );
      var←c16040.f2 = (* (( (ptr) (*  (ptr) formal←c16712 ))+10) );
      {
         word idx54;
         var←c16040.f3 = ((((((* (( (bPt) (*  (ptr) formal←c16712 ))+47) ) & 1) << 1) + (c←v5208 == 10)) << 30) + (
            idx54 = (word) ((* (( (ptr) (*  (ptr) formal←c16712 ))+12) ) + 16000),
            BCK(idx54, 16002)
            ));
         };
      var←c16040.f4 = 0;
      {
         word pd55;
         pd55 = (* (( (ptr) (* (( (ptr) gf←c16680)+44)/* var←c15784 */  ))+17) );
         (void) ( *( (fPt) ((*  (ptr) pd55 ))))((* (( (ptr) (*  (ptr) formal←c16712 ))+8) ), var←c16040, pd55);
         };
      };
SOURCE(3285, 14)
   return(quit←v5252);
   }

static void NoName←Q1248(formal←c080, formal←c200008, formal←c200009, formal←c200010, formal←c200011)
   word formal←c080;
   word formal←c200008;
   word formal←c200009;
   word formal←c200010;
   word formal←c200011;
   {
   register ptr gf←c0113 =  (ptr) &globalframe;
   if ((formal←c200009 == XR←Unwind)) {
      (void) (XR←MonitorExit((word) (( (bPt) gf←c0113)+16)/* LOCK←v2944 */ ));
      };
   (*  (ptr) formal←c080 ) = 0;
   (* (( (ptr) formal←c080)+1) ) = 0;
   return;
   }

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

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

static word NoName←Q1428(formal←c042)
   word formal←c042;
   {
   word var←c043;
   /* intermediary proc for a FORK, nArgs: 0, nRets: 0 */ 
   var←c043 = (* (( (ptr) formal←c042)+2) );
   formal←c042 = XR←ExtensionFree(formal←c042);
   (void) ( *( (fPt) ((*  (ptr) var←c043 ))))(var←c043);
   return(0);
   }

static word NoName←Q1488(formal←c051)
   word formal←c051;
   {
   word var←c052;
   /* intermediary proc for a FORK, nArgs: 0, nRets: 0 */ 
   var←c052 = (* (( (ptr) formal←c051)+2) );
   formal←c051 = XR←ExtensionFree(formal←c051);
   (void) ( *( (fPt) ((*  (ptr) var←c052 ))))(var←c052);
   return(0);
   }

/* file: TEditDocumentsCacheImpl, module: TEditDocumentsCacheImpl, compiled at: February 27, 1992 5:59:20 pm PST */ 
extern void XR←install←TEditDocumentsCacheImpl() {
   NoName←Q1008();
   }
extern void XR←run←TEditDocumentsCacheImpl() { XR←Start(&globalframe); }