/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: March 19, 1993 4:13:39 pm PST */
/* C2C version: February 24, 1993 (sun4) */
/* ref-counting: off */
/* file: GGUtilityImplC, module: GGUtilityImplC */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [967056855,2261930975] GGUtilityImplC";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {W8 f; word r;} W9;
typedef struct {word f0, f1;} W2;
typedef word (*fPt)();
typedef struct {W8 f; W2 r;} W10;
#define SOURCE(p, l) /* source p, l */
static void NoName←Q1284();
static void GGUtilityImplC←P0();
static word SequenceSubst←P60();
static word OrderedSelectionList←P120();
static word DoAddSliceToList←P780();
static word ReverseList←P180();
static void LookAtProfile←P240();
static void SetTurboOn←P300();
static word GetTurboOn←P360();
static void GGTurboOn←P420();
static void GGTurboOff←P480();
static void RestoreSceneClean←P540();
static void CopySceneClean←P600();
static word NoName←Q1344();
static word CopyWithSelections←P1032();
static void UnlinkCapturedScene←P660();
static void Init←P720();
static void NoName←Q1404();
static struct {unsigned f; char r[48];} string1 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\247\365\203\234\300\047\265\225\046\100\310\005\004\162\145\163\164\214\216\257\300\247\365\203\234\300\047\265\225\046\100\310\261\000\000\000"};
static struct {unsigned f; char r[4];} string2 = {131074, "\004\003\000"};
static struct {unsigned f; char r[48];} string3 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\247\365\203\234\300\047\265\225\046\100\324\005\004\162\145\163\164\214\216\257\300\247\365\203\234\300\047\265\225\046\100\324\261\000\000\000"};
static struct {unsigned f; char r[16];} string4 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"};
static struct {unsigned f; char r[4];} string5 = {65537, "\001\000\000"};
static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\071\244\035\327\300\206\322\123\337\101\004\000\000"};
static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\247\365\203\234\300\047\265\225\046\100\324\000\000"};
static struct {unsigned f; char r[32];} string8 = {1966110, "\006\015\000\001\004\001\010\001\034\001\040\001\044\001\050\001\054\001\060\001\064\001\074\001\100\110\001\100\130\001\000"};
static struct {unsigned f; char r[44];} string9 = {2621484, "Gargoyle turbo shape caching turned off.\000\000\000"};
static struct {unsigned f; char r[8];} string10 = {458760, "advance"};
static struct {unsigned f; char r[40];} string11 = {2555944, "Gargoyle turbo shape caching turned on."};
static struct {unsigned f; char r[20];} string12 = {1048596, "Gargoyle.TurboOn\000\000\000"};
static struct {unsigned f; char r[12];} string13 = {589836, "GGTurboOn\000\000"};
static struct {unsigned f; char r[88];} string14 = {5701720, "turns on Imager.Object caching to speed up Gargoyle refresh on black and white displays"};
static struct {unsigned f; char r[12];} string15 = {655372, "GGTurboOff\000"};
static struct {unsigned f; char r[92];} string16 = {5767260, "turns off Imager.Object caching to speed up Gargoyle refresh on black and white displays\000\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\071\244\035\327\300\206\322\123\337\100\164\000\000"};
static struct {unsigned f; char r[12];} string18 = {589833, "\006\002\020\001\100\100\004\100\377\000\000"};
static struct {unsigned f; char r[16];} string19 = {851984, "\257\300\212\210\334\132\300\036\362\033\164\100\150\000\000"};
static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\373\225\000\071\300\362\156\307\320\100\150\000\000"};
static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\347\101\365\007\300\150\102\366\020\100\150\000\000"};
static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\011\245\206\305\300\112\326\356\245\100\150\000\000"};
static struct {unsigned f; char r[16];} string23 = {851984, "\257\300\336\025\013\356\300\216\115\352\271\100\150\000\000"};
static struct {unsigned f; char r[8];} string24 = {1195857268, "ility"};
static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\370\132\042\205\300\045\133\011\125\100\150\000\000"};
static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\015\277\004\146\300\034\367\146\045\100\164\000\000"};
static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\242\221\264\046\300\105\142\142\023\100\150\000\000"};
static struct {unsigned f; char r[16];} string28 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"};
static struct {unsigned f; char r[16];} string29 = {851984, "\257\300\134\353\367\206\300\202\044\112\356\100\150\000\000"};
static struct {unsigned f; char r[16];} string30 = {851984, "\257\300\252\043\023\037\300\070\056\113\065\100\150\000\000"};
static struct {unsigned f; char r[20];} string31 = {1245204, "\211\007\006Change\300\252#\023\037\3008.K5"};
static struct {unsigned f; char r[16];} string32 = {851984, "\257\300\122\207\370\054\300\315\202\135\375\100\200\000\000"};
static struct {unsigned f; char r[12];} string33 = {589833, "\007\000\040\003\004\036\004\016\014\000\000"};
static struct {unsigned f; char r[16];} string34 = {851984, "\257\300\034\077\173\126\300\270\206\201\035\100\150\000\000"};
static struct {
   word f0[5]; word f5; word f6; word f7[18]; 
   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[13]; 
   } globalframe = {
   {0}, (word) 1, (word) 1, {0}, 
   (word) Init←P720, 0, (word) UnlinkCapturedScene←P660, 0, 
   (word) CopySceneClean←P600, 0, (word) RestoreSceneClean←P540, 0, 
   (word) GGTurboOff←P480, 0, (word) GGTurboOn←P420, 0, 
   (word) GetTurboOn←P360, 0, (word) SetTurboOn←P300, 0, 
   (word) LookAtProfile←P240, 0, (word) ReverseList←P180, 0, 
   (word) OrderedSelectionList←P120, 0, (word) SequenceSubst←P60, 0, 
   (word) GGUtilityImplC←P0, {0}
   };

