/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: July 11, 1993 8:19:36 pm PDT */
/* C2C version: April 20, 1993 (sun4) */
/* ref-counting: off */
/* file: GGSelectImpl, module: GGSelectImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [1725403207,1266376525] GGSelectImpl";
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 {word f0, f1;} W2;
typedef word (*fPt)();
#define SOURCE(p, l) /* source p, l */
static void NoName←Q3012();
static void GGSelectImpl←P0();
static void ChangeDonkeyTail←P60();
static void NoDonkeyTail←P120();
static void SelectAll←P180();
static word DoSelectSlice←P2160();
static void SelectSliceFromParts←P240();
static void SelectSlice←P300();
static void SelectEntireSlice←P360();
static void DuplicateSelections←P420();
static word DoSelectSlice←P2220();
static void DeselectEntity←P480();
static void DeselectEntityAllClasses←P540();
static void DeselectAll←P600();
static void DeselectAllAllClasses←P660();
static void DeselectEntireSlice←P720();
static void DeselectSlice←P780();
static void DeselectTraj←P840();
static void SaveSelectionsInSliceAllClasses←P900();
static word RemakeSelections←P960();
static void ReselectSliceAllClasses←P1020();
static word ReselectTraj←P1080();
static void DeleteSelection←P1140();
static word ListSelected←P1200();
static void SetSelected←P1260();
static void SetJointField←P1320();
static void SetSegmentField←P1380();
static void AppendSelection←P1440();
static word LastSliceDescriptor←P1500();
static void SetSelectedList←P1560();
static word IsSelectedInFull←P1620();
static word IsSelectedInPart←P1680();
static word NoSelections←P1740();
static word FindSelectedSequence←P1800();
static word LookForTraj←P2904();
static word FindSelectedSlice←P1860();
static word GetLastSelection←P1920();
static void SubstituteForSegment←P1980();
static word BoundBoxOfOutlines←P2040();
static word DRemove←P2100();
static struct {unsigned f; char r[4];} string1 = {65540, "\251\000\000"};
static struct {unsigned f; char r[4];} string2 = {131076, "\216\251\000"};
static struct {unsigned f; char r[4];} string3 = {65537, "\001\000\000"};
static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\247\365\203\234\300\047\265\225\046\100\324\000\000"};
static struct {unsigned f; char r[32];} string5 = {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[16];} string6 = {851984, "\257\300\247\365\203\234\300\047\265\225\046\100\310\000\000"};
static struct {unsigned f; char r[4];} string7 = {131074, "\004\003\000"};
static struct {unsigned f; char r[48];} string8 = {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[16];} string9 = {851984, "\257\300\247\365\203\234\300\047\265\225\046\106\354\000\000"};
static struct {unsigned f; char r[8];} string10 = {262148, "\004\200@\034\000\000\000"};
static struct {unsigned f; char r[8];} string11 = {262152, "Traj\000\000\000"};
static struct {unsigned f; char r[16];} string12 = {851984, "\257\300f\327\220G\300K{←M@t\000\000"};
static struct {unsigned f; char r[4];} string13 = {196611, "\004p\000"};
static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\265\217\206\011\300\172\271\371\033\100\150\000\000"};
static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\311\023\117\300\300\337\236\305\170\100\150\000\000"};
static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\301\241\007\150\300\032\111\265\237\100\150\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\347\101\365\007\300\150\102\366\020\100\150\000\000"};
static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\261\002\056\176\300\055\321\222\125\100\150\000\000"};
static struct {unsigned f; char r[16];} string19 = {851984, "\257\300U$)\337\300Xo9\243@t\000\000"};
static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\336\025\013\356\300\216\115\352\271\100\150\000\000"};
static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\050\310\006\072\300\004\273\314\121\100\150\000\000"};
static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\247\365\203\234\300\047\265\225\046\100\150\000\000"};
static struct {unsigned f; char r[24];} string23 = {1376280, "\211\011\010\123\143\145\156\145\117\142\152\300\247\365\203\234\300\047\265\225\046\000\000"};
static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\023\042\171\072\300\052\367\123\170\100\164\000\000"};
static struct {unsigned f; char r[28];} string25 = {1572888, "\006\010\014\001\020\001\024\001\030\004\155\273\100\120\013\100\214\001\100\220\001\100\224\001\000\000\000"};
static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\011\245\206\305\300\112\326\356\245\100\150\000\000"};
static struct {
   word f0[15]; word f15; word f16; word f17; 
   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; 
   word f62; 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; word f76; word f77; 
   word f78; word f79; word f80; word f81; 
   word f82; word f83; word f84; word f85; 
   word f86[11]; 
   } globalframe = {
   {0}, (word) DRemove←P2100, 0, (word) BoundBoxOfOutlines←P2040, 
   0, (word) SubstituteForSegment←P1980, 0, (word) GetLastSelection←P1920, 
   0, (word) FindSelectedSlice←P1860, 0, (word) FindSelectedSequence←P1800, 
   0, (word) NoSelections←P1740, 0, (word) IsSelectedInPart←P1680, 
   0, (word) IsSelectedInFull←P1620, 0, (word) SetSelectedList←P1560, 
   0, (word) LastSliceDescriptor←P1500, 0, (word) AppendSelection←P1440, 
   0, (word) SetSegmentField←P1380, 0, (word) SetJointField←P1320, 
   0, (word) SetSelected←P1260, 0, (word) ListSelected←P1200, 
   0, (word) DeleteSelection←P1140, 0, (word) ReselectTraj←P1080, 
   0, (word) ReselectSliceAllClasses←P1020, 0, (word) RemakeSelections←P960, 
   0, (word) SaveSelectionsInSliceAllClasses←P900, 0, (word) DeselectTraj←P840, 
   0, (word) DeselectSlice←P780, 0, (word) DeselectEntireSlice←P720, 
   0, (word) DeselectAllAllClasses←P660, 0, (word) DeselectAll←P600, 
   0, (word) DeselectEntityAllClasses←P540, 0, (word) DeselectEntity←P480, 
   0, (word) DuplicateSelections←P420, 0, (word) SelectEntireSlice←P360, 
   0, (word) SelectSlice←P300, 0, (word) SelectSliceFromParts←P240, 
   0, (word) SelectAll←P180, 0, (word) NoDonkeyTail←P120, 
   0, (word) ChangeDonkeyTail←P60, 0, (word) GGSelectImpl←P0, 
   {0}
   };

static void NoName←Q3012()
   {
   register ptr gf←c0257 =  (ptr) &globalframe;
   word var←c29124;
   (* (( (ptr) gf←c0257)+5) ) = (word) XR←GetTypeIndexS((word) (&string1));
   (* (( (ptr) gf←c0257)+6) ) = (word) XR←GetTypeIndex((word) &string2, 0, (word) &string3);
   (* (( (ptr) gf←c0257)+8) ) = (word) XR←GetTypeIndex((word) &string4, 0, (word) &string5);
   (* (( (ptr) gf←c0257)+9) ) = (word) XR←GetTypeIndex((word) &string6, 0, (word) &string7);
   (* (( (ptr) gf←c0257)+10) ) = (word) XR←GetTypeIndex((word) &string8, 0, (word) &string7);
   (* (( (ptr) gf←c0257)+11) ) = (word) XR←GetTypeIndex((word) &string9, 0, (word) &string10);
   (*  (ptr) (( (bPt) gf←c0257)+48) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0257)+6) ), (word) &string11);
   (void) XR←DeclareGlobalFrame((word) "GGSelectImpl", &globalframe, (word) XR←GetTypeIndex((word) &string12, 0, (word) &string13)
      , (word) (( (bPt) gf←c0257)+340)/* var←c27044 */ );
   var←c29124 = (word) XR←ImportInterface((word) "GGBoundBox", (word) XR←GetTypeIndexS((word) (&string14)), 24);
   (* (( (ptr) gf←c0257)+94)/* var←c29060 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 526850);
   (void) XR←ImportProcS(var←c29124, 67109376);
   var←c29124 = (word) XR←ImportInterface((word) "GGOutline", (word) XR←GetTypeIndexS((word) (&string15)), 19);
   (* (( (ptr) gf←c0257)+92)/* var←c28996 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 264705);
   var←c29124 = (word) XR←ImportInterface((word) "GGParent", (word) XR←GetTypeIndexS((word) (&string16)), 83);
   (* (( (ptr) gf←c0257)+89)/* var←c27268 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 67386369);
   (void) XR←ImportProcS(var←c29124, 67654146);
   (void) XR←ImportProcS(var←c29124, 67386625);
   (void) XR←ImportProcS(var←c29124, 67391489);
   var←c29124 = (word) XR←ImportInterface((word) "GGScene", (word) XR←GetTypeIndexS((word) (&string17)), 50);
   (* (( (ptr) gf←c0257)+87)/* var←c27172 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 787715);
   (void) XR←ImportProcS(var←c29124, 526594);
   (void) XR←ImportProcS(var←c29124, 67637506);
   (void) XR←ImportProcS(var←c29124, 67379969);
   (void) XR←ImportProcS(var←c29124, 68426757);
   (void) XR←ImportProcS(var←c29124, 68164356);
   var←c29124 = (word) XR←ImportInterface((word) "GGSequence", (word) XR←GetTypeIndexS((word) (&string18)), 58);
   (* (( (ptr) gf←c0257)+91)/* var←c27588 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 67634434);
   (void) XR←ImportProcS(var←c29124, 67639298);
   (void) XR←ImportProcS(var←c29124, 67900419);
   var←c29124 = (word) XR←ImportInterface((word) "GGSlice", (word) XR←GetTypeIndexS((word) (&string19)), 128);
   (* (( (ptr) gf←c0257)+88)/* var←c27236 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 67634178);
   var←c29124 = (word) XR←ImportInterface((word) "GGSliceOps", (word) XR←GetTypeIndexS((word) (&string20)), 73);
   (* (( (ptr) gf←c0257)+90)/* var←c27300 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 67633922);
   (void) XR←ImportProcS(var←c29124, 67377153);
   (void) XR←ImportProcS(var←c29124, 67637506);
   (void) XR←ImportProcS(var←c29124, 790531);
   (void) XR←ImportProcS(var←c29124, 67640066);
   (void) XR←ImportProcS(var←c29124, 67901699);
   (void) XR←ImportProcS(var←c29124, 67640578);
   (void) XR←ImportProcS(var←c29124, 67639810);
   (void) XR←ImportProcS(var←c29124, 67376897);
   var←c29124 = (word) XR←ImportInterface((word) "GGTraj", (word) XR←GetTypeIndexS((word) (&string21)), 55);
   (* (( (ptr) gf←c0257)+93)/* var←c29028 */  ) = var←c29124;
   (void) XR←ImportProcS(var←c29124, 67637250);
   var←c29124 = (word) XR←ExportInterface((word) "GGModelTypes", (word) XR←GetTypeIndexS((word) (&string22)), 1);
   (* (( (ptr) gf←c0257)+95)/* var←c29156 */  ) = var←c29124;
   (void) XR←ExportType((word) "SceneObj", (word) XR←GetTypeIndexS((word) (&string23)), (word) XR←GetTypeIndex((word) &string24, 0, (word) &string25)
      );
   var←c29124 = (word) XR←ExportInterface((word) "GGSelect", (word) XR←GetTypeIndexS((word) (&string26)), 23);
   (* (( (ptr) gf←c0257)+96)/* var←c29188 */  ) = var←c29124;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+316)/* var←c26948 */ , 524290, (word) "SelectAll");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+292)/* var←c26852 */ , 786691, (word) "SelectEntireSlice");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+300)/* var←c26884 */ , 786947, (word) "SelectSlice");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+308)/* var←c26916 */ , 1049348, (word) "SelectSliceFromParts")
   ;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+220)/* var←c26564 */ , 525314, (word) "SaveSelectionsInSliceAllClasses")
   ;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+204)/* var←c26500 */ , 525570, (word) "ReselectSliceAllClasses")
   ;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+196)/* var←c26468 */ , 68158980, (word) "ReselectTraj");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+276)/* var←c26788 */ , 788227, (word) "DeselectEntity");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+268)/* var←c26756 */ , 526338, (word) "DeselectEntityAllClasses")
   ;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+260)/* var←c26724 */ , 526594, (word) "DeselectAll");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+252)/* var←c26692 */ , 264705, (word) "DeselectAllAllClasses")
   ;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+236)/* var←c26628 */ , 1051396, (word) "DeselectSlice");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+244)/* var←c26660 */ , 789507, (word) "DeselectEntireSlice");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+124)/* var←c26180 */ , 67898627, (word) "IsSelectedInFull");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+116)/* var←c26148 */ , 67898883, (word) "IsSelectedInPart");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+108)/* var←c26116 */ , 67636994, (word) "NoSelections");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+92)/* var←c26052 */ , 67637250, (word) "FindSelectedSlice");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+84)/* var←c26020 */ , 67375361, (word) "GetLastSelection");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+284)/* var←c26820 */ , 791043, (word) "DuplicateSelections");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+76)/* var←c25988 */ , 135271172, (word) "SubstituteForSegment")
   ;
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+180)/* var←c26404 */ , 67638274, (word) "ListSelected");
   (void) XR←ExportProcS(var←c29124, (word) (( (bPt) gf←c0257)+172)/* var←c26372 */ , 791811, (word) "SetSelected");
   }

static void GGSelectImpl←P0(formal←c052, formal←c051)
   word formal←c052;
   word formal←c051;
   {
   /* GGSelectImpl: */ 
   }

static void ChangeDonkeyTail←P60(sliceD←v5308, selectClass←v5336)
   word sliceD←v5308;
   word selectClass←v5336;
   {
   /* ChangeDonkeyTail: */ 
SOURCE(2153, 308)
SOURCE(2235, 226)
   {
      word var←c27076;
      var←c27076 = selectClass←v5336;
      switch (var←c27076) {
         case 0: 
SOURCE(2269, 41)
            (* (( (ptr) (*  (ptr) sliceD←v5308 ))+7) ) = sliceD←v5308;
            break;
         case 1: 
SOURCE(2319, 38)
            (* (( (ptr) (*  (ptr) sliceD←v5308 ))+8) ) = sliceD←v5308;
            break;
         case 2: 
SOURCE(2369, 41)
            (* (( (ptr) (*  (ptr) sliceD←v5308 ))+9) ) = sliceD←v5308;
            break;
         case 3: 
SOURCE(2421, 40)
            (* (( (ptr) (*  (ptr) sliceD←v5308 ))+10) ) = sliceD←v5308;
            break;
         };
      };
   }

static void NoDonkeyTail←P120(slice←v5396, selectClass←v5424)
   word slice←v5396;
   word selectClass←v5424;
   {
   /* NoDonkeyTail: */ 
SOURCE(2476, 253)
SOURCE(2543, 186)
   {
      word var←c27108;
      var←c27108 = selectClass←v5424;
      switch (var←c27108) {
         case 0: 
SOURCE(2577, 31)
            (* (( (ptr) slice←v5396)+7) ) = 0;
            break;
         case 1: 
SOURCE(2617, 28)
            (* (( (ptr) slice←v5396)+8) ) = 0;
            break;
         case 2: 
SOURCE(2657, 31)
            (* (( (ptr) slice←v5396)+9) ) = 0;
            break;
         case 3: 
SOURCE(2699, 30)
            (* (( (ptr) slice←v5396)+10) ) = 0;
            break;
         };
      };
   }

static void SelectAll←P180(formal←c0285, formal←c0286)
   word formal←c0285;
   word formal←c0286;
   {
   W8 var←c29220;
   /* declaration of scene←v5484 skipped */ 
   /* declaration of selectClass←v5512 skipped */ 
   register ptr gf←c29252 =  (ptr) &globalframe;
   /* declaration of var←c27140 skipped */ 
   var←c29220.f4/* scene←v5484 */  = formal←c0285;
   var←c29220.f5/* selectClass←v5512 */  = formal←c0286;
   /* SelectAll: */ 
SOURCE(2744, 437)
   {
      word tmpAddr27;
      tmpAddr27 = (word) (( (ptr) &var←c29220)+6)/* var←c27140 */ ;
      (*  (ptr) tmpAddr27 ) = ( ((word)  (fPt) DoSelectSlice←P2160) );
      (* (( (ptr) tmpAddr27) + 1) ) = 1;
      };
SOURCE(2932, 52)
   {
      word var←c27204;
      word pd28;
      pd28 = (* (( (ptr) (* (( (ptr) gf←c29252)+87)/* var←c27172 */  ))+31) );
      var←c27204 = (word) ( *( (fPt) ((*  (ptr) pd28 ))))(var←c29220.f4/* scene←v5484 */ , 0, (word) (( (bPt) &var←c29220)+24)/* var←c27140 */ , 0, pd28)
      ;
      };
SOURCE(2986, 195)
   if ((var←c29220.f5/* selectClass←v5512 */  == 0)) {
SOURCE(3017, 164)
      if (((* (( (ptr) var←c29220.f4/* scene←v5484 */ )+6) ) == 0) || ((* (( (ptr) (* (( (ptr) var←c29220.f4/* scene←v5484 */ )+6)
          ))+1) ) != 0)) {
SOURCE(3089, 37)
         (* (( (ptr) var←c29220.f4/* scene←v5484 */ )+9) ) = 0;
         }
      else {
SOURCE(3126, 55)
         (* (( (ptr) var←c29220.f4/* scene←v5484 */ )+9) ) = (*  (ptr) (* (( (ptr) var←c29220.f4/* scene←v5484 */ )+6) ) );
         };
      };
   }

static word DoSelectSlice←P2160(slice←v10304, formal←c29284)
   word slice←v10304;
   word formal←c29284;
   {
   word done←v10348;
   formal←c29284 = (formal←c29284 - 24);
   /* DoSelectSlice: */ 
SOURCE(2815, 112)
SOURCE(2815, 112)
   done←v10348 = 0;
SOURCE(2883, 44)
   (void) SelectEntireSlice←P360(slice←v10304, (* (( (ptr) formal←c29284)+4) ), (* (( (ptr) formal←c29284)+5) ));
SOURCE(2815, 112)
   return(done←v10348);
   }

static void SelectSliceFromParts←P240(slice←v5572, parts←v5600, scene←v5628, selectClass←v5656)
   word slice←v5572;
   word parts←v5600;
   word scene←v5628;
   word selectClass←v5656;
   {
   register ptr gf←c29316 =  (ptr) &globalframe;
   word sliceD←v10376;
   /* SelectSliceFromParts: */ 
SOURCE(3190, 336)
SOURCE(3305, 67)
   {
      word pd29;
      pd29 = (* (( (ptr) (* (( (ptr) gf←c29316)+88)/* var←c27236 */  ))+8) );
      sliceD←v10376 = (word) ( *( (fPt) ((*  (ptr) pd29 ))))(slice←v5572, parts←v5600, pd29);
      };
SOURCE(3374, 39)
   (void) SelectSlice←P300(sliceD←v10376, scene←v5628, selectClass←v5656);
SOURCE(3415, 111)
   if ((selectClass←v5656 == 0)) {
SOURCE(3444, 82)
      {
         word pd30;
         pd30 = (* (( (ptr) (* (( (ptr) gf←c29316)+89)/* var←c27268 */  ))+84) );
         (* (( (ptr) scene←v5628)+9) ) = (word) ( *( (fPt) ((*  (ptr) pd30 ))))(sliceD←v10376, pd30);
         };
      };
   }