static void NoName←Q1284()
   {
   register ptr gf←c0114 =  (ptr) &globalframe;
   word var←c22120;
   (* (( (ptr) gf←c0114)+9) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c0114)+10) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string2);
   (* (( (ptr) gf←c0114)+12) ) = (word) XR←GetTypeIndex((word) &string4, 0, (word) &string5);
   (* (( (ptr) gf←c0114)+13) ) = (word) XR←GetTypeIndexS((word) (&string6));
   (* (( (ptr) gf←c0114)+15) ) = (word) XR←GetTypeIndex((word) &string7, 0, (word) &string8);
   (*  (ptr) (( (bPt) gf←c0114)+64) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string9);
   (*  (ptr) (( (bPt) gf←c0114)+68) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string10);
   (*  (ptr) (( (bPt) gf←c0114)+72) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string11);
   (*  (ptr) (( (bPt) gf←c0114)+76) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string12);
   (*  (ptr) (( (bPt) gf←c0114)+80) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string13);
   (*  (ptr) (( (bPt) gf←c0114)+84) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string14);
   (*  (ptr) (( (bPt) gf←c0114)+88) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string15);
   (*  (ptr) (( (bPt) gf←c0114)+92) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0114)+12) ), (word) &string16);
   (void) XR←DeclareGlobalFrame((word) "GGUtilityImplC", &globalframe, (word) XR←GetTypeIndex((word) &string17, 0, (word) &string18)
      , (word) (( (bPt) gf←c0114)+196)/* var←c21320 */ );
   var←c22120 = (word) XR←ImportInterface((word) "CedarProcess", (word) XR←GetTypeIndexS((word) (&string19)), 10);
   (* (( (ptr) gf←c0114)+58)/* var←c21896 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 263937);
   var←c22120 = (word) XR←ImportInterface((word) "Commander", (word) XR←GetTypeIndexS((word) (&string20)), 3);
   (* (( (ptr) gf←c0114)+60)/* var←c22088 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 1310725);
   var←c22120 = (word) XR←ImportInterface((word) "GGScene", (word) XR←GetTypeIndexS((word) (&string21)), 50);
   (* (( (ptr) gf←c0114)+51)/* var←c21448 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 67902723);
   (void) XR←ImportProcS(var←c22120, 525058);
   (void) XR←ImportProcS(var←c22120, 67371009);
   (void) XR←ImportProcS(var←c22120, 68164356);
   var←c22120 = (word) XR←ImportInterface((word) "GGSelect", (word) XR←GetTypeIndexS((word) (&string22)), 23);
   (* (( (ptr) gf←c0114)+52)/* var←c21512 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 525314);
   (void) XR←ImportProcS(var←c22120, 786691);
   (void) XR←ImportProcS(var←c22120, 67898883);
   var←c22120 = (word) XR←ImportInterface((word) "GGSliceOps", (word) XR←GetTypeIndexS((word) (&string23)), 73);
   (* (( (ptr) gf←c0114)+57)/* var←c21800 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 264193);
   (void) XR←ImportProcS(var←c22120, 67634690);
   (void) XR←ImportProcS(var←c22120, 526082);
   var←c22120 = (word) XR←ImportInterface((word) &string24, (word) XR←GetTypeIndexS((word) (&string25)), 42);
   (* (( (ptr) gf←c0114)+55)/* var←c21672 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 135008515);
   (void) XR←ImportProcS(var←c22120, 134221824);
   var←c22120 = (word) XR←ImportInterface((word) "IO", (word) XR←GetTypeIndexS((word) (&string26)), 103);
   (* (( (ptr) gf←c0114)+54)/* var←c21640 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 1071364);
   var←c22120 = (word) XR←ImportInterface((word) "RefTab", (word) XR←GetTypeIndexS((word) (&string27)), 16);
   (* (( (ptr) gf←c0114)+56)/* var←c21736 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 67896835);
   (void) XR←ImportProcS(var←c22120, 67895555);
   (void) XR←ImportProcS(var←c22120, 264193);
   (void) XR←ImportProcS(var←c22120, 134742786);
   var←c22120 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string28)), 43);
   (* (( (ptr) gf←c0114)+59)/* var←c22024 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 67896323);
   var←c22120 = (word) XR←ImportInterface((word) "UserProfile", (word) XR←GetTypeIndexS((word) (&string29)), 11);
   (* (( (ptr) gf←c0114)+53)/* var←c21608 */  ) = var←c22120;
   (void) XR←ImportProcS(var←c22120, 264193);
   (void) XR←ImportProcS(var←c22120, 67633154);
   var←c22120 = (word) XR←ExportInterface((word) "GGHistoryTypes", (word) XR←GetTypeIndexS((word) (&string30)), 2);
   (* (( (ptr) gf←c0114)+61)/* var←c22152 */  ) = var←c22120;
   (void) XR←ExportType((word) "Change", (word) XR←GetTypeIndexS((word) (&string31)), (word) XR←GetTypeIndex((word) &string32, 0, (word) &string33)
      );
   var←c22120 = (word) XR←ExportInterface((word) &string24, (word) XR←GetTypeIndexS((word) (&string25)), 42);
   (* (( (ptr) gf←c0114)+62)/* var←c22184 */  ) = var←c22120;
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+188)/* var←c21288 */ , 67897859);
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+180)/* var←c21256 */ , 67901443);
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+116)/* var←c21000 */ , 134748418);
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+124)/* var←c21032 */ , 793091);
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+108)/* var←c20968 */ , 269057);
   var←c22120 = (word) XR←ExportInterface((word) "GGMUserProfile", (word) XR←GetTypeIndexS((word) (&string34)), 3);
   (* (( (ptr) gf←c0114)+62)/* var←c22184 */  ) = var←c22120;
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+156)/* var←c21160 */ , 262145);
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+148)/* var←c21128 */ , 67109120);
   (void) XR←ExportProcS(var←c22120, (word) (( (bPt) gf←c0114)+164)/* var←c21192 */ , 262657);
   }

static void GGUtilityImplC←P0(formal←c034, formal←c033)
   word formal←c034;
   word formal←c033;
   {
   /* GGUtilityImplC: */ 
SOURCE(258, 6117)
   /* moved to installation proc */ 
   /* moved to installation proc */ 
SOURCE(6369, 6)
   (void) Init←P720();
   }

static word SequenceSubst←P60(new←v4200, old←v4228, expr←v4256)
   word new←v4200;
   word old←v4228;
   word expr←v4256;
   {
   register ptr gf←c22216 =  (ptr) &globalframe;
   word head←v4384;
   word tail←v5752 = 0;
   word cons←v5780 = 0;
   word first←v5808 = 0;
   /* SequenceSubst: */ 
SOURCE(1074, 411)
SOURCE(1074, 411)
   head←v4384 = 0;
SOURCE(1313, 172)
   lab←L100002: ;
   if ((expr←v4256 != 0)) {
      }
   else {
      goto lab←L100000;
      };
SOURCE(1333, 18)
   first←v5808 = (*  (ptr) expr←v4256 );
SOURCE(1353, 47)
   {
      word var←c21352;
      word var←c21384;
      var←c21352 = XR←NewObject(8, (* (( (ptr) gf←c22216)+9) ));
      var←c21384 = var←c21352;
      if ((first←v5808 == old←v4228)) {
         (*  (ptr) var←c21384 ) = new←v4200;
         }
      else {
         (*  (ptr) var←c21384 ) = first←v5808;
         };
      cons←v5780 = var←c21352;
      };
SOURCE(1402, 52)
   if ((tail←v5752 == 0)) {
SOURCE(1421, 17)
      head←v4384 = cons←v5780;
      }
   else {
SOURCE(1438, 16)
      (* (( (ptr) tail←v5752)+1) ) = cons←v5780;
      };
SOURCE(1456, 11)
   tail←v5752 = cons←v5780;
SOURCE(1469, 16)
   expr←v4256 = (* (( (ptr) expr←v4256)+1) );
   goto lab←L100002;
   lab←L100000: ;
SOURCE(1074, 411)
   return(head←v4384);
   }

static word OrderedSelectionList←P120(ggData←v4528, order←v4556, formal←c0138)
   word ggData←v4528;
   word order←v4556;
   word formal←c0138;
   {
   W9 var←c22248;
   /* declaration of andSelectEntire←v4584 skipped */ 
   register ptr gf←c22280 =  (ptr) &globalframe;
   /* declaration of list←v4628 skipped */ 
   /* declaration of var←c21416 skipped */ 
   /* declaration of scene←v5936 skipped */ 
   (* (( (ptr) &var←c22248)+4)/* andSelectEntire←v4584 */  ) = formal←c0138;
   /* OrderedSelectionList: */ 
SOURCE(1500, 501)
   {
      word tmpAddr35;
      tmpAddr35 = (word) (( (ptr) &var←c22248)+6)/* var←c21416 */ ;
      (*  (ptr) tmpAddr35 ) = ( ((word)  (fPt) DoAddSliceToList←P780) );
      (* (( (ptr) tmpAddr35) + 1) ) = 1;
      };
SOURCE(1500, 501)
   (* (( (ptr) &var←c22248)+5)/* list←v4628 */  ) = 0;
SOURCE(1637, 27)
   (* (( (ptr) &var←c22248)+8)/* scene←v5936 */  ) = (* (( (ptr) ggData←v4528)+11) );
SOURCE(1901, 55)
   {
      word var←c21480;
      word pd36;
      pd36 = (* (( (ptr) (* (( (ptr) gf←c22280)+51)/* var←c21448 */  ))+31) );
      var←c21480 = (word) ( *( (fPt) ((*  (ptr) pd36 ))))((* (( (ptr) &var←c22248)+8)/* scene←v5936 */  ), 0, (word) (( (bPt) &var←c22248)+24)
         /* var←c21416 */ , 0, pd36);
      };
SOURCE(1958, 43)
   if ((order←v4556 == 1)) {
SOURCE(1977, 24)
      (* (( (ptr) &var←c22248)+5)/* list←v4628 */  ) = (word) ReverseList←P180((* ((( (ptr) &var←c22248)+5)/* list←v4628 */ ) ))
      ;
      };
SOURCE(1500, 501)
   return((* (( (ptr) &var←c22248)+5)/* list←v4628 */  ));
   }