static void SelectSlice←P300(sliceD←v5716, scene←v5744, selectClass←v5772)
   word sliceD←v5716;
   word scene←v5744;
   word selectClass←v5772;
   {
   register ptr gf←c29348 =  (ptr) &globalframe;
   word oldSliceD←v10420 = 0;
   word union←v10448 = 0;
   /* SelectSlice: */ 
SOURCE(3532, 806)
SOURCE(3665, 82)
   {
      word pd32;
      if ((sliceD←v5716 == 0)) { goto then031;};
      if (((* (( (ptr) sliceD←v5716)+1) ) == 0)) { goto then031;};
      pd32 = (* (( (ptr) (* (( (ptr) gf←c29348)+90)/* var←c27300 */  ))+27) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd32 ))))(sliceD←v5716, pd32))) {
         then031: ;
SOURCE(3741, 6)
         return;
         };
      };
SOURCE(3749, 63)
   {
      word pd33;
      pd33 = (* (( (ptr) (* (( (ptr) gf←c29348)+89)/* var←c27268 */  ))+84) );
      sliceD←v5716 = (word) ( *( (fPt) ((*  (ptr) pd33 ))))(sliceD←v5716, pd33);
      };
SOURCE(3814, 56)
   oldSliceD←v10420 = (word) FindSelectedSlice←P1860((*  (ptr) sliceD←v5716 ), selectClass←v5772);
SOURCE(3872, 189)
   if ((oldSliceD←v10420 != 0)) {
SOURCE(3896, 48)
      {
         word pd34;
         pd34 = (* (( (ptr) (* (( (ptr) gf←c29348)+90)/* var←c27300 */  ))+30) );
         union←v10448 = (word) ( *( (fPt) ((*  (ptr) pd34 ))))(oldSliceD←v10420, sliceD←v5716, pd34);
         };
SOURCE(3946, 64)
      (void) DeselectSlice←P780((*  (ptr) sliceD←v5716 ), (* (( (ptr) oldSliceD←v10420)+1) ), scene←v5744, selectClass←v5772);
      }
   else {
SOURCE(4047, 14)
      union←v10448 = sliceD←v5716;
      };
SOURCE(4063, 80)
   if ((selectClass←v5772 == 0)) {
SOURCE(4092, 51)
      {
         word pd35;
         pd35 = (* (( (ptr) (* (( (ptr) gf←c29348)+90)/* var←c27300 */  ))+33) );
         union←v10448 = (word) ( *( (fPt) ((*  (ptr) pd35 ))))(union←v10448, selectClass←v5772, pd35);
         };
      };
SOURCE(4145, 42)
   (void) AppendSelection←P1440(scene←v5744, union←v10448, selectClass←v5772);
SOURCE(4189, 36)
   (void) ChangeDonkeyTail←P60(union←v10448, selectClass←v5772);
SOURCE(4227, 111)
   if ((selectClass←v5772 == 0)) {
SOURCE(4256, 82)
      {
         word pd36;
         pd36 = (* (( (ptr) (* (( (ptr) gf←c29348)+89)/* var←c27268 */  ))+84) );
         (* (( (ptr) scene←v5744)+9) ) = (word) ( *( (fPt) ((*  (ptr) pd36 ))))(sliceD←v5716, pd36);
         };
      };
   }

static void SelectEntireSlice←P360(slice←v5832, scene←v5860, selectClass←v5888)
   word slice←v5832;
   word scene←v5860;
   word selectClass←v5888;
   {
   register ptr gf←c29380 =  (ptr) &globalframe;
   word allParts←v10492;
   /* SelectEntireSlice: */ 
SOURCE(4363, 202)
SOURCE(4456, 66)
   {
      word pd37;
      pd37 = (* (( (ptr) (* (( (ptr) gf←c29380)+90)/* var←c27300 */  ))+29) );
      allParts←v10492 = (word) ( *( (fPt) ((*  (ptr) pd37 ))))(slice←v5832, 0, 6, pd37);
      };
SOURCE(4524, 41)
   (void) SelectSlice←P300(allParts←v10492, scene←v5860, selectClass←v5888);
   }

static void DuplicateSelections←P420(formal←c0287, fromClass←v5976, formal←c0288)
   word formal←c0287;
   word fromClass←v5976;
   word formal←c0288;
   {
   W8 var←c29412;
   /* declaration of scene←v5948 skipped */ 
   /* declaration of toClass←v6004 skipped */ 
   register ptr gf←c29444 =  (ptr) &globalframe;
   /* declaration of var←c27332 skipped */ 
   var←c29412.f4/* scene←v5948 */  = formal←c0287;
   var←c29412.f5/* toClass←v6004 */  = formal←c0288;
   /* DuplicateSelections: */ 
SOURCE(4570, 328)
   {
      word tmpAddr38;
      tmpAddr38 = (word) (( (ptr) &var←c29412)+6)/* var←c27332 */ ;
      (*  (ptr) tmpAddr38 ) = ( ((word)  (fPt) DoSelectSlice←P2220) );
      (* (( (ptr) tmpAddr38) + 1) ) = 1;
      };
SOURCE(4793, 32)
   if ((fromClass←v5976 == var←c29412.f5/* toClass←v6004 */ )) {
SOURCE(4819, 6)
      return;
      };
SOURCE(4827, 71)
   {
      word var←c27364;
      word pd39;
      pd39 = (* (( (ptr) (* (( (ptr) gf←c29444)+87)/* var←c27172 */  ))+32) );
      var←c27364 = (word) ( *( (fPt) ((*  (ptr) pd39 ))))(var←c29412.f4/* scene←v5948 */ , 0, (word) (( (bPt) &var←c29412)+24)/* var←c27332 */ , fromClass←v5976, 0, pd39)
      ;
      };
   }

static word DoSelectSlice←P2220(sliceD←v10612, formal←c29476)
   word sliceD←v10612;
   word formal←c29476;
   {
   word done←v10656;
   formal←c29476 = (formal←c29476 - 24);
   /* DoSelectSlice: */ 
SOURCE(4674, 114)
SOURCE(4674, 114)
   done←v10656 = 0;
SOURCE(4753, 35)
   (void) SelectSlice←P300(sliceD←v10612, (* (( (ptr) formal←c29476)+4) ), (* (( (ptr) formal←c29476)+5) ));
SOURCE(4674, 114)
   return(done←v10656);
   }

static void DeselectEntity←P480(entity←v6064, scene←v6092, selectClass←v6120)
   word entity←v6064;
   word scene←v6092;
   word selectClass←v6120;
   {
   register ptr gf←c29508 =  (ptr) &globalframe;
   /* DeselectEntity: */ 
SOURCE(4904, 269)
SOURCE(4997, 176)
   {
      word var←c27396;
      word var←c27428;
      var←c27396 = entity←v6064;
      if ((var←c27396 == 0)) {
         goto lab←L100000;
         };
      var←c27428 = XR←GetReferentType(var←c27396);
      if (((* (( (ptr) gf←c29508)+8) ) == var←c27428)) {
         {
            word slice←v10684;
            slice←v10684 = var←c27396;
SOURCE(5037, 46)
            (void) DeselectEntireSlice←P720(slice←v10684, scene←v6092, selectClass←v6120);
            };
         }
      else {
         if (((* (( (ptr) gf←c29508)+9) ) == var←c27428)) {
            {
               word sliceD←v10728;
               sliceD←v10728 = var←c27396;
SOURCE(5112, 61)
               (void) DeselectSlice←P780((*  (ptr) sliceD←v10728 ), (* (( (ptr) sliceD←v10728)+1) ), scene←v6092, selectClass←v6120);
               };
            }
         else {
            lab←L100000: ;
SOURCE(5186, 5)
            (void) XR←RaiseUnnamedError();
            };
         };
      };
   }

static void DeselectEntityAllClasses←P540(entity←v6196, scene←v6224)
   word entity←v6196;
   word scene←v6224;
   {
   /* DeselectEntityAllClasses: */ 
SOURCE(5197, 224)
SOURCE(5271, 37)
   (void) DeselectEntity←P480(entity←v6196, scene←v6224, 0);
SOURCE(5310, 37)
   (void) DeselectEntity←P480(entity←v6196, scene←v6224, 2);
SOURCE(5349, 34)
   (void) DeselectEntity←P480(entity←v6196, scene←v6224, 1);
SOURCE(5385, 36)
   (void) DeselectEntity←P480(entity←v6196, scene←v6224, 3);
   }

static void DeselectAll←P600(scene←v6296, selectClass←v6324)
   word scene←v6296;
   word selectClass←v6324;
   {
   /* DeselectAll: */ 
SOURCE(5427, 275)
SOURCE(5500, 151)
   {
      register word sliceD←v10772;
      sliceD←v10772 = (word) ListSelected←P1200(scene←v6296, selectClass←v6324);
      lab←L100004: ;
      if ((sliceD←v10772 != 0)) {
         }
      else {
         goto lab←L100001;
         };
SOURCE(5606, 45)
      (void) NoDonkeyTail←P120((*  (ptr) (*  (ptr) sliceD←v10772 ) ), selectClass←v6324);
      sliceD←v10772 = (* (( (ptr) sliceD←v10772)+1) );
      goto lab←L100004;
      lab←L100001: ;
      };
SOURCE(5662, 40)
   (void) SetSelectedList←P1560(scene←v6296, 0, selectClass←v6324);
   }

static void DeselectAllAllClasses←P660(scene←v6384)
   word scene←v6384;
   {
   /* DeselectAllAllClasses: */ 
SOURCE(5708, 160)
SOURCE(5762, 26)
   (void) DeselectAll←P600(scene←v6384, 0);
SOURCE(5790, 26)
   (void) DeselectAll←P600(scene←v6384, 2);
SOURCE(5818, 23)
   (void) DeselectAll←P600(scene←v6384, 1);
SOURCE(5843, 25)
   (void) DeselectAll←P600(scene←v6384, 3);
   }

static void DeselectEntireSlice←P720(slice←v6444, scene←v6472, selectClass←v6500)
   word slice←v6444;
   word scene←v6472;
   word selectClass←v6500;
   {
   register ptr gf←c29540 =  (ptr) &globalframe;
   /* DeselectEntireSlice: */ 
SOURCE(5874, 593)
SOURCE(5969, 498)
   {
      word pd40;
      pd40 = (* (( (ptr) (* (( (ptr) gf←c29540)+87)/* var←c27172 */  ))+39) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd40 ))))(slice←v6444, pd40))) {
SOURCE(6003, 325)
         {
            word sliceD←v10900;
SOURCE(6005, 63)
            sliceD←v10900 = (word) FindSelectedSlice←P1860(slice←v6444, selectClass←v6500);
SOURCE(6070, 107)
            if ((sliceD←v10900 != 0)) {
SOURCE(6093, 43)
               (void) DeleteSelection←P1140(scene←v6472, sliceD←v10900, selectClass←v6500);
SOURCE(6138, 39)
               (void) NoDonkeyTail←P120((*  (ptr) sliceD←v10900 ), selectClass←v6500);
               };
SOURCE(6182, 144)
            if ((selectClass←v6500 == 0)) {
SOURCE(6211, 115)
               if ( ( ((* (( (ptr) scene←v6472)+9) ) != 0) ? ((*  (ptr) (* (( (ptr) scene←v6472)+9) ) ) == slice←v6444) : 0 ) ) {
SOURCE(6295, 31)
                  (* (( (ptr) scene←v6472)+9) ) = 0;
                  };
               };
            };
         }
      else {
SOURCE(6335, 134)
         {
            word entireD←v10944;
SOURCE(6337, 65)
            {
               word pd41;
               pd41 = (* (( (ptr) (* (( (ptr) gf←c29540)+90)/* var←c27300 */  ))+29) );
               entireD←v10944 = (word) ( *( (fPt) ((*  (ptr) pd41 ))))(slice←v6444, 0, 6, pd41);
               };
SOURCE(6404, 63)
            (void) DeselectSlice←P780((*  (ptr) entireD←v10944 ), (* (( (ptr) entireD←v10944)+1) ), scene←v6472, selectClass←v6500);
            };
         };
      };
   }

static void DeselectSlice←P780(slice←v6560, parts←v6588, scene←v6616, selectClass←v6644)
   word slice←v6560;
   word parts←v6588;
   word scene←v6616;
   word selectClass←v6644;
   {
   register ptr gf←c29572 =  (ptr) &globalframe;
   word oldD←v10988 = 0;
   word newD←v11016 = 0;
   word tempD←v11044 = 0;
   /* DeselectSlice: */ 
SOURCE(6476, 996)
SOURCE(6620, 49)
   {
      word pd42;
      pd42 = (* (( (ptr) (* (( (ptr) gf←c29572)+88)/* var←c27236 */  ))+8) );
      tempD←v11044 = (word) ( *( (fPt) ((*  (ptr) pd42 ))))(slice←v6560, parts←v6588, pd42);
      };
SOURCE(6671, 61)
   {
      word pd43;
      pd43 = (* (( (ptr) (* (( (ptr) gf←c29572)+89)/* var←c27268 */  ))+84) );
      tempD←v11044 = (word) ( *( (fPt) ((*  (ptr) pd43 ))))(tempD←v11044, pd43);
      };
SOURCE(6734, 50)
   oldD←v10988 = (word) FindSelectedSlice←P1860((*  (ptr) tempD←v11044 ), selectClass←v6644);
SOURCE(6786, 686)
   if ((oldD←v10988 != 0)) {
SOURCE(6805, 46)
      {
         word pd44;
         pd44 = (* (( (ptr) (* (( (ptr) gf←c29572)+90)/* var←c27300 */  ))+31) );
         newD←v11016 = (word) ( *( (fPt) ((*  (ptr) pd44 ))))(oldD←v10988, tempD←v11044, pd44);
         };
SOURCE(6853, 41)
      (void) DeleteSelection←P1140(scene←v6616, oldD←v10988, selectClass←v6644);
SOURCE(6896, 37)
      (void) NoDonkeyTail←P120((*  (ptr) oldD←v10988 ), selectClass←v6644);
SOURCE(6935, 202)
      {
         word pd45;
         pd45 = (* (( (ptr) (* (( (ptr) gf←c29572)+90)/* var←c27300 */  ))+27) );
         if ((0 == (word) ( *( (fPt) ((*  (ptr) pd45 ))))(newD←v11016, pd45))) {
SOURCE(6979, 78)
            if ((selectClass←v6644 == 0)) {
SOURCE(7008, 49)
               {
                  word pd46;
                  pd46 = (* (( (ptr) (* (( (ptr) gf←c29572)+90)/* var←c27300 */  ))+33) );
                  newD←v11016 = (word) ( *( (fPt) ((*  (ptr) pd46 ))))(newD←v11016, selectClass←v6644, pd46);
                  };
               };
SOURCE(7059, 41)
            (void) AppendSelection←P1440(scene←v6616, newD←v11016, selectClass←v6644);
SOURCE(7102, 35)
            (void) ChangeDonkeyTail←P60(newD←v11016, selectClass←v6644);
            };
         };
SOURCE(7142, 330)
      if ((selectClass←v6644 == 0)) {
SOURCE(7173, 172)
         if ( ( ((* (( (ptr) scene←v6616)+9) ) != 0) ? ((*  (ptr) (* (( (ptr) scene←v6616)+9) ) ) == slice←v6560) : 0 ) ) {
SOURCE(7257, 88)
            {
               word pd47;
               pd47 = (* (( (ptr) (* (( (ptr) gf←c29572)+90)/* var←c27300 */  ))+31) );
               (* (( (ptr) scene←v6616)+9) ) = (word) ( *( (fPt) ((*  (ptr) pd47 ))))((* (( (ptr) scene←v6616)+9) ), tempD←v11044, pd47)
               ;
               };
            };
SOURCE(7347, 125)
         {
            word pd49;
            if (((* (( (ptr) scene←v6616)+9) ) == 0)) { goto then048;};
            pd49 = (* (( (ptr) (* (( (ptr) gf←c29572)+90)/* var←c27300 */  ))+27) );
            if ((0 != (word) ( *( (fPt) ((*  (ptr) pd49 ))))((* ((( (ptr) scene←v6616)+9)) ), pd49))) {
               then048: ;
SOURCE(7441, 31)
               (* (( (ptr) scene←v6616)+9) ) = 0;
               };
            };
         };
      };
   }

static void DeselectTraj←P840(traj←v6704, scene←v6732, selectClass←v6760)
   word traj←v6704;
   word scene←v6732;
   word selectClass←v6760;
   {
   register ptr gf←c29604 =  (ptr) &globalframe;
   word ancestor←v11088;
   word oldD←v11116;
   /* DeselectTraj: */ 
SOURCE(7484, 808)
SOURCE(7564, 52)
   {
      word pd50;
      pd50 = (* (( (ptr) (* (( (ptr) gf←c29604)+89)/* var←c27268 */  ))+65) );
      ancestor←v11088 = (word) ( *( (fPt) ((*  (ptr) pd50 ))))(traj←v6704, pd50);
      };
SOURCE(7618, 64)
   oldD←v11116 = (word) FindSelectedSlice←P1860(ancestor←v11088, selectClass←v6760);
SOURCE(7684, 608)
   if ((oldD←v11116 != 0)) {
SOURCE(7701, 596)
      {
         word newD←v11160;
SOURCE(7703, 55)
         {
            word pd51;
            pd51 = (* (( (ptr) (* (( (ptr) gf←c29604)+89)/* var←c27268 */  ))+86) );
            newD←v11160 = (word) ( *( (fPt) ((*  (ptr) pd51 ))))(oldD←v11116, traj←v6704, pd51);
            };
SOURCE(7760, 41)
         (void) DeleteSelection←P1140(scene←v6732, oldD←v11116, selectClass←v6760);
SOURCE(7803, 35)
         (void) NoDonkeyTail←P120(ancestor←v11088, selectClass←v6760);
SOURCE(7840, 122)
         {
            word pd52;
            pd52 = (* (( (ptr) (* (( (ptr) gf←c29604)+90)/* var←c27300 */  ))+27) );
            if ((0 == (word) ( *( (fPt) ((*  (ptr) pd52 ))))(newD←v11160, pd52))) {
SOURCE(7884, 41)
               (void) AppendSelection←P1440(scene←v6732, newD←v11160, selectClass←v6760);
SOURCE(7927, 35)
               (void) ChangeDonkeyTail←P60(newD←v11160, selectClass←v6760);
               };
            };
SOURCE(7967, 325)
         if ((selectClass←v6760 == 0)) {
SOURCE(7996, 296)
            if ( ( ((* (( (ptr) scene←v6732)+9) ) != 0) ? ((*  (ptr) (* (( (ptr) scene←v6732)+9) ) ) == ancestor←v11088) : 0 ) ) {
SOURCE(8085, 80)
               {
                  word pd53;
                  pd53 = (* (( (ptr) (* (( (ptr) gf←c29604)+89)/* var←c27268 */  ))+86) );
                  (* (( (ptr) scene←v6732)+9) ) = (word) ( *( (fPt) ((*  (ptr) pd53 ))))((* (( (ptr) scene←v6732)+9) ), traj←v6704, pd53);
                  };
SOURCE(8167, 125)
               {
                  word pd55;
                  if (((* (( (ptr) scene←v6732)+9) ) == 0)) { goto then054;};
                  pd55 = (* (( (ptr) (* (( (ptr) gf←c29604)+90)/* var←c27300 */  ))+27) );
                  if ((0 != (word) ( *( (fPt) ((*  (ptr) pd55 ))))((* ((( (ptr) scene←v6732)+9)) ), pd55))) {
                     then054: ;
SOURCE(8261, 31)
                     (* (( (ptr) scene←v6732)+9) ) = 0;
                     };
                  };
               };
            };
         };
      };
   }