static word DoAddSliceToList←P780(slice←v6040, formal←c22344)
   word slice←v6040;
   word formal←c22344;
   {
   register ptr gf←c22312 =  (ptr) &globalframe;
   word done←v6084;
   formal←c22344 = (formal←c22344 - 24);
   /* DoAddSliceToList: */ 
SOURCE(1666, 227)
SOURCE(1666, 227)
   done←v6084 = 0;
SOURCE(1737, 156)
   {
      word pd37;
      pd37 = (* (( (ptr) (* (( (ptr) gf←c22312)+52)/* var←c21512 */  ))+18) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd37 ))))(slice←v6040, (* (( (ptr) formal←c22344)+8) ), 0, pd37))) {
SOURCE(1795, 24)
         {
            word var←c21544;
            var←c21544 = XR←NewObject(8, (* (( (ptr) gf←c22312)+10) ));
            (*  (ptr) var←c21544 ) = slice←v6040;
            (* (( (ptr) var←c21544)+1) ) = (* (( (ptr) formal←c22344)+5) );
            (* (( (ptr) formal←c22344)+5) ) = var←c21544;
            };
SOURCE(1821, 72)
         if ((0 != (* (( (ptr) formal←c22344)+4) ))) {
SOURCE(1845, 48)
            {
               word pd38;
               pd38 = (* (( (ptr) (* (( (ptr) gf←c22312)+52)/* var←c21512 */  ))+5) );
               (void) ( *( (fPt) ((*  (ptr) pd38 ))))(slice←v6040, (* (( (ptr) formal←c22344)+8) ), 0, pd38);
               };
            };
         };
      };
SOURCE(1666, 227)
   return(done←v6084);
   }

static word ReverseList←P180(list←v4772)
   word list←v4772;
   {
   register ptr gf←c22376 =  (ptr) &globalframe;
   word val←v4900;
   /* ReverseList: */ 
SOURCE(2007, 171)
SOURCE(2007, 171)
   val←v4900 = 0;
SOURCE(2080, 9)
   val←v4900 = 0;
SOURCE(2091, 65)
   lab←L100005: ;
   if ((list←v4772 != 0)) {
      }
   else {
      goto lab←L100003;
      };
SOURCE(2111, 27)
   {
      word var←c21576;
      var←c21576 = XR←NewObject(8, (* (( (ptr) gf←c22376)+10) ));
      (*  (ptr) var←c21576 ) = (*  (ptr) list←v4772 );
      (* (( (ptr) var←c21576)+1) ) = val←v4900;
      val←v4900 = var←c21576;
      };
SOURCE(2140, 16)
   list←v4772 = (* (( (ptr) list←v4772)+1) );
   goto lab←L100005;
   lab←L100003: ;
SOURCE(2167, 11)
   return(val←v4900);
   }

static void LookAtProfile←P240(reason←v10872)
   word reason←v10872;
   {
   register ptr gf←c22408 =  (ptr) &globalframe;
   word turboOn←v6112;
   /* LookAtProfile: */ 
SOURCE(2385, 154)
SOURCE(2442, 76)
   {
      word pd39;
      pd39 = (* (( (ptr) (* (( (ptr) gf←c22408)+53)/* var←c21608 */  ))+4) );
      turboOn←v6112 = (word) ( *( (fPt) ((*  (ptr) pd39 ))))((* (( (ptr) gf←c22408)+19) ), 0, pd39);
      };
SOURCE(2520, 19)
   (void) SetTurboOn←P300(turboOn←v6112);
   }

static void SetTurboOn←P300(sense←v5128)
   word sense←v5128;
   {
   register ptr gf←c22440 =  (ptr) &globalframe;
   /* SetTurboOn: */ 
SOURCE(2545, 68)
SOURCE(2587, 26)
   (*  (ptr) (* (( (ptr) gf←c22440)+4)/* masterData←v3728 */  ) ) = sense←v5128;
   }

static word GetTurboOn←P360()
   {
   register ptr gf←c22472 =  (ptr) &globalframe;
   word sense←v5188;
   /* GetTurboOn: */ 
SOURCE(2618, 76)
SOURCE(2668, 26)
   sense←v5188 = (*  (ptr) (* (( (ptr) gf←c22472)+4)/* masterData←v3728 */  ) );
SOURCE(2618, 76)
   return(sense←v5188);
   }