static void SaveSelectionsInSliceAllClasses←P900(slice←v6820, scene←v6848)
   word slice←v6820;
   word scene←v6848;
   {
   register ptr gf←c29636 =  (ptr) &globalframe;
   word sliceD←v11204 = 0;
   /* SaveSelectionsInSliceAllClasses: */ 
SOURCE(8303, 609)
SOURCE(8406, 41)
   sliceD←v11204 = (word) FindSelectedSlice←P1860(slice←v6820, 0);
SOURCE(8449, 84)
   {
      word pd56;
      pd56 = (* (( (ptr) (* (( (ptr) gf←c29636)+90)/* var←c27300 */  ))+20) );
      (void) ( *( (fPt) ((*  (ptr) pd56 ))))(slice←v6820,  ( (sliceD←v11204 == 0) ? 0 : (* (( (ptr) sliceD←v11204)+1) ) ) , 0, pd56)
      ;
      };
SOURCE(8535, 38)
   sliceD←v11204 = (word) FindSelectedSlice←P1860(slice←v6820, 1);
SOURCE(8575, 81)
   {
      word pd57;
      pd57 = (* (( (ptr) (* (( (ptr) gf←c29636)+90)/* var←c27300 */  ))+20) );
      (void) ( *( (fPt) ((*  (ptr) pd57 ))))(slice←v6820,  ( (sliceD←v11204 == 0) ? 0 : (* (( (ptr) sliceD←v11204)+1) ) ) , 1, pd57)
      ;
      };
SOURCE(8658, 41)
   sliceD←v11204 = (word) FindSelectedSlice←P1860(slice←v6820, 2);
SOURCE(8701, 84)
   {
      word pd58;
      pd58 = (* (( (ptr) (* (( (ptr) gf←c29636)+90)/* var←c27300 */  ))+20) );
      (void) ( *( (fPt) ((*  (ptr) pd58 ))))(slice←v6820,  ( (sliceD←v11204 == 0) ? 0 : (* (( (ptr) sliceD←v11204)+1) ) ) , 2, pd58)
      ;
      };
SOURCE(8787, 40)
   sliceD←v11204 = (word) FindSelectedSlice←P1860(slice←v6820, 3);
SOURCE(8829, 83)
   {
      word pd59;
      pd59 = (* (( (ptr) (* (( (ptr) gf←c29636)+90)/* var←c27300 */  ))+20) );
      (void) ( *( (fPt) ((*  (ptr) pd59 ))))(slice←v6820,  ( (sliceD←v11204 == 0) ? 0 : (* (( (ptr) sliceD←v11204)+1) ) ) , 3, pd59)
      ;
      };
   }

static word RemakeSelections←P960(slice←v6908, scene←v6936, selectClass←v6964)
   word slice←v6908;
   word scene←v6936;
   word selectClass←v6964;
   {
   register ptr gf←c29668 =  (ptr) &globalframe;
   word isTopLevel←v7008;
   word parts←v11248;
   /* RemakeSelections: */ 
SOURCE(8918, 374)
SOURCE(8918, 374)
   isTopLevel←v7008 = 0;
SOURCE(9038, 67)
   {
      word pd60;
      pd60 = (* (( (ptr) (* (( (ptr) gf←c29668)+90)/* var←c27300 */  ))+21) );
      parts←v11248 = (word) ( *( (fPt) ((*  (ptr) pd60 ))))(slice←v6908, selectClass←v6964, pd60);
      };
SOURCE(9107, 185)
   {
      word pd61;
      pd61 = (* (( (ptr) (* (( (ptr) gf←c29668)+87)/* var←c27172 */  ))+39) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd61 ))))(slice←v6908, pd61))) {
SOURCE(9143, 46)
         (void) DeselectEntireSlice←P720(slice←v6908, scene←v6936, selectClass←v6964);
SOURCE(9219, 54)
         (void) SelectSliceFromParts←P240(slice←v6908, parts←v11248, scene←v6936, selectClass←v6964);
SOURCE(9275, 17)
         isTopLevel←v7008 = 1;
         };
      };
SOURCE(8918, 374)
   return(isTopLevel←v7008);
   }

static void ReselectSliceAllClasses←P1020(slice←v7068, scene←v7096)
   word slice←v7068;
   word scene←v7096;
   {
   /* ReselectSliceAllClasses: */ 
SOURCE(9301, 244)
SOURCE(9371, 43)
   {
      word var←c27460;
      var←c27460 = (word) RemakeSelections←P960(slice←v7068, scene←v7096, 0);
      };
SOURCE(9416, 40)
   {
      word var←c27492;
      var←c27492 = (word) RemakeSelections←P960(slice←v7068, scene←v7096, 1);
      };
SOURCE(9458, 43)
   {
      word var←c27524;
      var←c27524 = (word) RemakeSelections←P960(slice←v7068, scene←v7096, 2);
      };
SOURCE(9503, 42)
   {
      word var←c27556;
      var←c27556 = (word) RemakeSelections←P960(slice←v7068, scene←v7096, 3);
      };
   }

static word ReselectTraj←P1080(traj←v7156, trajEnd←v7184, scene←v7212, extend←v7240)
   word traj←v7156;
   word trajEnd←v7184;
   word scene←v7212;
   word extend←v7240;
   {
   register ptr gf←c29700 =  (ptr) &globalframe;
   word newHot←v7284;
   word newTrajD←v11292 = 0;
   word selSeq←v11320 = 0;
   word newSeqParts←v11348 = 0;
   word newHotParts←v11376 = 0;
   /* ReselectTraj: */ 
SOURCE(9551, 787)
SOURCE(9551, 787)
   newHot←v7284 = 0;
SOURCE(9750, 50)
   selSeq←v11320 = (word) FindSelectedSequence←P1800(traj←v7156, scene←v7212, 0);
SOURCE(9802, 218)
   if ((selSeq←v11320 != 0)) {
SOURCE(9823, 57)
      {
         word pd62;
         pd62 = (* (( (ptr) (* (( (ptr) gf←c29700)+91)/* var←c27588 */  ))+24) );
         newSeqParts←v11348 = (word) ( *( (fPt) ((*  (ptr) pd62 ))))(selSeq←v11320, trajEnd←v7184, extend←v7240, pd62);
         };
SOURCE(9882, 41)
      (void) DeselectTraj←P840((*  (ptr) selSeq←v11320 ), scene←v7212, 0);
SOURCE(9925, 57)
      {
         word pd63;
         pd63 = (* (( (ptr) (* (( (ptr) gf←c29700)+88)/* var←c27236 */  ))+8) );
         newTrajD←v11292 = (word) ( *( (fPt) ((*  (ptr) pd63 ))))(traj←v7156, newSeqParts←v11348, pd63);
         };
SOURCE(9984, 36)
      (void) SelectSlice←P300(newTrajD←v11292, scene←v7212, 0);
      };
SOURCE(10025, 47)
   selSeq←v11320 = (word) FindSelectedSequence←P1800(traj←v7156, scene←v7212, 1);
SOURCE(10074, 264)
   if ((selSeq←v11320 != 0)) {
SOURCE(10095, 71)
      {
         word var←c27620;
         {
            word pd64;
            pd64 = (* (( (ptr) (* (( (ptr) gf←c29700)+91)/* var←c27588 */  ))+24) );
            var←c27620 = (word) ( *( (fPt) ((*  (ptr) pd64 ))))(selSeq←v11320, trajEnd←v7184, extend←v7240, pd64);
            };
         newSeqParts←v11348 = var←c27620;
         newHotParts←v11376 = var←c27620;
         };
SOURCE(10168, 38)
      (void) DeselectTraj←P840((*  (ptr) selSeq←v11320 ), scene←v7212, 1);
SOURCE(10237, 66)
      {
         word var←c27652;
         {
            word pd65;
            pd65 = (* (( (ptr) (* (( (ptr) gf←c29700)+88)/* var←c27236 */  ))+8) );
            var←c27652 = (word) ( *( (fPt) ((*  (ptr) pd65 ))))(traj←v7156, newSeqParts←v11348, pd65);
            };
         newHot←v7284 = var←c27652;
         newTrajD←v11292 = var←c27652;
         };
SOURCE(10305, 33)
      (void) SelectSlice←P300(newTrajD←v11292, scene←v7212, 1);
      };
SOURCE(9551, 787)
   return(newHot←v7284);
   }

static void DeleteSelection←P1140(scene←v7344, entity←v7372, selectClass←v7400)
   word scene←v7344;
   word entity←v7372;
   word selectClass←v7400;
   {
   /* DeleteSelection: */ 
SOURCE(10347, 181)
SOURCE(10442, 86)
   {
      word var←c27684;
      {
         word var←c27716;
         var←c27716 = (word) ListSelected←P1200(scene←v7344, selectClass←v7400);
         var←c27684 = (word) DRemove←P2100(entity←v7372, var←c27716);
         };
      (void) SetSelectedList←P1560(scene←v7344, var←c27684, selectClass←v7400);
      };
   }