static void GGTurboOn←P420(formal←c064, cmd←v10932)
   word formal←c064;
   word cmd←v10932;
   {
   register ptr gf←c22504 =  (ptr) &globalframe;
   word result←v10976;
   word msg←v11004;
   /* GGTurboOn: */ 
SOURCE(2699, 113)
SOURCE(2699, 113)
   result←v10976 = 0;
SOURCE(2699, 113)
   msg←v11004 = 0;
SOURCE(2736, 16)
   (void) SetTurboOn←P300(1);
SOURCE(2754, 58)
   {
      word pd40;
      pd40 = (* (( (ptr) (* (( (ptr) gf←c22504)+54)/* var←c21640 */  ))+93) );
      (void) ( *( (fPt) ((*  (ptr) pd40 ))))((* (( (ptr) cmd←v10932)+1) ), (* (( (ptr) gf←c22504)+18) ), 0, 2147483647, pd40);
      };
   /* removed tail goto */ 
   (*  (ptr) formal←c064 ) = result←v10976;
   (* (( (ptr) formal←c064)+1) ) = msg←v11004;
   return;
   }

static void GGTurboOff←P480(formal←c068, cmd←v11064)
   word formal←c068;
   word cmd←v11064;
   {
   register ptr gf←c22536 =  (ptr) &globalframe;
   word result←v11108;
   word msg←v11136;
   /* GGTurboOff: */ 
SOURCE(2817, 116)
SOURCE(2817, 116)
   result←v11108 = 0;
SOURCE(2817, 116)
   msg←v11136 = 0;
SOURCE(2855, 17)
   (void) SetTurboOn←P300(0);
SOURCE(2874, 59)
   {
      word pd41;
      pd41 = (* (( (ptr) (* (( (ptr) gf←c22536)+54)/* var←c21640 */  ))+93) );
      (void) ( *( (fPt) ((*  (ptr) pd41 ))))((* (( (ptr) cmd←v11064)+1) ), (* (( (ptr) gf←c22536)+16) ), 0, 2147483647, pd41);
      };
   /* removed tail goto */ 
   (*  (ptr) formal←c068 ) = result←v11108;
   (* (( (ptr) formal←c068)+1) ) = msg←v11136;
   return;
   }

static void RestoreSceneClean←P540(scene←v5248, virginList←v5276, virginMap←v5304)
   word scene←v5248;
   word virginList←v5276;
   word virginMap←v5304;
   {
   register ptr gf←c22568 =  (ptr) &globalframe;
   word found←v6156 = 0;
   word virginScene←v6184 = 0;
   word restoredPtr←v6212 = 0;
   word restoredList←v6240 = 0;
   /* RestoreSceneClean: */ 
SOURCE(2938, 1001)
SOURCE(3136, 56)
   {
      W2 var←c21704;
      {
         word pd42;
         pd42 = (* (( (ptr) (* (( (ptr) gf←c22568)+55)/* var←c21672 */  ))+20) );
         (void) ( *( (fPt) ((*  (ptr) pd42 ))))((word) (&var←c21704), pd42);
         };
      restoredPtr←v6212 = var←c21704.f1;
      restoredList←v6240 = var←c21704.f0;
      };
SOURCE(3194, 624)
   {
      register word sliceList←v6452;
      sliceList←v6452 = virginList←v5276;
      lab←L100011: ;
      if ((sliceList←v6452 != 0)) {
         }
      else {
         goto lab←L100008;
         };
      {
         word original←v6580 = 0;
         word nextSlice←v6608;
SOURCE(3298, 34)
         nextSlice←v6608 = (*  (ptr) sliceList←v6452 );
SOURCE(3367, 54)
         {
            W2 var←c21768;
            {
               word pd43;
               pd43 = (* (( (ptr) (* (( (ptr) gf←c22568)+56)/* var←c21736 */  ))+7) );
               (void) ( *( (fPt) ((*  (ptr) pd43 ))))((word) &var←c21768, virginMap←v5304, nextSlice←v6608, pd43);
               };
            original←v6580 = var←c21768.f1;
            found←v6156 = var←c21768.f0;
            };
SOURCE(3460, 185)
         if ((0 != found←v6156)) {
SOURCE(3474, 195)
            {
               word originalSlice←v6668;
SOURCE(3476, 46)
               originalSlice←v6668 = XR←Narrow(original←v6580, (* (( (ptr) gf←c22568)+15) ));
SOURCE(3564, 54)
               {
                  word pd44;
                  pd44 = (* (( (ptr) (* (( (ptr) gf←c22568)+57)/* var←c21800 */  ))+11) );
                  (void) ( *( (fPt) ((*  (ptr) pd44 ))))(nextSlice←v6608, originalSlice←v6668, pd44);
                  };
SOURCE(3620, 25)
               nextSlice←v6608 = originalSlice←v6668;
               };
            };
SOURCE(3672, 22)
         (* (( (ptr) nextSlice←v6608)+2) ) = 0;
SOURCE(3732, 86)
         {
            W2 var←c21832;
            {
               word pd45;
               pd45 = (* (( (ptr) (* (( (ptr) gf←c22568)+55)/* var←c21672 */  ))+21) );
               (void) ( *( (fPt) ((*  (ptr) pd45 ))))((word) &var←c21832, nextSlice←v6608, restoredList←v6240, restoredPtr←v6212, pd45);
               };
            restoredPtr←v6212 = var←c21832.f1;
            restoredList←v6240 = var←c21832.f0;
            };
         };
      sliceList←v6452 = (* (( (ptr) sliceList←v6452)+1) );
      goto lab←L100011;
      lab←L100008: ;
      };
SOURCE(3829, 47)
   {
      word pd46;
      pd46 = (* (( (ptr) (* (( (ptr) gf←c22568)+51)/* var←c21448 */  ))+4) );
      virginScene←v6184 = (word) ( *( (fPt) ((*  (ptr) pd46 ))))(restoredList←v6240, pd46);
      };
SOURCE(3893, 46)
   {
      word pd47;
      pd47 = (* (( (ptr) (* (( (ptr) gf←c22568)+51)/* var←c21448 */  ))+7) );
      (void) ( *( (fPt) ((*  (ptr) pd47 ))))(virginScene←v6184, scene←v5248, pd47);
      };
   }