static word ListSelected←P1200(scene←v7460, selectClass←v7488)
   word scene←v7460;
   word selectClass←v7488;
   {
   word selectedList←v7532;
   /* ListSelected: */ 
SOURCE(10534, 328)
SOURCE(10534, 328)
   selectedList←v7532 = 0;
SOURCE(10656, 206)
   {
      word var←c27748;
      var←c27748 = selectClass←v7488;
      switch (var←c27748) {
         case 0: 
SOURCE(10690, 36)
            selectedList←v7532 = (* (( (ptr) scene←v7460)+6) );
            break;
         case 1: 
SOURCE(10735, 33)
            selectedList←v7532 = (* (( (ptr) scene←v7460)+10) );
            break;
         case 2: 
SOURCE(10780, 36)
            selectedList←v7532 = (* (( (ptr) scene←v7460)+13) );
            break;
         case 3: 
SOURCE(10827, 35)
            selectedList←v7532 = (* (( (ptr) scene←v7460)+16) );
            break;
         default: 
SOURCE(10875, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
SOURCE(10534, 328)
   return(selectedList←v7532);
   }

static void SetSelected←P1260(scene←v7676, selectClass←v7704, selected←v7732)
   word scene←v7676;
   word selectClass←v7704;
   word selected←v7732;
   {
   /* SetSelected: */ 
SOURCE(10886, 227)
SOURCE(10994, 119)
   {
      register word list←v11420;
      list←v11420 = selected←v7732;
      lab←L100008: ;
      if ((list←v11420 != 0)) {
         }
      else {
         goto lab←L100005;
         };
SOURCE(11070, 43)
      (void) SelectSlice←P300((*  (ptr) list←v11420 ), scene←v7676, selectClass←v7704);
      list←v11420 = (* (( (ptr) list←v11420)+1) );
      goto lab←L100008;
      lab←L100005: ;
      };
   }

static void SetJointField←P1320(joint←v7876, selected←v7904, selectClass←v7932)
   word joint←v7876;
   word selected←v7904;
   word selectClass←v7932;
   {
   /* SetJointField: */ 
SOURCE(11128, 303)
SOURCE(11213, 218)
   {
      word var←c27780;
      var←c27780 = selectClass←v7932;
      switch (var←c27780) {
         case 0: 
SOURCE(11247, 39)
            (* (( (ptr) joint←v7876)+2) ) = selected←v7904;
            break;
         case 1: 
SOURCE(11295, 36)
            (* (( (ptr) joint←v7876)+3) ) = selected←v7904;
            break;
         case 2: 
SOURCE(11343, 39)
            (* (( (ptr) joint←v7876)+4) ) = selected←v7904;
            break;
         case 3: 
SOURCE(11393, 38)
            (* (( (ptr) joint←v7876)+5) ) = selected←v7904;
            break;
         };
      };
   }

static void SetSegmentField←P1380(seg←v7992, selected←v8020, selectClass←v8048)
   word seg←v7992;
   word selected←v8020;
   word selectClass←v8048;
   {
   /* SetSegmentField: */ 
SOURCE(11446, 297)
SOURCE(11533, 210)
   {
      word var←c27812;
      var←c27812 = selectClass←v8048;
      switch (var←c27812) {
         case 0: 
SOURCE(11567, 37)
            (* (( (ptr) seg←v7992)+17) ) = selected←v8020;
            break;
         case 1: 
SOURCE(11613, 34)
            (* (( (ptr) seg←v7992)+18) ) = selected←v8020;
            break;
         case 2: 
SOURCE(11659, 37)
            (* (( (ptr) seg←v7992)+19) ) = selected←v8020;
            break;
         case 3: 
SOURCE(11707, 36)
            (* (( (ptr) seg←v7992)+20) ) = selected←v8020;
            break;
         };
      };
   }

static void AppendSelection←P1440(scene←v8108, entity←v8136, selectClass←v8164)
   word scene←v8108;
   word entity←v8136;
   word selectClass←v8164;
   {
   register ptr gf←c29732 =  (ptr) &globalframe;
   /* AppendSelection: */ 
SOURCE(11758, 2267)
SOURCE(11853, 2172)
   {
      word var←c27844;
      var←c27844 = selectClass←v8164;
      switch (var←c27844) {
         case 0: 
SOURCE(11889, 535)
            if (((* (( (ptr) scene←v8108)+6) ) == 0)) {
SOURCE(11927, 36)
               {
                  word var←c27876;
                  word var←c27908;
                  var←c27876 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                  var←c27908 = var←c27876;
                  (*  (ptr) var←c27908 ) = entity←v8136;
                  (* (( (ptr) scene←v8108)+6) ) = var←c27876;
                  };
SOURCE(11965, 48)
               (* (( (ptr) scene←v8108)+7) ) = (* (( (ptr) scene←v8108)+6) );
SOURCE(12015, 36)
               (* (( (ptr) scene←v8108)+8) ) = 1;
               }
            else {
SOURCE(12060, 364)
               if ((0 != (* (( (ptr) scene←v8108)+8) ))) {
SOURCE(12100, 44)
                  {
                     word var←c27940;
                     word var←c27972;
                     var←c27940 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c27972 = var←c27940;
                     (*  (ptr) var←c27972 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+7) ))+1) ) = var←c27940;
                     };
SOURCE(12146, 56)
                  (* (( (ptr) scene←v8108)+7) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+7) ))+1) );
                  }
               else {
SOURCE(12213, 69)
                  (* (( (ptr) scene←v8108)+7) ) = (word) LastSliceDescriptor←P1500((* ((( (ptr) scene←v8108)+6)) ));
SOURCE(12284, 44)
                  {
                     word var←c28004;
                     word var←c28036;
                     var←c28004 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28036 = var←c28004;
                     (*  (ptr) var←c28036 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+7) ))+1) ) = var←c28004;
                     };
SOURCE(12330, 56)
                  (* (( (ptr) scene←v8108)+7) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+7) ))+1) );
SOURCE(12388, 36)
                  (* (( (ptr) scene←v8108)+8) ) = 1;
                  };
               };
            break;
         case 1: 
SOURCE(12441, 490)
            if (((* (( (ptr) scene←v8108)+10) ) == 0)) {
SOURCE(12476, 33)
               {
                  word var←c28068;
                  word var←c28100;
                  var←c28068 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                  var←c28100 = var←c28068;
                  (*  (ptr) var←c28100 ) = entity←v8136;
                  (* (( (ptr) scene←v8108)+10) ) = var←c28068;
                  };
SOURCE(12511, 42)
               (* (( (ptr) scene←v8108)+11) ) = (* (( (ptr) scene←v8108)+10) );
SOURCE(12555, 33)
               (* (( (ptr) scene←v8108)+12) ) = 1;
               }
            else {
SOURCE(12597, 334)
               if ((0 != (* (( (ptr) scene←v8108)+12) ))) {
SOURCE(12634, 41)
                  {
                     word var←c28132;
                     word var←c28164;
                     var←c28132 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28164 = var←c28132;
                     (*  (ptr) var←c28164 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+11) ))+1) ) = var←c28132;
                     };
SOURCE(12677, 50)
                  (* (( (ptr) scene←v8108)+11) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+11) ))+1) );
                  }
               else {
SOURCE(12738, 63)
                  (* (( (ptr) scene←v8108)+11) ) = (word) LastSliceDescriptor←P1500((* ((( (ptr) scene←v8108)+10)) ));
SOURCE(12803, 41)
                  {
                     word var←c28196;
                     word var←c28228;
                     var←c28196 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28228 = var←c28196;
                     (*  (ptr) var←c28228 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+11) ))+1) ) = var←c28196;
                     };
SOURCE(12846, 50)
                  (* (( (ptr) scene←v8108)+11) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+11) ))+1) );
SOURCE(12898, 33)
                  (* (( (ptr) scene←v8108)+12) ) = 1;
                  };
               };
            break;
         case 2: 
SOURCE(12951, 535)
            if (((* (( (ptr) scene←v8108)+13) ) == 0)) {
SOURCE(12989, 36)
               {
                  word var←c28260;
                  word var←c28292;
                  var←c28260 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                  var←c28292 = var←c28260;
                  (*  (ptr) var←c28292 ) = entity←v8136;
                  (* (( (ptr) scene←v8108)+13) ) = var←c28260;
                  };
SOURCE(13027, 48)
               (* (( (ptr) scene←v8108)+14) ) = (* (( (ptr) scene←v8108)+13) );
SOURCE(13077, 36)
               (* (( (ptr) scene←v8108)+15) ) = 1;
               }
            else {
SOURCE(13122, 364)
               if ((0 != (* (( (ptr) scene←v8108)+15) ))) {
SOURCE(13162, 44)
                  {
                     word var←c28324;
                     word var←c28356;
                     var←c28324 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28356 = var←c28324;
                     (*  (ptr) var←c28356 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+14) ))+1) ) = var←c28324;
                     };
SOURCE(13208, 56)
                  (* (( (ptr) scene←v8108)+14) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+14) ))+1) );
                  }
               else {
SOURCE(13275, 69)
                  (* (( (ptr) scene←v8108)+14) ) = (word) LastSliceDescriptor←P1500((* ((( (ptr) scene←v8108)+13)) ));
SOURCE(13346, 44)
                  {
                     word var←c28388;
                     word var←c28420;
                     var←c28388 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28420 = var←c28388;
                     (*  (ptr) var←c28420 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+14) ))+1) ) = var←c28388;
                     };
SOURCE(13392, 56)
                  (* (( (ptr) scene←v8108)+14) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+14) ))+1) );
SOURCE(13450, 36)
                  (* (( (ptr) scene←v8108)+15) ) = 1;
                  };
               };
            break;
         case 3: 
SOURCE(13505, 520)
            if (((* (( (ptr) scene←v8108)+16) ) == 0)) {
SOURCE(13542, 35)
               {
                  word var←c28452;
                  word var←c28484;
                  var←c28452 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                  var←c28484 = var←c28452;
                  (*  (ptr) var←c28484 ) = entity←v8136;
                  (* (( (ptr) scene←v8108)+16) ) = var←c28452;
                  };
SOURCE(13579, 46)
               (* (( (ptr) scene←v8108)+17) ) = (* (( (ptr) scene←v8108)+16) );
SOURCE(13627, 35)
               (* (( (ptr) scene←v8108)+18) ) = 1;
               }
            else {
SOURCE(13671, 354)
               if ((0 != (* (( (ptr) scene←v8108)+18) ))) {
SOURCE(13710, 43)
                  {
                     word var←c28516;
                     word var←c28548;
                     var←c28516 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28548 = var←c28516;
                     (*  (ptr) var←c28548 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+17) ))+1) ) = var←c28516;
                     };
SOURCE(13755, 54)
                  (* (( (ptr) scene←v8108)+17) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+17) ))+1) );
                  }
               else {
SOURCE(13820, 67)
                  (* (( (ptr) scene←v8108)+17) ) = (word) LastSliceDescriptor←P1500((* ((( (ptr) scene←v8108)+16)) ));
SOURCE(13889, 43)
                  {
                     word var←c28580;
                     word var←c28612;
                     var←c28580 = XR←NewObject(8, (* (( (ptr) gf←c29732)+10) ));
                     var←c28612 = var←c28580;
                     (*  (ptr) var←c28612 ) = entity←v8136;
                     (* (( (ptr) (* (( (ptr) scene←v8108)+17) ))+1) ) = var←c28580;
                     };
SOURCE(13934, 54)
                  (* (( (ptr) scene←v8108)+17) ) = (* (( (ptr) (* (( (ptr) scene←v8108)+17) ))+1) );
SOURCE(13990, 35)
                  (* (( (ptr) scene←v8108)+18) ) = 1;
                  };
               };
            break;
         default: 
SOURCE(14044, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
   }

static word LastSliceDescriptor←P1500(sliceDList←v8224)
   word sliceDList←v8224;
   {
   register word last←v8352;
   /* LastSliceDescriptor: */ 
SOURCE(14055, 173)
SOURCE(14055, 173)
   last←v8352 = 0;
SOURCE(14163, 65)
   last←v8352 = sliceDList←v8224;
   lab←L100012: ;
   if (((* (( (ptr) last←v8352)+1) ) != 0)) {
      }
   else {
      goto lab←L100009;
      };
   last←v8352 = (* (( (ptr) last←v8352)+1) );
   goto lab←L100012;
   lab←L100009: ;
SOURCE(14055, 173)
   return(last←v8352);
   }