static void CopySceneClean←P600(formal←c091, formal←c0139, formal←c0140)
   word formal←c091;
   word formal←c0139;
   word formal←c0140;
   {
   W10 var←c22600;
   /* declaration of scene←v5448 skipped */ 
   /* declaration of copyAll←v5476 skipped */ 
   /* declaration of virginList←v5520 skipped */ 
   /* declaration of virginMap←v5548 skipped */ 
   /* declaration of var←c21864 skipped */ 
   (* (( (ptr) &var←c22600)+4)/* scene←v5448 */  ) = formal←c0139;
   (* (( (ptr) &var←c22600)+5)/* copyAll←v5476 */  ) = formal←c0140;
   /* CopySceneClean: */ 
SOURCE(3978, 1061)
   {
      word tmpAddr48;
      tmpAddr48 = (word) (( (ptr) &var←c22600)+8)/* var←c21864 */ ;
      (*  (ptr) tmpAddr48 ) = ( ((word)  (fPt) CopyWithSelections←P1032) );
      (* (( (ptr) tmpAddr48) + 1) ) = 1;
      };
SOURCE(3978, 1061)
   (* (( (ptr) &var←c22600)+6)/* virginList←v5520 */  ) = 0;
SOURCE(3978, 1061)
   (* (( (ptr) &var←c22600)+7)/* virginMap←v5548 */  ) = 0;
SOURCE(4107, 932)
   {
      word var←c0133;
      var←c0133 = (word) &var←c22600;
       (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q1344) ), ( ((word)  (fPt) NoName←Q1404) ), var←c0133);
      };
   /* removed tail goto */ 
   (*  (ptr) formal←c091 ) = (* (( (ptr) &var←c22600)+6)/* virginList←v5520 */  );
   (* (( (ptr) formal←c091)+1) ) = (* (( (ptr) &var←c22600)+7)/* virginMap←v5548 */  );
   return;
   }

static word NoName←Q1344(formal←c0127)
   word formal←c0127;
   {
   register ptr gf←c0126 =  (ptr) &globalframe;
SOURCE(4174, 26)
   {
      word virginPtr←v6740 = 0;
      word sceneList←v6768;
SOURCE(4505, 11)
      {
         word pd49;
         pd49 = (* (( (ptr) (* (( (ptr) gf←c0126)+51)/* var←c21448 */  ))+33) );
         sceneList←v6768 = (word) ( *( (fPt) ((*  (ptr) pd49 ))))((* (( (ptr) formal←c0127)+4) ), 0, 0, pd49);
         };
SOURCE(4566, 473)
      if ((sceneList←v6768 != 0)) {
SOURCE(4590, 25)
         {
            word pd50;
            pd50 = (* (( (ptr) (* (( (ptr) gf←c0126)+58)/* var←c21896 */  ))+11) );
            (void) ( *( (fPt) ((*  (ptr) pd50 ))))(0, pd50);
            };
SOURCE(4643, 27)
         {
            word pd51;
            pd51 = (* (( (ptr) (* (( (ptr) gf←c0126)+56)/* var←c21736 */  ))+5) );
            (* (( (ptr) formal←c0127)+7) ) = (word) ( *( (fPt) ((*  (ptr) pd51 ))))(17, 0, 0, pd51);
            };
SOURCE(4672, 52)
         {
            W2 var←c21928;
            {
               word pd52;
               pd52 = (* (( (ptr) (* (( (ptr) gf←c0126)+55)/* var←c21672 */  ))+20) );
               (void) ( *( (fPt) ((*  (ptr) pd52 ))))((word) (&var←c21928), pd52);
               };
            virginPtr←v6740 = var←c21928.f1;
            (* (( (ptr) formal←c0127)+6) ) = var←c21928.f0;
            };
SOURCE(4726, 313)
         {
            register word sliceList←v7084;
            sliceList←v7084 = sceneList←v6768;
            lab←L100018: ;
            if ((sliceList←v7084 != 0)) {
               }
            else {
               goto lab←L100015;
               };
            {
               word slice←v7212;
SOURCE(4808, 30)
               slice←v7212 = (*  (ptr) sliceList←v7084 );
SOURCE(4840, 172)
               {
                  W2 var←c21992;
                  {
                     word var←c21960;
                     {
                        word pd54;
                        if ((0 != (* (( (ptr) formal←c0127)+5) ))) { goto then053;};
                        pd54 = (* (( (ptr) (* (( (ptr) gf←c0126)+52)/* var←c21512 */  ))+18) );
                        if ((0 != (word) ( *( (fPt) ((*  (ptr) pd54 ))))(slice←v7212, (* (( (ptr) formal←c0127)+4) ), 0, pd54))) {
                           then053: ;
                           var←c21960 = (word) CopyWithSelections←P1032(slice←v7212, (word) (( (bPt) formal←c0127)+32));
                           }
                        else {
                           var←c21960 = slice←v7212;
                           };
                        };
                     {
                        W2 var←c0100;
                        {
                           word pd55;
                           pd55 = (* (( (ptr) (* (( (ptr) gf←c0126)+55)/* var←c21672 */  ))+21) );
                           (void) ( *( (fPt) ((*  (ptr) pd55 ))))((word) &var←c0100, var←c21960, (* (( (ptr) formal←c0127)+6) ), virginPtr←v6740, pd55)
                           ;
                           };
                        var←c21992 = var←c0100;
                        };
                     };
                  virginPtr←v6740 = var←c21992.f1;
                  (* (( (ptr) formal←c0127)+6) ) = var←c21992.f0;
                  };
SOURCE(5014, 25)
               {
                  word pd56;
                  pd56 = (* (( (ptr) (* (( (ptr) gf←c0126)+58)/* var←c21896 */  ))+11) );
                  (void) ( *( (fPt) ((*  (ptr) pd56 ))))(0, pd56);
                  };
               };
            sliceList←v7084 = (* (( (ptr) sliceList←v7084)+1) );
            goto lab←L100018;
            lab←L100015: ;
            };
         };
      };
   return(0);
   }

static word CopyWithSelections←P1032(slice←v6844, formal←c22664)
   word slice←v6844;
   word formal←c22664;
   {
   register ptr gf←c22632 =  (ptr) &globalframe;
   word copy←v6888;
   formal←c22664 = (formal←c22664 - 32);
   /* CopyWithSelections: */ 
SOURCE(4174, 26)
SOURCE(4174, 26)
   copy←v6888 = 0;
SOURCE(4240, 73)
   if ((0 != (* (( (ptr) gf←c22632)+5)/* doSelections←v4064 */  ))) {
SOURCE(4261, 52)
      {
         word pd57;
         pd57 = (* (( (ptr) (* (( (ptr) gf←c22632)+52)/* var←c21512 */  ))+8) );
         (void) ( *( (fPt) ((*  (ptr) pd57 ))))(slice←v6844, 0, pd57);
         };
      };
SOURCE(4348, 35)
   {
      word pd58;
      pd58 = (* (( (ptr) (* (( (ptr) gf←c22632)+57)/* var←c21800 */  ))+10) );
      copy←v6888 = (*  (ptr) ( *( (fPt) ((*  (ptr) pd58 ))))(slice←v6844, 0, pd58) );
      };
SOURCE(4406, 63)
   {
      word pd59;
      pd59 = (* (( (ptr) (* (( (ptr) gf←c22632)+56)/* var←c21736 */  ))+10) );
      if ((0 == (word) ( *( (fPt) ((*  (ptr) pd59 ))))((* (( (ptr) formal←c22664)+7) ), copy←v6888, slice←v6844, pd59))) {
SOURCE(4469, 5)
         (void) XR←RaiseUnnamedError();
         };
      };
SOURCE(4174, 26)
   return(copy←v6888);
   }