static void SetSelectedList←P1560(scene←v8496, value←v8524, selectClass←v8552)
   word scene←v8496;
   word value←v8524;
   word selectClass←v8552;
   {
   /* SetSelectedList: */ 
SOURCE(14234, 449)
SOURCE(14336, 347)
   {
      word var←c28644;
      var←c28644 = selectClass←v8552;
      switch (var←c28644) {
         case 0: 
SOURCE(14372, 29)
            (* (( (ptr) scene←v8496)+6) ) = value←v8524;
SOURCE(14403, 37)
            (* (( (ptr) scene←v8496)+8) ) = 0;
            break;
         case 1: 
SOURCE(14454, 26)
            (* (( (ptr) scene←v8496)+10) ) = value←v8524;
SOURCE(14482, 34)
            (* (( (ptr) scene←v8496)+12) ) = 0;
            break;
         case 2: 
SOURCE(14533, 29)
            (* (( (ptr) scene←v8496)+13) ) = value←v8524;
SOURCE(14564, 37)
            (* (( (ptr) scene←v8496)+15) ) = 0;
            break;
         case 3: 
SOURCE(14617, 28)
            (* (( (ptr) scene←v8496)+16) ) = value←v8524;
SOURCE(14647, 36)
            (* (( (ptr) scene←v8496)+18) ) = 0;
            break;
         default: 
SOURCE(14699, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
   }

static word IsSelectedInFull←P1620(slice←v8696, scene←v8724, selectClass←v8752)
   word slice←v8696;
   word scene←v8724;
   word selectClass←v8752;
   {
   register ptr gf←c29764 =  (ptr) &globalframe;
   word var←c8796;
   word donkeyTail←v11548;
   /* IsSelectedInFull: */ 
SOURCE(14711, 405)
SOURCE(14818, 210)
   {
      word var←c28676;
      var←c28676 = selectClass←v8752;
      switch (var←c28676) {
         case 3: 
            donkeyTail←v11548 = (* (( (ptr) slice←v8696)+10) );
            break;
         case 2: 
            donkeyTail←v11548 = (* (( (ptr) slice←v8696)+9) );
            break;
         case 1: 
            donkeyTail←v11548 = (* (( (ptr) slice←v8696)+8) );
            break;
         case 0: 
            donkeyTail←v11548 = (* (( (ptr) slice←v8696)+7) );
            break;
         default: 
            donkeyTail←v11548 = (
               XR←RaiseUnnamedError(), 0
               );
            break;
         };
      };
SOURCE(15030, 38)
   if ((donkeyTail←v11548 == 0)) {
SOURCE(15055, 13)
      return(0);
      };
SOURCE(15070, 46)
   {
      word pd66;
      pd66 = (* (( (ptr) (* (( (ptr) gf←c29764)+90)/* var←c27300 */  ))+28) );
      return((word) ( *( (fPt) ((*  (ptr) pd66 ))))(donkeyTail←v11548, pd66));
      };
   }

static word IsSelectedInPart←P1680(entity←v8856, scene←v8884, selectClass←v8912)
   word entity←v8856;
   word scene←v8884;
   word selectClass←v8912;
   {
   register ptr gf←c29796 =  (ptr) &globalframe;
   word var←c8968;
   /* IsSelectedInPart: */ 
SOURCE(15122, 559)
SOURCE(15232, 449)
   {
      word var←c28740;
      word var←c28772;
      var←c28740 = entity←v8856;
      if ((var←c28740 == 0)) {
         goto lab←L100013;
         };
      var←c28772 = XR←GetReferentType(var←c28740);
      {
         word var←c28836;
         var←c28836 = (* (( (ptr) gf←c29796)+8) );
         if ((var←c28836 == var←c28772)) {
            {
               word slice←v11592;
               slice←v11592 = var←c28740;
SOURCE(15272, 89)
               {
                  word sliceD←v11636;
SOURCE(15274, 63)
                  sliceD←v11636 = (word) FindSelectedSlice←P1860(slice←v11592, selectClass←v8912);
SOURCE(15339, 20)
                  return( (unsigned) (sliceD←v11636 != 0));
                  };
               };
            };
         if ((var←c28836 == var←c28772)) {
            {
               word traj←v11680;
               traj←v11680 = var←c28740;
SOURCE(15379, 90)
               {
                  word seq←v11724 = 0;
SOURCE(15396, 52)
                  seq←v11724 = (word) FindSelectedSequence←P1800(traj←v11680, scene←v8884, selectClass←v8912);
SOURCE(15450, 17)
                  return( (unsigned) (seq←v11724 != 0));
                  };
               };
            };
         if (((* (( (ptr) gf←c29796)+9) ) == var←c28772)) {
            {
               word seq←v11768;
               seq←v11768 = var←c28740;
SOURCE(15489, 194)
               {
                  word selSeq←v11812 = 0;
SOURCE(15509, 60)
                  selSeq←v11812 = (word) FindSelectedSequence←P1800((*  (ptr) seq←v11768 ), scene←v8884, selectClass←v8912);
SOURCE(15571, 33)
                  if ((selSeq←v11812 == seq←v11768)) {
SOURCE(15592, 12)
                     return(1);
                     };
SOURCE(15606, 34)
                  if ((selSeq←v11812 == 0)) {
SOURCE(15627, 13)
                     return(0);
                     };
SOURCE(15642, 39)
                  {
                     word pd68;
                     pd68 = (* (( (ptr) (* (( (ptr) gf←c29796)+91)/* var←c27588 */  ))+28) );
                     return((word) ( *( (fPt) ((*  (ptr) pd68 ))))(seq←v11768, selSeq←v11812, pd68));
                     };
                  };
               };
            };
         lab←L100013: ;
SOURCE(15697, 5)
         (void) XR←RaiseUnnamedError();
         goto endif067;
         endif067: ;
         };
      };
   }

static word NoSelections←P1740(scene←v9028, selectClass←v9056)
   word scene←v9028;
   word selectClass←v9056;
   {
   word var←c9100;
   /* NoSelections: */ 
SOURCE(15707, 291)
SOURCE(15796, 202)
   {
      word var←c28868;
      var←c28868 = selectClass←v9056;
      switch (var←c28868) {
         case 0: 
SOURCE(15830, 35)
            return( (unsigned) ((* (( (ptr) scene←v9028)+6) ) == 0));
         case 1: 
SOURCE(15874, 32)
            return( (unsigned) ((* (( (ptr) scene←v9028)+10) ) == 0));
         case 2: 
SOURCE(15918, 35)
            return( (unsigned) ((* (( (ptr) scene←v9028)+13) ) == 0));
         case 3: 
SOURCE(15964, 34)
            return( (unsigned) ((* (( (ptr) scene←v9028)+16) ) == 0));
         default: 
SOURCE(16011, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
   }

static word FindSelectedSequence←P1800(formal←c0289, scene←v9188, selectClass←v9216)
   word formal←c0289;
   word scene←v9188;
   word selectClass←v9216;
   {
   W8 var←c29828;
   /* declaration of traj←v9160 skipped */ 
   register ptr gf←c29860 =  (ptr) &globalframe;
   /* declaration of seq←v9260 skipped */ 
   /* declaration of var←c28900 skipped */ 
   var←c29828.f4/* traj←v9160 */  = formal←c0289;
   /* FindSelectedSequence: */ 
SOURCE(16022, 383)
   {
      word tmpAddr69;
      tmpAddr69 = (word) (( (ptr) &var←c29828)+6)/* var←c28900 */ ;
      (*  (ptr) tmpAddr69 ) = ( ((word)  (fPt) LookForTraj←P2904) );
      (* (( (ptr) tmpAddr69) + 1) ) = 1;
      };
SOURCE(16022, 383)
   var←c29828.f5/* seq←v9260 */  = 0;
SOURCE(16328, 77)
   {
      word var←c28932;
      word pd70;
      pd70 = (* (( (ptr) (* (( (ptr) gf←c29860)+87)/* var←c27172 */  ))+32) );
      var←c28932 = (word) ( *( (fPt) ((*  (ptr) pd70 ))))(scene←v9188, 1, (word) (( (bPt) &var←c29828)+24)/* var←c28900 */ , selectClass←v9216, (* (
            ( (ptr) gf←c29860)+12) ), pd70);
      };
SOURCE(16022, 383)
   return(var←c29828.f5/* seq←v9260 */ );
   }

static word LookForTraj←P2904(sliceD←v11932, formal←c29892)
   word sliceD←v11932;
   word formal←c29892;
   {
   word done←v11976;
   formal←c29892 = (formal←c29892 - 24);
   /* LookForTraj: */ 
SOURCE(16190, 130)
SOURCE(16190, 130)
   done←v11976 = 0;
SOURCE(16267, 53)
   if (((*  (ptr) sliceD←v11932 ) == (* (( (ptr) formal←c29892)+4) ))) {
SOURCE(16295, 12)
      (* (( (ptr) formal←c29892)+5) ) = sliceD←v11932;
SOURCE(16309, 11)
      done←v11976 = 1;
      };
SOURCE(16190, 130)
   return(done←v11976);
   }

static word FindSelectedSlice←P1860(slice←v9320, selectClass←v9348)
   word slice←v9320;
   word selectClass←v9348;
   {
   word sliceD←v9392;
   /* FindSelectedSlice: */ 
SOURCE(16411, 311)
SOURCE(16411, 311)
   sliceD←v9392 = 0;
SOURCE(16524, 198)
   {
      word var←c28964;
      var←c28964 = selectClass←v9348;
      switch (var←c28964) {
         case 0: 
SOURCE(16558, 34)
            sliceD←v9392 = (* (( (ptr) slice←v9320)+7) );
            break;
         case 1: 
SOURCE(16601, 31)
            sliceD←v9392 = (* (( (ptr) slice←v9320)+8) );
            break;
         case 2: 
SOURCE(16644, 34)
            sliceD←v9392 = (* (( (ptr) slice←v9320)+9) );
            break;
         case 3: 
SOURCE(16689, 33)
            sliceD←v9392 = (* (( (ptr) slice←v9320)+10) );
            break;
         default: 
SOURCE(16735, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
SOURCE(16411, 311)
   return(sliceD←v9392);
   }

static word GetLastSelection←P1920(scene←v9452)
   word scene←v9452;
   {
   word sliceD←v9496;
   /* GetLastSelection: */ 
SOURCE(16746, 117)
SOURCE(16746, 117)
   sliceD←v9496 = 0;
SOURCE(16829, 34)
   sliceD←v9496 = (* (( (ptr) scene←v9452)+9) );
SOURCE(16746, 117)
   return(sliceD←v9496);
   }

static void SubstituteForSegment←P1980(formal←c0247, traj←v9556, segNum←v9584, newRun←v9612, scene←v9640)
   word formal←c0247;
   word traj←v9556;
   word segNum←v9584;
   word newRun←v9612;
   word scene←v9640;
   {
   register ptr gf←c29924 =  (ptr) &globalframe;
   word bBox←v9684;
   word newTraj←v9712;
   word newOutlines←v12004 = 0;
   word trajData←v12032;
   word runParts←v12060;
   word run←v12088;
   word oldOutline←v12116;
   word newOutline←v12144 = 0;
   word priority←v12172;
   /* SubstituteForSegment: */ 
SOURCE(16869, 866)
SOURCE(16869, 866)
   bBox←v9684 = 0;
SOURCE(16869, 866)
   newTraj←v9712 = 0;
SOURCE(17032, 38)
   trajData←v12032 = XR←Narrow((* (( (ptr) traj←v9556)+1) ), (* (( (ptr) gf←c29924)+11) ));
SOURCE(17072, 68)
   {
      word pd71;
      pd71 = (* (( (ptr) (* (( (ptr) gf←c29924)+91)/* var←c27588 */  ))+9) );
      runParts←v12060 = (word) ( *( (fPt) ((*  (ptr) pd71 ))))(trajData←v12032, segNum←v9584, pd71);
      };
SOURCE(17142, 66)
   {
      word pd72;
      pd72 = (* (( (ptr) (* (( (ptr) gf←c29924)+88)/* var←c27236 */  ))+8) );
      run←v12088 = (word) ( *( (fPt) ((*  (ptr) pd72 ))))(traj←v9556, runParts←v12060, pd72);
      };
SOURCE(17210, 44)
   {
      word pd73;
      pd73 = (* (( (ptr) (* (( (ptr) gf←c29924)+89)/* var←c27268 */  ))+64) );
      oldOutline←v12116 = (word) ( *( (fPt) ((*  (ptr) pd73 ))))(traj←v9556, pd73);
      };
SOURCE(17275, 54)
   {
      word pd74;
      pd74 = (* (( (ptr) (* (( (ptr) gf←c29924)+87)/* var←c27172 */  ))+21) );
      priority←v12172 = (word) ( *( (fPt) ((*  (ptr) pd74 ))))(scene←v9640, oldOutline←v12116, pd74);
      };
SOURCE(17332, 55)
   {
      word pd75;
      pd75 = (* (( (ptr) (* (( (ptr) gf←c29924)+92)/* var←c28996 */  ))+14) );
      (void) ( *( (fPt) ((*  (ptr) pd75 ))))(oldOutline←v12116, pd75);
      };
SOURCE(17389, 33)
   (void) DeselectTraj←P840(traj←v9556, scene←v9640, 0);
SOURCE(17424, 30)
   (void) DeselectTraj←P840(traj←v9556, scene←v9640, 1);
SOURCE(17456, 38)
   {
      word pd76;
      pd76 = (* (( (ptr) (* (( (ptr) gf←c29924)+93)/* var←c29028 */  ))+20) );
      newTraj←v9712 = (word) ( *( (fPt) ((*  (ptr) pd76 ))))(run←v12088, newRun←v9612, pd76);
      };
SOURCE(17496, 40)
   {
      word pd77;
      pd77 = (* (( (ptr) (* (( (ptr) gf←c29924)+89)/* var←c27268 */  ))+64) );
      newOutline←v12144 = (word) ( *( (fPt) ((*  (ptr) pd77 ))))(newTraj←v9712, pd77);
      };
SOURCE(17538, 38)
   {
      word pd78;
      pd78 = (* (( (ptr) (* (( (ptr) gf←c29924)+87)/* var←c27172 */  ))+13) );
      (void) ( *( (fPt) ((*  (ptr) pd78 ))))(scene←v9640, oldOutline←v12116, pd78);
      };
SOURCE(17578, 114)
   if ((newOutline←v12144 != 0)) {
SOURCE(17603, 45)
      {
         word pd79;
         pd79 = (* (( (ptr) (* (( (ptr) gf←c29924)+87)/* var←c27172 */  ))+9) );
         (void) ( *( (fPt) ((*  (ptr) pd79 ))))(scene←v9640, newOutline←v12144, priority←v12172, pd79);
         };
SOURCE(17650, 42)
      (void) ReselectSliceAllClasses←P1020(newOutline←v12144, scene←v9640);
      };
SOURCE(17697, 38)
   bBox←v9684 = (word) BoundBoxOfOutlines←P2040(newOutlines←v12004);
   /* removed tail goto */ 
   (*  (ptr) formal←c0247 ) = bBox←v9684;
   (* (( (ptr) formal←c0247)+1) ) = newTraj←v9712;
   return;
   }

static word BoundBoxOfOutlines←P2040(outlines←v9772)
   word outlines←v9772;
   {
   register ptr gf←c29956 =  (ptr) &globalframe;
   word bBox←v9900;
   /* BoundBoxOfOutlines: */ 
SOURCE(17741, 256)
SOURCE(17741, 256)
   bBox←v9900 = 0;
SOURCE(17821, 32)
   {
      word pd80;
      pd80 = (* (( (ptr) (* (( (ptr) gf←c29956)+94)/* var←c29060 */  ))+6) );
      bBox←v9900 = (word) ( *( (fPt) ((*  (ptr) pd80 ))))(pd80);
      };
SOURCE(17855, 142)
   {
      register word list←v12300;
      list←v12300 = outlines←v9772;
      lab←L100018: ;
      if ((list←v12300 != 0)) {
         }
      else {
         goto lab←L100015;
         };
SOURCE(17921, 76)
      {
         word var←c29092;
         {
            word pd81;
            pd81 = (* (( (ptr) (* (( (ptr) gf←c29956)+90)/* var←c27300 */  ))+7) );
            var←c29092 = (word) ( *( (fPt) ((*  (ptr) pd81 ))))((*  (ptr) list←v12300 ), 0, pd81);
            };
         {
            word pd82;
            pd82 = (* (( (ptr) (* (( (ptr) gf←c29956)+94)/* var←c29060 */  ))+14) );
            (void) ( *( (fPt) ((*  (ptr) pd82 ))))(bBox←v9900, var←c29092, pd82);
            };
         };
      list←v12300 = (* (( (ptr) list←v12300)+1) );
      goto lab←L100018;
      lab←L100015: ;
      };
SOURCE(17741, 256)
   return(bBox←v9900);
   }

static word DRemove←P2100(ref←v9960, list←v9988)
   word ref←v9960;
   word list←v9988;
   {
   word var←c10116;
   word l←v12428 = 0;
   word l1←v12456 = 0;
   /* DRemove: */ 
SOURCE(18012, 335)
SOURCE(18156, 8)
   l←v12428 = list←v9988;
SOURCE(18166, 157)
   lab←L100021: ;
   if ((l←v12428 != 0)) {
      }
   else {
      goto lab←L100019;
      };
SOURCE(18183, 117)
   if (((*  (ptr) l←v12428 ) == ref←v9960)) {
SOURCE(18205, 31)
      if ((l1←v12456 == 0)) {
SOURCE(18222, 14)
         return((* (( (ptr) l←v12428)+1) ));
         };
SOURCE(18270, 16)
      (* (( (ptr) l1←v12456)+1) ) = (* (( (ptr) l←v12428)+1) );
SOURCE(18288, 12)
      return(list←v9988);
      };
SOURCE(18305, 6)
   l1←v12456 = l←v12428;
SOURCE(18313, 10)
   l←v12428 = (* (( (ptr) l←v12428)+1) );
   goto lab←L100021;
   lab←L100019: ;
SOURCE(18334, 13)
   return(list←v9988);
   }

/* file: GGSelectImpl, module: GGSelectImpl, compiled at: July 11, 1993 8:19:35 pm PDT */ 
extern void XR←install←GGSelectImpl() {
   NoName←Q3012();
   }
extern void XR←run←GGSelectImpl() { XR←Start(&globalframe); }