static void UnlinkCapturedScene←P660(historyEvent←v5708)
   word historyEvent←v5708;
   {
   register ptr gf←c22696 =  (ptr) &globalframe;
   /* UnlinkCapturedScene: */ 
SOURCE(5111, 821)
SOURCE(5177, 99)
   {
      word tc60;
      word pd61;
      if ((historyEvent←v5708 != 0)) {
         pd61 = (* (( (ptr) (* (( (ptr) gf←c22696)+59)/* var←c22024 */  ))+8) );
         tc60 =  (word) (0 == (word) ( *( (fPt) ((*  (ptr) pd61 ))))((*  (ptr) historyEvent←v5708 ), (* (( (ptr) gf←c22696)+17) ), 0, pd61)
         );
         }
      else {
         tc60 =  (word) 0;
         };
      if (tc60) {
SOURCE(5258, 18)
         (void) (XR←RaiseSignal((word) (( (bPt) gf←c22696)+96)/* var←c20904 */ , 0, 0));
         };
      };
SOURCE(5297, 635)
   if ( (  ( (historyEvent←v5708 != 0) ? ((* (( (ptr) historyEvent←v5708)+2) ) != 0) : 0 )  ? ((*  (ptr) (* (( (ptr) historyEvent←v5708)+2)
    ) ) != 0) : 0 ) ) {
SOURCE(5390, 544)
      {
         word found←v7256 = 0;
         word captureRef←v7284;
         word captureData←v7312;
SOURCE(5413, 65)
         captureRef←v7284 = (* (( (ptr) (*  (ptr) (* (( (ptr) historyEvent←v5708)+2) ) ))+1) );
SOURCE(5480, 52)
         if ((captureRef←v7284 == 0)) {
            goto lab←L100019;
            };
         if (((*  (ptr) captureRef←v7284 ) == 2)) {
            goto lab←L100019;
            };
         (void) XR←RaiseError(XR←NarrowFault, 0);
         lab←L100019: ;
         captureData←v7312 = captureRef←v7284;
SOURCE(5534, 318)
         {
            register word sliceList←v7380;
            sliceList←v7380 = (* (( (ptr) captureData←v7312)+2) );
            lab←L100023: ;
            if ((sliceList←v7380 != 0)) {
               }
            else {
               goto lab←L100020;
               };
            {
               W2 var←c0108;
SOURCE(5629, 66)
               {
                  word pd62;
                  pd62 = (* (( (ptr) (* (( (ptr) gf←c22696)+56)/* var←c21736 */  ))+7) );
                  (void) ( *( (fPt) ((*  (ptr) pd62 ))))((word) &var←c0108, (* (( (ptr) captureData←v7312)+3) ), (*  (ptr) sliceList←v7380 ), pd62)
                  ;
                  };
               found←v7256 = var←c0108.f0;
SOURCE(5697, 61)
               if (((0 != found←v7256) && (0 != (* (( (ptr) gf←c22696)+6)/* doUnlink←v4092 */  )))) {
SOURCE(5724, 34)
                  {
                     word pd63;
                     pd63 = (* (( (ptr) (* (( (ptr) gf←c22696)+57)/* var←c21800 */  ))+12) );
                     (void) ( *( (fPt) ((*  (ptr) pd63 ))))((*  (ptr) (sliceList←v7380) ), pd63);
                     };
                  };
SOURCE(5833, 19)
               (*  (ptr) sliceList←v7380 ) = 0;
               };
            sliceList←v7380 = (* (( (ptr) sliceList←v7380)+1) );
            goto lab←L100023;
            lab←L100020: ;
            };
SOURCE(5863, 69)
         if (((* (( (ptr) captureData←v7312)+3) ) != 0)) {
SOURCE(5897, 35)
            {
               word pd64;
               pd64 = (* (( (ptr) (* (( (ptr) gf←c22696)+56)/* var←c21736 */  ))+12) );
               (void) ( *( (fPt) ((*  (ptr) pd64 ))))((* ((( (ptr) captureData←v7312)+3)) ), pd64);
               };
            };
         };
      };
   }

static void Init←P720()
   {
   register ptr gf←c22728 =  (ptr) &globalframe;
   /* Init: */ 
SOURCE(5991, 373)
SOURCE(6009, 31)
   (* (( (ptr) gf←c22728)+4)/* masterData←v3728 */  ) = XR←NewObject(8, (* (( (ptr) gf←c22728)+13) ));
SOURCE(6042, 49)
   {
      word pd65;
      pd65 = (* (( (ptr) (* (( (ptr) gf←c22728)+53)/* var←c21608 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd65 ))))((word) ((( (bPt) gf←c22728)+164)/* var←c21192 */ ), pd65);
      };
SOURCE(6093, 133)
   {
      word pd66;
      pd66 = (* (( (ptr) (* (( (ptr) gf←c22728)+60)/* var←c22088 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd66 ))))((* (( (ptr) gf←c22728)+20) ), (word) (( (bPt) gf←c22728)+140)/* var←c21096 */ , (* (
            ( (ptr) gf←c22728)+21) ), 0, 1, pd66);
      };
SOURCE(6228, 136)
   {
      word pd67;
      pd67 = (* (( (ptr) (* (( (ptr) gf←c22728)+60)/* var←c22088 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd67 ))))((* (( (ptr) gf←c22728)+22) ), (word) (( (bPt) gf←c22728)+132)/* var←c21064 */ , (* (
            ( (ptr) gf←c22728)+23) ), 0, 1, pd67);
      };
   }

static void NoName←Q1404(formal←c0113, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c0113;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c0132 =  (ptr) &globalframe;
   if ((formal←c200001 == XR←Aborted)) {
SOURCE(4126, 45)
      if (((* (( (ptr) formal←c200000)+7) ) != 0)) {
SOURCE(4148, 23)
         {
            word pd68;
            pd68 = (* (( (ptr) (* (( (ptr) gf←c0132)+56)/* var←c21736 */  ))+12) );
            (void) ( *( (fPt) ((*  (ptr) pd68 ))))((* ((( (ptr) formal←c200000)+7)) ), pd68);
            };
         };
      };
   (*  (ptr) formal←c0113 ) = 0;
   (* (( (ptr) formal←c0113)+1) ) = 0;
   return;
   }

/* file: GGUtilityImplC, module: GGUtilityImplC, compiled at: March 19, 1993 4:13:38 pm PST */ 
extern void XR←install←GGUtilityImplC() {
   NoName←Q1284();
   }
extern void XR←run←GGUtilityImplC() { XR←Start(&globalframe); }