/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: February 28, 1992 10:40:03 am PST */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: TEditMouseImpl, module: TEditMouseImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [2573449505,2079797981] TEditMouseImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7;
typedef struct {W8 f; W7 r;} W15;
typedef struct {word f0, f1;} W2;
typedef struct {word f0, f1, f2, f3;} W4;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W8 f; W3 r;} W11;
typedef struct {W8 f; word r;} W9;
typedef W9 *W9Pt;
typedef W2 *W2Pt;
typedef struct {W8 f; W4 r;} W12;
typedef struct {word f0, f1, f2, f3, f4;} W5;
typedef struct {word f0, f1, f2, f3, f4, f5;} W6;
#define SOURCE(p, l) /* source p, l */
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
#define MAX(cast, x, y)  ( ( cast x) > ( cast y) ? (x) : (y) )
#define IOP2(op, x, y)  ( (word) ((x) op (y)) )
#define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i )
#define MIN(cast, x, y)  ( ( cast x) < ( cast y) ? (x) : (y) )
static void NoName←Q4644();
static void TEditMouseImpl←P0();
static void DoSelect←P60();
static word NoName←Q4704();
static void action←P1440();
static void inner←P1500();
static word NoName←Q4764();
static void SelectPoint←P180();
static void DoSelectPoint←P1608();
static void SelectChar←P240();
static void DoSelectChar←P1668();
static void SelectWord←P300();
static void DoSelectWord←P1728();
static void SelectNode←P360();
static void DoSelectNode←P1788();
static void SelectBranch←P420();
static void DoSelectBranch←P1848();
static word Dist←P480();
static word CompareLoc←P540();
static void Extend←P600();
static void DoExtend←P1968();
static void SetSelLooks←P660();
static void Update←P720();
static void ExpandToWord←P780();
static word SetInsertion←P840();
static word ResolveToChar←P900();
static void GrowSelectionToBlanks←P960();
static word Blank←P2220();
static void GrowSelectionToSomething←P1020();
static void GrowSelection←P1080();
static void InsertionPoint←P1140();
static word GetSelectionGrain←P1200();
static void InvalidateLineCache←P1260();
static void GetLine←P1320();
static void CharPositionInCachedLine←P1380();
static void NoName←Q4824();
static void NoName←Q4884();
static struct {unsigned f; char r[16];} string1 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"};
static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"};
static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\343\357\262\137\300\144\166\356\317\100\164\000\000"};
static struct {unsigned f; char r[16];} string4 = {851981, "\006\005\000\001\004\001\054\001\070\001\100\114\001\000\000"};
static struct {unsigned f; char r[4];} string5 = {131076, "\216\251\000"};
static struct {unsigned f; char r[12];} string6 = {589836, "StyleKind\000\000"};
static struct {unsigned f; char r[12];} string7 = {524300, "DoSelect\000\000\000"};
static struct {unsigned f; char r[8];} string8 = {327688, "Print\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\231\143\271\041\300\173\367\062\335\100\164\000\000"};
static struct {unsigned f; char r[20];} string10 = {1114129, "\006\006\040\001\050\001\060\001\070\001\100\100\001\100\144\004\007\000\000"};
static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\314\212\213\004\300\112\342\014\072\100\164\000\000"};
static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\004\173\141\246\300\255\256\170\002\100\150\000\000"};
static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\375\366\273\111\300\156\046\321\053\100\150\000\000"};
static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"};
static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\366\233\214\046\300\233\036\213\260\100\150\000\000"};
static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\013\141\323\354\300\341\005\243\127\100\150\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300R-\356\251\300YX]$@h\000\000"};
static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\353\351\362\137\300\156\374\044\211\100\150\000\000"};
static struct {unsigned f; char r[12];} string19 = {1413833833, "tSelection"};
static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\343\112\327\166\300\041\341\335\211\100\150\000\000"};
static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\174\107\267\236\300\027\127\205\140\100\150\000\000"};
static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\261\010\310\246\300\337\340\027\051\100\150\000\000"};
static struct {unsigned f; char r[16];} string23 = {851984, "\257\3004+\202s\300vm?\203@h\000\000"};
static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\042\224\360\026\300\243\254\175\360\100\150\000\000"};
static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\304\277\342\227\300\257\071\007\130\100\150\000\000"};
static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\354\332\367\333\300\361\203\205\173\100\150\000\000"};
static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\334\224\340\220\300\346\355\242\107\100\150\000\000"};
static struct {unsigned f; char r[16];} string28 = {851984, "\257\300\354\107\165\331\300\073\134\140\272\100\150\000\000"};
static struct {
   word f0[13]; word f13; word f14[14]; 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[17]; 
   } globalframe = {
   {0}, 7, {0}, (word) CharPositionInCachedLine←P1380, 
   0, (word) GetLine←P1320, 0, (word) InvalidateLineCache←P1260, 
   0, (word) GetSelectionGrain←P1200, 0, (word) InsertionPoint←P1140, 
   0, (word) GrowSelection←P1080, 0, (word) GrowSelectionToSomething←P1020, 
   0, (word) GrowSelectionToBlanks←P960, 0, (word) ResolveToChar←P900, 
   0, (word) SetInsertion←P840, 0, (word) ExpandToWord←P780, 
   0, (word) Update←P720, 0, (word) SetSelLooks←P660, 
   0, (word) Extend←P600, 0, (word) CompareLoc←P540, 
   0, (word) Dist←P480, 0, (word) SelectBranch←P420, 
   0, (word) SelectNode←P360, 0, (word) SelectWord←P300, 
   0, (word) SelectChar←P240, 0, (word) SelectPoint←P180, 
   0, (word) DoSelect←P60, 0, (word) TEditMouseImpl←P0, 
   {0}
   };

static void NoName←Q4644()
   {
   register ptr gf←c0374 =  (ptr) &globalframe;
   word var←c37060;
   (* (( (ptr) gf←c0374)+20) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c0374)+22) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4);
   (* (( (ptr) gf←c0374)+24) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string2);
   (*  (ptr) (( (bPt) gf←c0374)+100) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0374)+24) ), (word) &string6);
   (*  (ptr) (( (bPt) gf←c0374)+104) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0374)+20) ), (word) &string7);
   (*  (ptr) (( (bPt) gf←c0374)+108) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0374)+24) ), (word) &string8);
   (void) XR←DeclareGlobalFrame((word) "TEditMouseImpl", &globalframe, (word) XR←GetTypeIndex((word) &string9, 0, (word) &string10)
      , (word) (( (bPt) gf←c0374)+288)/* var←c33412 */ );
   var←c37060 = (word) XR←ImportInterface((word) "CharOps", (word) XR←GetTypeIndexS((word) (&string11)), 14);
   (* (( (ptr) gf←c0374)+83)/* var←c35236 */  ) = var←c37060;
   var←c37060 = (word) XR←ImportInterface((word) "EditSpan", (word) XR←GetTypeIndexS((word) (&string12)), 23);
   (* (( (ptr) gf←c0374)+80)/* var←c34468 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 68422405);
   (void) XR←ImportProcS(var←c37060, 67637762);
   var←c37060 = (word) XR←ImportInterface((word) "NodeStyleOps", (word) XR←GetTypeIndexS((word) (&string13)), 23);
   (* (( (ptr) gf←c0374)+87)/* var←c36868 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 262913);
   (void) XR←ImportProcS(var←c37060, 789251);
   (void) XR←ImportProcS(var←c37060, 67109376);
   var←c37060 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string14)), 43);
   (* (( (ptr) gf←c0374)+85)/* var←c36452 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 67373825);
   var←c37060 = (word) XR←ImportInterface((word) "RopeReader", (word) XR←GetTypeIndexS((word) (&string15)), 25);
   (* (( (ptr) gf←c0374)+81)/* var←c35012 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 268033);
   (void) XR←ImportProcS(var←c37060, 67636482);
   (void) XR←ImportProcS(var←c37060, 67114496);
   var←c37060 = (word) XR←ImportInterface((word) "TEditInput", (word) XR←GetTypeIndexS((word) (&string16)), 44);
   (* (( (ptr) gf←c0374)+86)/* var←c36804 */  ) = var←c37060;
   var←c37060 = (word) XR←ImportInterface((word) "TEditProfile", (word) XR←GetTypeIndexS((word) (&string17)), 19);
   (* (( (ptr) gf←c0374)+84)/* var←c35396 */  ) = var←c37060;
   var←c37060 = (word) XR←ImportInterface((word) "TEditFormat", (word) XR←GetTypeIndexS((word) (&string18)), 17);
   (* (( (ptr) gf←c0374)+74)/* var←c33444 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 134743042);
   (void) XR←ImportProcS(var←c37060, 1573126);
   (void) XR←ImportProcS(var←c37060, 336069378);
   (void) XR←ImportProcS(var←c37060, 67110400);
   var←c37060 = (word) XR←ImportInterface((word) &string19, (word) XR←GetTypeIndexS((word) (&string20)), 68);
   (* (( (ptr) gf←c0374)+75)/* var←c33540 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 11264);
   (void) XR←ImportProcS(var←c37060, 526338);
   (void) XR←ImportProcS(var←c37060, 1058564);
   (void) XR←ImportProcS(var←c37060, 1316101);
   (void) XR←ImportProcS(var←c37060, 270337);
   (void) XR←ImportProcS(var←c37060, 266753);
   (void) XR←ImportProcS(var←c37060, 528642);
   (void) XR←ImportProcS(var←c37060, 263937);
   (void) XR←ImportProcS(var←c37060, 67110400);
   var←c37060 = (word) XR←ImportInterface((word) "TEditTouchup", (word) XR←GetTypeIndexS((word) (&string21)), 6);
   (* (( (ptr) gf←c0374)+77)/* var←c33668 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 263425);
   (void) XR←ImportProcS(var←c37060, 67633922);
   var←c37060 = (word) XR←ImportInterface((word) "TextEdit", (word) XR←GetTypeIndexS((word) (&string22)), 39);
   (* (( (ptr) gf←c0374)+78)/* var←c33828 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 67633154);
   (void) XR←ImportProcS(var←c37060, 67633410);
   (void) XR←ImportProcS(var←c37060, 67371521);
   var←c37060 = (word) XR←ImportInterface((word) "TextEditBogus", (word) XR←GetTypeIndexS((word) (&string23)), 1);
   (* (( (ptr) gf←c0374)+82)/* var←c35076 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 67371009);
   var←c37060 = (word) XR←ImportInterface((word) "TextNode", (word) XR←GetTypeIndexS((word) (&string24)), 34);
   (* (( (ptr) gf←c0374)+79)/* var←c34212 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 67372289);
   (void) XR←ImportProcS(var←c37060, 67372033);
   (void) XR←ImportProcS(var←c37060, 67377153);
   (void) XR←ImportProcS(var←c37060, 67379201);
   (void) XR←ImportProcS(var←c37060, 67376641);
   var←c37060 = (word) XR←ImportInterface((word) "ViewerGroupLocks", (word) XR←GetTypeIndexS((word) (&string25)), 2);
   (* (( (ptr) gf←c0374)+76)/* var←c33572 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 524290);
   var←c37060 = (word) XR←ImportInterface((word) "ViewerOps", (word) XR←GetTypeIndexS((word) (&string26)), 43);
   (* (( (ptr) gf←c0374)+88)/* var←c36900 */  ) = var←c37060;
   (void) XR←ImportProcS(var←c37060, 67639554);
   var←c37060 = (word) XR←ExportInterface((word) &string19, (word) XR←GetTypeIndexS((word) (&string20)), 68);
   (* (( (ptr) gf←c0374)+89)/* var←c37092 */  ) = var←c37060;
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+168)/* var←c32932 */ , 11520);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+160)/* var←c32900 */ , 536066);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+152)/* var←c32868 */ , 12032);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+272)/* var←c33348 */ , 1586182);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+264)/* var←c33316 */ , 1586438);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+256)/* var←c33284 */ , 1586694);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+248)/* var←c33252 */ , 1586950);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+240)/* var←c33220 */ , 1587206);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+200)/* var←c33060 */ , 1587462);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+216)/* var←c33124 */ , 2112008);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+144)/* var←c32836 */ , 134495233);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+136)/* var←c32804 */ , 67386625);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+208)/* var←c33092 */ , 279041);
   var←c37060 = (word) XR←ExportInterface((word) "TEditSelectionPrivate", (word) XR←GetTypeIndexS((word) (&string27)), 3);
   (* (( (ptr) gf←c0374)+89)/* var←c37092 */  ) = var←c37060;
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+128)/* var←c32772 */ , 0);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+112)/* var←c32708 */ , 135266563);
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+176)/* var←c32964 */ , 68420101);
   var←c37060 = (word) XR←ExportInterface((word) "TEditSelectionPrivateExtras", (word) XR←GetTypeIndexS((word) (&string28)), 2)
   ;
   (* (( (ptr) gf←c0374)+89)/* var←c37092 */  ) = var←c37060;
   (void) XR←ExportProcS(var←c37060, (word) (( (bPt) gf←c0374)+280)/* var←c33380 */ , 1572870);
   }

static void TEditMouseImpl←P0(formal←c053, formal←c052)
   word formal←c053;
   word formal←c052;
   {
   register ptr gf←c37124 =  (ptr) &globalframe;
   /* TEditMouseImpl: */ 
SOURCE(1310, 21999)
   /* moved to installation proc */ 
SOURCE(22221, 55)
   {
      word pd29;
      pd29 = (* (( (ptr) (* (( (ptr) gf←c37124)+74)/* var←c33444 */  ))+10) );
      (* (( (ptr) gf←c37124)+16)/* lineInfo←v4260 */  ) = (word) ( *( (fPt) ((*  (ptr) pd29 ))))(pd29);
      };
   }

static void DoSelect←P60(formal←c0439, formal←c0440, formal←c0441, formal←c0442, formal←c0443, formal←c0444)
   word formal←c0439;
   word formal←c0440;
   word formal←c0441;
   word formal←c0442;
   word formal←c0443;
   word formal←c0444;
   {
   W15 var←c37156;
   /* declaration of proc←v4424 skipped */ 
   /* declaration of viewer←v4452 skipped */ 
   /* declaration of tdd←v4480 skipped */ 
   /* declaration of x←v4508 skipped */ 
   /* declaration of y←v4536 skipped */ 
   /* declaration of sel←v4564 skipped */ 
   register ptr gf←c37188 =  (ptr) &globalframe;
   /* declaration of var←c33476 skipped */ 
   /* declaration of var←c33508 skipped */ 
   (* (( (ptr) &var←c37156)+4)/* proc←v4424 */  ) = formal←c0439;
   (* (( (ptr) &var←c37156)+5)/* viewer←v4452 */  ) = formal←c0440;
   (* (( (ptr) &var←c37156)+6)/* tdd←v4480 */  ) = formal←c0441;
   (* (( (ptr) &var←c37156)+7)/* x←v4508 */  ) = formal←c0442;
   (* (( (ptr) &var←c37156)+8)/* y←v4536 */  ) = formal←c0443;
   (* (( (ptr) &var←c37156)+9)/* sel←v4564 */  ) = formal←c0444;
   /* DoSelect: */ 
SOURCE(1624, 646)
   {
      word tmpAddr30;
      tmpAddr30 = (word) (( (ptr) &var←c37156)+10)/* var←c33476 */ ;
      (*  (ptr) tmpAddr30 ) = ( ((word)  (fPt) inner←P1500) );
      (* (( (ptr) tmpAddr30) + 1) ) = 1;
      };
   {
      word tmpAddr31;
      tmpAddr31 = (word) (( (ptr) &var←c37156)+12)/* var←c33508 */ ;
      (*  (ptr) tmpAddr31 ) = ( ((word)  (fPt) action←P1440) );
      (* (( (ptr) tmpAddr31) + 1) ) = 1;
      };
SOURCE(2229, 41)
SOURCE(2717, 39)
   {
      word pd32;
      pd32 = (* (( (ptr) (* (( (ptr) gf←c37188)+75)/* var←c33540 */  ))+21) );
      (void) ( *( (fPt) ((*  (ptr) pd32 ))))((* (( (ptr) &var←c37156)+9)/* sel←v4564 */  ), (* (( (ptr) gf←c37188)+26) ), pd32)
      ;
      };
SOURCE(2758, 97)
   {
      /* declaration of var←c01 skipped */ 
      (* (( (ptr) &var←c37156)+14)/* var←c01 */  ) = (* (( (ptr) (* (( (ptr) gf←c37188)+76)/* var←c33572 */  ))+4) );
      {
         word var←c0411;
         var←c0411 = (word) &var←c37156;
          (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q4704) ), ( ((word)  (fPt) NoName←Q4884) ), var←c0411);
         };
      };
SOURCE(2857, 30)
   {
      word pd33;
      pd33 = (* (( (ptr) (* (( (ptr) gf←c37188)+75)/* var←c33540 */  ))+22) );
      (void) ( *( (fPt) ((*  (ptr) pd33 ))))((* ((( (ptr) &var←c37156)+9)/* sel←v4564 */ ) ), pd33);
      };
   }

static word NoName←Q4704(formal←c0377)
   word formal←c0377;
   {
SOURCE(2758, 97)
   {
      word pd34;
      pd34 = (* (( (ptr) formal←c0377)+14) );
      (void) ( *( (fPt) ((*  (ptr) pd34 ))))((word) (( (bPt) formal←c0377)+40), (* (( (ptr) formal←c0377)+5) ), pd34);
      };
   return(0);
   }

static void action←P1440(formal←c37252)
   word formal←c37252;
   {
   register ptr gf←c37220 =  (ptr) &globalframe;
   word refSel←v8108;
   word tSel←v8136 = 0;
   word rightOfLine←v8164 = 0;
   formal←c37252 = (formal←c37252 - 48);
   /* action: */ 
SOURCE(1838, 388)
SOURCE(1855, 166)
   {
      word var←c33604;
      var←c33604 = (* (( (ptr) formal←c37252)+9) );
      switch (var←c33604) {
         case 0: 
            refSel←v8108 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c37220)+75)/* var←c33540 */  ))+4) ) );
            break;
         case 1: 
            refSel←v8108 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c37220)+75)/* var←c33540 */  ))+5) ) );
            break;
         case 2: 
            refSel←v8108 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c37220)+75)/* var←c33540 */  ))+6) ) );
            break;
         default: 
            refSel←v8108 = (
               XR←RaiseUnnamedError(), 0
               );
            break;
         };
      };
SOURCE(2081, 29)
   {
      word pd35;
      pd35 = (* (( (ptr) (* (( (ptr) gf←c37220)+75)/* var←c33540 */  ))+10) );
      tSel←v8136 = (word) ( *( (fPt) ((*  (ptr) pd35 ))))(pd35);
      };
SOURCE(2112, 52)
   rightOfLine←v8164 = (word) ResolveToChar←P900(tSel←v8136, (* (( (ptr) formal←c37252)+5) ), (* (( (ptr) formal←c37252)+6) ), (* (
         ( (ptr) formal←c37252)+7) ), (* (( (ptr) formal←c37252)+8) ));
SOURCE(2166, 31)
   {
      word pd36;
      pd36 = (* (( (ptr) formal←c37252)+4) );
      (void) ( *( (fPt) ((*  (ptr) pd36 ))))(tSel←v8136, refSel←v8108, rightOfLine←v8164, pd36);
      };
SOURCE(2199, 27)
   {
      word pd37;
      pd37 = (* (( (ptr) (* (( (ptr) gf←c37220)+75)/* var←c33540 */  ))+11) );
      (void) ( *( (fPt) ((*  (ptr) pd37 ))))(tSel←v8136, pd37);
      };
   }

static void inner←P1500(formal←c37348)
   word formal←c37348;
   {
   W4 var←c37284;
   register ptr gf←c37316 =  (ptr) &globalframe;
   formal←c37348 = (formal←c37348 - 40);
   var←c37284.f0 = formal←c37348;
   /* inner: */ 
SOURCE(2438, 259)
SOURCE(2454, 243)
   {
      word var←c33636;
      var←c33636 = (* (( (ptr) (* (( (ptr) formal←c37348)+5) ))+26) );
      if ((var←c33636 == 0)) {
         goto lab←L100002;
         };
      if (((* (( (ptr) gf←c37316)+22) ) == XR←GetReferentType(var←c33636))) {
         {
            word vtdd←v8252;
            vtdd←v8252 = var←c33636;
SOURCE(2524, 173)
            if ((vtdd←v8252 == (* (( (ptr) formal←c37348)+6) ))) {
SOURCE(2545, 152)
               {
                  word pd38;
                  pd38 = (* (( (ptr) (* (( (ptr) gf←c37316)+77)/* var←c33668 */  ))+7) );
                  if ((0 != (word) ( *( (fPt) ((*  (ptr) pd38 ))))((* (( (ptr) formal←c37348)+6) ), (* (( (ptr) gf←c37316)+26) ), pd38))) {
SOURCE(2602, 57)
                     {
                        word var←c0412;
                        var←c0412 = (word) &var←c37284;
                         (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q4764) ), ( ((word)  (fPt) NoName←Q4824) ), var←c0412);
                        };
SOURCE(2661, 36)
                     {
                        word pd39;
                        pd39 = (* (( (ptr) (* (( (ptr) gf←c37316)+77)/* var←c33668 */  ))+9) );
                        (void) ( *( (fPt) ((*  (ptr) pd39 ))))((* ((( (ptr) formal←c37348)+6)) ), pd39);
                        };
                     };
                  };
               };
            };
         }
      else {
         lab←L100002: ;
         };
      };
   }

static word NoName←Q4764(formal←c0382)
   word formal←c0382;
   {
SOURCE(2602, 57)
   (void) action←P1440((word) ((( (bPt) (*  (ptr) formal←c0382 ))+48)));
   return(0);
   }

static void SelectPoint←P180(formal←c0445, formal←c0446, formal←c0447, y←v4984, formal←c0448, formal←c0449)
   word formal←c0445;
   word formal←c0446;
   word formal←c0447;
   word y←v4984;
   word formal←c0448;
   word formal←c0449;
   {
   W11 var←c37380;
   /* declaration of viewer←v4900 skipped */ 
   /* declaration of tdd←v4928 skipped */ 
   /* declaration of x←v4956 skipped */ 
   /* declaration of sel←v5012 skipped */ 
   /* declaration of pDel←v5040 skipped */ 
   /* declaration of var←c33700 skipped */ 
   (* (( (ptr) &var←c37380)+4)/* viewer←v4900 */  ) = formal←c0445;
   (* (( (ptr) &var←c37380)+5)/* tdd←v4928 */  ) = formal←c0446;
   (* (( (ptr) &var←c37380)+6)/* x←v4956 */  ) = formal←c0447;
   (* (( (ptr) &var←c37380)+7)/* sel←v5012 */  ) = formal←c0448;
   (* (( (ptr) &var←c37380)+8)/* pDel←v5040 */  ) = formal←c0449;
   /* SelectPoint: */ 
SOURCE(2893, 881)
   {
      word tmpAddr40;
      tmpAddr40 = (word) (( (ptr) &var←c37380)+9)/* var←c33700 */ ;
      (*  (ptr) tmpAddr40 ) = ( ((word)  (fPt) DoSelectPoint←P1608) );
      (* (( (ptr) tmpAddr40) + 1) ) = 1;
      };
SOURCE(3727, 47)
   (void) DoSelect←P60((word) (( (bPt) &var←c37380)+36)/* var←c33700 */ , (* (( (ptr) &var←c37380)+4)/* viewer←v4900 */  ), (* (
         ( (ptr) &var←c37380)+5)/* tdd←v4928 */  ), (* (( (ptr) &var←c37380)+6)/* x←v4956 */  ), y←v4984, (* (( (ptr) &var←c37380)+7)
      /* sel←v5012 */  ));
   }

static void DoSelectPoint←P1608(tSel←v8372, refSel←v8400, rightOfLine←v8428, formal←c37444)
   word tSel←v8372;
   word refSel←v8400;
   word rightOfLine←v8428;
   word formal←c37444;
   {
   register ptr gf←c37412 =  (ptr) &globalframe;
   word newInsertion←v8456 = 0;
   formal←c37444 = (formal←c37444 - 36);
   /* DoSelectPoint: */ 
SOURCE(3053, 666)
SOURCE(3177, 96)
   if (((*  (ptr) refSel←v8400 ) != (* (( (ptr) formal←c37444)+4) )) || ((* (( (ptr) refSel←v8400)+22) ) != 0)) {
SOURCE(3234, 39)
      {
         word pd41;
         pd41 = (* (( (ptr) (* (( (ptr) gf←c37412)+75)/* var←c33540 */  ))+36) );
         (void) ( *( (fPt) ((*  (ptr) pd41 ))))((* ((( (ptr) formal←c37444)+7)) ), pd41);
         };
      };
SOURCE(3275, 21)
   (*  (W9Pt) (( (ptr) tSel←v8372)+11) ) = (*  (W9Pt) (( (ptr) tSel←v8372)+2) );
SOURCE(3298, 71)
   newInsertion←v8456 = (word) SetInsertion←P840(tSel←v8372, (* (( (ptr) formal←c37444)+6) ), (* (( (ptr) tSel←v8372)+4) ), rightOfLine←v8428, (* (
         ( (ptr) formal←c37444)+5) ));
SOURCE(3371, 348)
   if ((((((*  (ptr) refSel←v8400 ) != (* (( (ptr) formal←c37444)+4) )) ||  ! XR←EqualWords((( (ptr) refSel←v8400)+2), (( (ptr) tSel←v8372)+2)
      , 9)) || ((* (( (ptr) refSel←v8400)+22) ) != 0)) || ((* (( (ptr) refSel←v8400)+24) ) != newInsertion←v8456)) || ((* (( (ptr) refSel←v8400)+26)
    ) != (* (( (ptr) formal←c37444)+8) ))) {
SOURCE(3519, 24)
      (* (( (ptr) tSel←v8372)+22) ) = 0;
SOURCE(3545, 20)
      (*  (ptr) tSel←v8372 ) = (* (( (ptr) formal←c37444)+4) );
SOURCE(3567, 15)
      (* (( (ptr) tSel←v8372)+1) ) = (* (( (ptr) formal←c37444)+5) );
SOURCE(3584, 29)
      (* (( (ptr) tSel←v8372)+24) ) = newInsertion←v8456;
SOURCE(3615, 25)
      (* (( (ptr) tSel←v8372)+26) ) = (* (( (ptr) formal←c37444)+8) );
SOURCE(3642, 17)
      (void) SetSelLooks←P660(tSel←v8372);
SOURCE(3661, 58)
      {
         word pd42;
         pd42 = (* (( (ptr) (* (( (ptr) gf←c37412)+75)/* var←c33540 */  ))+25) );
         (void) ( *( (fPt) ((*  (ptr) pd42 ))))(tSel←v8372, (* (( (ptr) formal←c37444)+7) ), 1, 1, 0, pd42);
         };
      };
   }

static void SelectChar←P240(formal←c0450, formal←c0451, formal←c0452, y←v5184, formal←c0453, formal←c0454)
   word formal←c0450;
   word formal←c0451;
   word formal←c0452;
   word y←v5184;
   word formal←c0453;
   word formal←c0454;
   {
   W11 var←c37476;
   /* declaration of viewer←v5100 skipped */ 
   /* declaration of tdd←v5128 skipped */ 
   /* declaration of x←v5156 skipped */ 
   /* declaration of sel←v5212 skipped */ 
   /* declaration of pDel←v5240 skipped */ 
   /* declaration of var←c33732 skipped */ 
   (* (( (ptr) &var←c37476)+4)/* viewer←v5100 */  ) = formal←c0450;
   (* (( (ptr) &var←c37476)+5)/* tdd←v5128 */  ) = formal←c0451;
   (* (( (ptr) &var←c37476)+6)/* x←v5156 */  ) = formal←c0452;
   (* (( (ptr) &var←c37476)+7)/* sel←v5212 */  ) = formal←c0453;
   (* (( (ptr) &var←c37476)+8)/* pDel←v5240 */  ) = formal←c0454;
   /* SelectChar: */ 
SOURCE(3780, 1239)
   {
      word tmpAddr43;
      tmpAddr43 = (word) (( (ptr) &var←c37476)+9)/* var←c33732 */ ;
      (*  (ptr) tmpAddr43 ) = ( ((word)  (fPt) DoSelectChar←P1668) );
      (* (( (ptr) tmpAddr43) + 1) ) = 1;
      };
SOURCE(4973, 46)
   (void) DoSelect←P60((word) (( (bPt) &var←c37476)+36)/* var←c33732 */ , (* (( (ptr) &var←c37476)+4)/* viewer←v5100 */  ), (* (
         ( (ptr) &var←c37476)+5)/* tdd←v5128 */  ), (* (( (ptr) &var←c37476)+6)/* x←v5156 */  ), y←v5184, (* (( (ptr) &var←c37476)+7)
      /* sel←v5212 */  ));
   }

static void DoSelectChar←P1668(tSel←v8576, refSel←v8604, rightOfLine←v8632, formal←c37540)
   word tSel←v8576;
   word refSel←v8604;
   word rightOfLine←v8632;
   word formal←c37540;
   {
   register ptr gf←c37508 =  (ptr) &globalframe;
   word newInsertion←v8660 = 0;
   word newGrain←v8688 = 1;
   word startValid←v8716 = 1;
   word endValid←v8744 = 1;
   word var←c0413;
   word var←c33764;
   formal←c37540 = (formal←c37540 - 36);
   /* DoSelectChar: */ 
SOURCE(3940, 1025)
SOURCE(4141, 21)
   (*  (W9Pt) (( (ptr) tSel←v8576)+11) ) = (*  (W9Pt) (( (ptr) tSel←v8576)+2) );
SOURCE(4164, 409)
   {
      word tc44;
      if ( (  ( (0 != rightOfLine←v8632) ? ((* (( (ptr) (* (( (ptr) formal←c37540)+5) ))+11) ) != 0) : 0 )  ? ( (int)(* (( (ptr) tSel←v8576)+13)
       ) ==  (int)(*  (ptr) (* (( (ptr) (* (( (ptr) formal←c37540)+5) ))+1) ) )) : 0 ) ) {
         {
            word idx45;
            word limit46;
            var←c33764 = (* (( (ptr) (* (( (ptr) formal←c37540)+5) ))+1) );
            var←c0413 = (var←c0413 & 2147483648) | (( (((unsigned)(* (( (ptr) (( (W9Pt) (( (ptr) var←c33764)+3))+(
                        idx45 = (* (( (ptr) tSel←v8576)+13) ),
                        limit46 = (* (( (ptr) var←c33764)+2) ),
                        BCK(idx45, limit46)
                        )))+2) ) << 1) >> 1) ));
            };
         tc44 =  (word) (( (((unsigned)var←c0413 << 1) >> 1) ) == 0);
         }
      else {
         tc44 =  (word) 0;
         };
      if (tc44) {
SOURCE(4324, 78)
         {
            word var←c33796;
            {
               word pd47;
               pd47 = (* (( (ptr) (* (( (ptr) gf←c37508)+78)/* var←c33828 */  ))+6) );
               var←c33796 = (word) ( *( (fPt) ((*  (ptr) pd47 ))))((* ((( (ptr) tSel←v8576)+2)) ), pd47);
               };
            (* (( (ptr) tSel←v8576)+3) ) = var←c33796;
            (* (( (ptr) tSel←v8576)+12) ) = var←c33796;
            };
SOURCE(4404, 16)
         newGrain←v8688 = 0;
SOURCE(4422, 21)
         newInsertion←v8660 = 0;
SOURCE(4445, 29)
         endValid←v8744 = 0;
         startValid←v8716 = 0;
         }
      else {
SOURCE(4485, 71)
         newInsertion←v8660 = (word) SetInsertion←P840(tSel←v8576, (* (( (ptr) formal←c37540)+6) ), (* (( (ptr) tSel←v8576)+4) ), rightOfLine←v8632, (* (
               ( (ptr) formal←c37540)+5) ));
SOURCE(4558, 15)
         newGrain←v8688 = 1;
         };
      };
SOURCE(4578, 387)
   if (((((((*  (ptr) refSel←v8604 ) != (* (( (ptr) formal←c37540)+4) )) ||  ! XR←EqualWords((( (ptr) refSel←v8604)+2), (( (ptr) tSel←v8576)+2)
      , 9)) ||  ! XR←EqualWords((( (ptr) refSel←v8604)+11), (( (ptr) tSel←v8576)+11), 9)) || ((* (( (ptr) refSel←v8604)+22) ) != newGrain←v8688)) || ((* (
      ( (ptr) refSel←v8604)+26) ) != (* (( (ptr) formal←c37540)+8) ))) || ((* (( (ptr) refSel←v8604)+24) ) != newInsertion←v8660)) {
SOURCE(4752, 27)
      (* (( (ptr) tSel←v8576)+22) ) = newGrain←v8688;
SOURCE(4781, 20)
      (*  (ptr) tSel←v8576 ) = (* (( (ptr) formal←c37540)+4) );
SOURCE(4803, 15)
      (* (( (ptr) tSel←v8576)+1) ) = (* (( (ptr) formal←c37540)+5) );
SOURCE(4820, 29)
      (* (( (ptr) tSel←v8576)+24) ) = newInsertion←v8660;
SOURCE(4851, 25)
      (* (( (ptr) tSel←v8576)+26) ) = (* (( (ptr) formal←c37540)+8) );
SOURCE(4878, 17)
      (void) SetSelLooks←P660(tSel←v8576);
SOURCE(4897, 68)
      {
         word pd48;
         pd48 = (* (( (ptr) (* (( (ptr) gf←c37508)+75)/* var←c33540 */  ))+25) );
         (void) ( *( (fPt) ((*  (ptr) pd48 ))))(tSel←v8576, (* (( (ptr) formal←c37540)+7) ), startValid←v8716, endValid←v8744, 0, pd48)
         ;
         };
      };
   }

static void SelectWord←P300(formal←c0455, formal←c0456, formal←c0457, y←v5384, formal←c0458, formal←c0459)
   word formal←c0455;
   word formal←c0456;
   word formal←c0457;
   word y←v5384;
   word formal←c0458;
   word formal←c0459;
   {
   W11 var←c37572;
   /* declaration of viewer←v5300 skipped */ 
   /* declaration of tdd←v5328 skipped */ 
   /* declaration of x←v5356 skipped */ 
   /* declaration of sel←v5412 skipped */ 
   /* declaration of pDel←v5440 skipped */ 
   /* declaration of var←c33860 skipped */ 
   (* (( (ptr) &var←c37572)+4)/* viewer←v5300 */  ) = formal←c0455;
   (* (( (ptr) &var←c37572)+5)/* tdd←v5328 */  ) = formal←c0456;
   (* (( (ptr) &var←c37572)+6)/* x←v5356 */  ) = formal←c0457;
   (* (( (ptr) &var←c37572)+7)/* sel←v5412 */  ) = formal←c0458;
   (* (( (ptr) &var←c37572)+8)/* pDel←v5440 */  ) = formal←c0459;
   /* SelectWord: */ 
SOURCE(5025, 1488)
   {
      word tmpAddr49;
      tmpAddr49 = (word) (( (ptr) &var←c37572)+9)/* var←c33860 */ ;
      (*  (ptr) tmpAddr49 ) = ( ((word)  (fPt) DoSelectWord←P1728) );
      (* (( (ptr) tmpAddr49) + 1) ) = 1;
      };
SOURCE(6467, 46)
   (void) DoSelect←P60((word) (( (bPt) &var←c37572)+36)/* var←c33860 */ , (* (( (ptr) &var←c37572)+4)/* viewer←v5300 */  ), (* (
         ( (ptr) &var←c37572)+5)/* tdd←v5328 */  ), (* (( (ptr) &var←c37572)+6)/* x←v5356 */  ), y←v5384, (* (( (ptr) &var←c37572)+7)
      /* sel←v5412 */  ));
   }

static void DoSelectWord←P1728(tSel←v8864, refSel←v8892, rightOfLine←v8920, formal←c37636)
   word tSel←v8864;
   word refSel←v8892;
   word rightOfLine←v8920;
   word formal←c37636;
   {
   register ptr gf←c37604 =  (ptr) &globalframe;
   word start←v8948;
   word end←v8976;
   word punc←v9004 = 0;
   word newInsertion←v9032 = 0;
   word newGrain←v9060 = 1;
   word startValid←v9088 = 1;
   word endValid←v9116 = 1;
   word hitLine←v9144;
   word var←c0414;
   word var←c33956;
   formal←c37636 = (formal←c37636 - 36);
   /* DoSelectWord: */ 
SOURCE(5185, 1274)
SOURCE(5444, 34)
   hitLine←v9144 = (* (( (ptr) tSel←v8864)+4) );
SOURCE(5480, 49)
   {
      W3 var←c33892;
      (void) ExpandToWord←P780((word) &var←c33892, (*  (W2Pt) (( (ptr) tSel←v8864)+2) ), 0);
      punc←v9004 = var←c33892.f2;
      end←v8976 = var←c33892.f1;
      start←v8948 = var←c33892.f0;
      };
SOURCE(5531, 20)
   (*  (ptr) tSel←v8864 ) = (* (( (ptr) formal←c37636)+4) );
SOURCE(5553, 15)
   (* (( (ptr) tSel←v8864)+1) ) = (* (( (ptr) formal←c37636)+5) );
SOURCE(5570, 28)
   (* (( (ptr) tSel←v8864)+3) ) = start←v8948;
SOURCE(5600, 41)
   (* (( (ptr) tSel←v8864)+11) ) = (* (( (ptr) tSel←v8864)+2) );
   (* (( (ptr) tSel←v8864)+12) ) = end←v8976;
SOURCE(5643, 43)
   {
      word pd50;
      pd50 = (* (( (ptr) (* (( (ptr) gf←c37604)+75)/* var←c33540 */  ))+43) );
      (void) ( *( (fPt) ((*  (ptr) pd50 ))))(tSel←v8864, (* (( (ptr) formal←c37636)+4) ), 1, 1, pd50);
      };
SOURCE(5688, 372)
   {
      word tc51;
      if ( (  ( (0 != rightOfLine←v8920) ? ((* (( (ptr) (* (( (ptr) formal←c37636)+5) ))+11) ) != 0) : 0 )  ? ( (int)(* (( (ptr) tSel←v8864)+13)
       ) ==  (int)(*  (ptr) (* (( (ptr) (* (( (ptr) formal←c37636)+5) ))+1) ) )) : 0 ) ) {
         {
            word idx52;
            word limit53;
            var←c33956 = (* (( (ptr) (* (( (ptr) formal←c37636)+5) ))+1) );
            var←c0414 = (var←c0414 & 2147483648) | (( (((unsigned)(* (( (ptr) (( (W9Pt) (( (ptr) var←c33956)+3))+(
                        idx52 = (* (( (ptr) tSel←v8864)+13) ),
                        limit53 = (* (( (ptr) var←c33956)+2) ),
                        BCK(idx52, limit53)
                        )))+2) ) << 1) >> 1) ));
            };
         tc51 =  (word) (( (((unsigned)var←c0414 << 1) >> 1) ) == 0);
         }
      else {
         tc51 =  (word) 0;
         };
      if (tc51) {
SOURCE(5819, 78)
         {
            word var←c33988;
            {
               word pd54;
               pd54 = (* (( (ptr) (* (( (ptr) gf←c37604)+78)/* var←c33828 */  ))+6) );
               var←c33988 = (word) ( *( (fPt) ((*  (ptr) pd54 ))))((* ((( (ptr) tSel←v8864)+2)) ), pd54);
               };
            (* (( (ptr) tSel←v8864)+3) ) = var←c33988;
            (* (( (ptr) tSel←v8864)+12) ) = var←c33988;
            };
SOURCE(5899, 16)
         newGrain←v9060 = 0;
SOURCE(5917, 21)
         newInsertion←v9032 = 0;
SOURCE(5940, 29)
         endValid←v9116 = 0;
         startValid←v9088 = 0;
         }
      else {
SOURCE(5980, 63)
         newInsertion←v9032 = (word) SetInsertion←P840(tSel←v8864, (* (( (ptr) formal←c37636)+6) ), hitLine←v9144, rightOfLine←v8920, (* (
               ( (ptr) formal←c37636)+5) ));
SOURCE(6045, 15)
         newGrain←v9060 = 2;
         };
      };
SOURCE(6065, 394)
   if (((((((*  (ptr) refSel←v8892 ) != (*  (ptr) tSel←v8864 )) || ((* (( (ptr) refSel←v8892)+22) ) != newGrain←v9060)) ||  ! XR←EqualWords(
      (( (ptr) tSel←v8864)+2), (( (ptr) refSel←v8892)+2), 2)) ||  ! XR←EqualWords((( (ptr) tSel←v8864)+11), (( (ptr) refSel←v8892)+11)
      , 2)) || (newInsertion←v9032 != (* (( (ptr) refSel←v8892)+24) ))) || ((* (( (ptr) refSel←v8892)+26) ) != (* (( (ptr) formal←c37636)+8)
    ))) {
SOURCE(6260, 27)
      (* (( (ptr) tSel←v8864)+22) ) = newGrain←v9060;
SOURCE(6289, 23)
      (* (( (ptr) tSel←v8864)+23) ) = punc←v9004;
SOURCE(6314, 29)
      (* (( (ptr) tSel←v8864)+24) ) = newInsertion←v9032;
SOURCE(6345, 25)
      (* (( (ptr) tSel←v8864)+26) ) = (* (( (ptr) formal←c37636)+8) );
SOURCE(6372, 17)
      (void) SetSelLooks←P660(tSel←v8864);
SOURCE(6391, 68)
      {
         word pd55;
         pd55 = (* (( (ptr) (* (( (ptr) gf←c37604)+75)/* var←c33540 */  ))+25) );
         (void) ( *( (fPt) ((*  (ptr) pd55 ))))(tSel←v8864, (* (( (ptr) formal←c37636)+7) ), startValid←v9088, endValid←v9116, 0, pd55)
         ;
         };
      };
   }

static void SelectNode←P360(formal←c0460, formal←c0461, formal←c0462, y←v5584, formal←c0463, formal←c0464)
   word formal←c0460;
   word formal←c0461;
   word formal←c0462;
   word y←v5584;
   word formal←c0463;
   word formal←c0464;
   {
   W11 var←c37668;
   /* declaration of viewer←v5500 skipped */ 
   /* declaration of tdd←v5528 skipped */ 
   /* declaration of x←v5556 skipped */ 
   /* declaration of sel←v5612 skipped */ 
   /* declaration of pDel←v5640 skipped */ 
   /* declaration of var←c34020 skipped */ 
   (* (( (ptr) &var←c37668)+4)/* viewer←v5500 */  ) = formal←c0460;
   (* (( (ptr) &var←c37668)+5)/* tdd←v5528 */  ) = formal←c0461;
   (* (( (ptr) &var←c37668)+6)/* x←v5556 */  ) = formal←c0462;
   (* (( (ptr) &var←c37668)+7)/* sel←v5612 */  ) = formal←c0463;
   (* (( (ptr) &var←c37668)+8)/* pDel←v5640 */  ) = formal←c0464;
   /* SelectNode: */ 
SOURCE(6519, 981)
   {
      word tmpAddr56;
      tmpAddr56 = (word) (( (ptr) &var←c37668)+9)/* var←c34020 */ ;
      (*  (ptr) tmpAddr56 ) = ( ((word)  (fPt) DoSelectNode←P1788) );
      (* (( (ptr) tmpAddr56) + 1) ) = 1;
      };
SOURCE(7454, 46)
   (void) DoSelect←P60((word) (( (bPt) &var←c37668)+36)/* var←c34020 */ , (* (( (ptr) &var←c37668)+4)/* viewer←v5500 */  ), (* (
         ( (ptr) &var←c37668)+5)/* tdd←v5528 */  ), (* (( (ptr) &var←c37668)+6)/* x←v5556 */  ), y←v5584, (* (( (ptr) &var←c37668)+7)
      /* sel←v5612 */  ));
   }

static void DoSelectNode←P1788(tSel←v9264, refSel←v9292, rightOfLine←v9320, formal←c37732)
   word tSel←v9264;
   word refSel←v9292;
   word rightOfLine←v9320;
   word formal←c37732;
   {
   register ptr gf←c37700 =  (ptr) &globalframe;
   word hitLine←v9348;
   word newInsertion←v9376 = 0;
   formal←c37732 = (formal←c37732 - 36);
   /* DoSelectNode: */ 
SOURCE(6678, 768)
SOURCE(6760, 34)
   hitLine←v9348 = (* (( (ptr) tSel←v9264)+4) );
SOURCE(6837, 20)
   (*  (ptr) tSel←v9264 ) = (* (( (ptr) formal←c37732)+4) );
SOURCE(6859, 15)
   (* (( (ptr) tSel←v9264)+1) ) = (* (( (ptr) formal←c37732)+5) );
SOURCE(6876, 41)
   {
      word var←c34052;
      var←c34052 = (* (( (ptr) tSel←v9264)+2) );
      (* (( (ptr) tSel←v9264)+2) ) = var←c34052;
      (* (( (ptr) tSel←v9264)+3) ) = 0;
      };
SOURCE(6919, 81)
   {
      word var←c34084;
      {
         word pd57;
         word x58;
         pd57 = (* (( (ptr) (* (( (ptr) gf←c37700)+78)/* var←c33828 */  ))+6) );
         var←c34084 = ((x58 = (word) ( *( (fPt) ((*  (ptr) pd57 ))))((* ((( (ptr) tSel←v9264)+2)) ), pd57),
            MAX((int)(word), x58, 1)) - 1);
         };
      (* (( (ptr) tSel←v9264)+11) ) = (* (( (ptr) tSel←v9264)+2) );
      (* (( (ptr) tSel←v9264)+12) ) = var←c34084;
      };
SOURCE(7002, 43)
   {
      word pd59;
      pd59 = (* (( (ptr) (* (( (ptr) gf←c37700)+75)/* var←c33540 */  ))+43) );
      (void) ( *( (fPt) ((*  (ptr) pd59 ))))(tSel←v9264, (* (( (ptr) formal←c37732)+4) ), 1, 1, pd59);
      };
SOURCE(7047, 57)
   newInsertion←v9376 = (word) SetInsertion←P840(tSel←v9264, (* (( (ptr) formal←c37732)+6) ), hitLine←v9348, 0, (* (( (ptr) formal←c37732)+5)
       ));
SOURCE(7106, 340)
   if ((((((*  (ptr) refSel←v9292 ) != (* (( (ptr) formal←c37732)+4) )) || ((* (( (ptr) refSel←v9292)+2) ) != (* (( (ptr) tSel←v9264)+2)
    ))) || ((* (( (ptr) refSel←v9292)+22) ) != 3)) || ((* (( (ptr) refSel←v9292)+26) ) != (* (( (ptr) formal←c37732)+8) ))) || ((* (
      ( (ptr) refSel←v9292)+24) ) != newInsertion←v9376)) {
SOURCE(7271, 23)
      (* (( (ptr) tSel←v9264)+22) ) = 3;
SOURCE(7296, 25)
      (* (( (ptr) tSel←v9264)+26) ) = (* (( (ptr) formal←c37732)+8) );
SOURCE(7323, 29)
      (* (( (ptr) tSel←v9264)+24) ) = newInsertion←v9376;
SOURCE(7354, 17)
      (void) SetSelLooks←P660(tSel←v9264);
SOURCE(7373, 73)
      {
         word pd60;
         pd60 = (* (( (ptr) (* (( (ptr) gf←c37700)+75)/* var←c33540 */  ))+25) );
         (void) ( *( (fPt) ((*  (ptr) pd60 ))))(tSel←v9264, (* (( (ptr) formal←c37732)+7) ), 0, 0, 0, pd60);
         };
      };
   }

static void SelectBranch←P420(formal←c0465, formal←c0466, formal←c0467, y←v5784, formal←c0468, formal←c0469)
   word formal←c0465;
   word formal←c0466;
   word formal←c0467;
   word y←v5784;
   word formal←c0468;
   word formal←c0469;
   {
   W11 var←c37764;
   /* declaration of viewer←v5700 skipped */ 
   /* declaration of tdd←v5728 skipped */ 
   /* declaration of x←v5756 skipped */ 
   /* declaration of sel←v5812 skipped */ 
   /* declaration of pDel←v5840 skipped */ 
   /* declaration of var←c34148 skipped */ 
   (* (( (ptr) &var←c37764)+4)/* viewer←v5700 */  ) = formal←c0465;
   (* (( (ptr) &var←c37764)+5)/* tdd←v5728 */  ) = formal←c0466;
   (* (( (ptr) &var←c37764)+6)/* x←v5756 */  ) = formal←c0467;
   (* (( (ptr) &var←c37764)+7)/* sel←v5812 */  ) = formal←c0468;
   (* (( (ptr) &var←c37764)+8)/* pDel←v5840 */  ) = formal←c0469;
   /* SelectBranch: */ 
SOURCE(7506, 1027)
   {
      word tmpAddr61;
      tmpAddr61 = (word) (( (ptr) &var←c37764)+9)/* var←c34148 */ ;
      (*  (ptr) tmpAddr61 ) = ( ((word)  (fPt) DoSelectBranch←P1848) );
      (* (( (ptr) tmpAddr61) + 1) ) = 1;
      };
SOURCE(8485, 48)
   (void) DoSelect←P60((word) (( (bPt) &var←c37764)+36)/* var←c34148 */ , (* (( (ptr) &var←c37764)+4)/* viewer←v5700 */  ), (* (
         ( (ptr) &var←c37764)+5)/* tdd←v5728 */  ), (* (( (ptr) &var←c37764)+6)/* x←v5756 */  ), y←v5784, (* (( (ptr) &var←c37764)+7)
      /* sel←v5812 */  ));
   }

static void DoSelectBranch←P1848(tSel←v9496, refSel←v9524, rightOfLine←v9552, formal←c37828)
   word tSel←v9496;
   word refSel←v9524;
   word rightOfLine←v9552;
   word formal←c37828;
   {
   register ptr gf←c37796 =  (ptr) &globalframe;
   word hitLine←v9580;
   word newInsertion←v9608 = 0;
   formal←c37828 = (formal←c37828 - 36);
   /* DoSelectBranch: */ 
SOURCE(7667, 810)
SOURCE(7751, 34)
   hitLine←v9580 = (* (( (ptr) tSel←v9496)+4) );
SOURCE(7828, 20)
   (*  (ptr) tSel←v9496 ) = (* (( (ptr) formal←c37828)+4) );
SOURCE(7850, 15)
   (* (( (ptr) tSel←v9496)+1) ) = (* (( (ptr) formal←c37828)+5) );
SOURCE(7867, 41)
   {
      word var←c34180;
      var←c34180 = (* (( (ptr) tSel←v9496)+2) );
      (* (( (ptr) tSel←v9496)+2) ) = var←c34180;
      (* (( (ptr) tSel←v9496)+3) ) = 0;
      };
SOURCE(7910, 60)
   {
      word pd62;
      pd62 = (* (( (ptr) (* (( (ptr) gf←c37796)+79)/* var←c34212 */  ))+26) );
      (* (( (ptr) tSel←v9496)+11) ) = (word) ( *( (fPt) ((*  (ptr) pd62 ))))((* ((( (ptr) tSel←v9496)+2)) ), pd62);
      };
SOURCE(7972, 55)
   {
      word pd63;
      pd63 = (* (( (ptr) (* (( (ptr) gf←c37796)+79)/* var←c34212 */  ))+36) );
      (* (( (ptr) tSel←v9496)+12) ) = (word) ( *( (fPt) ((*  (ptr) pd63 ))))((* ((( (ptr) tSel←v9496)+11)) ), pd63);
      };
SOURCE(8029, 43)
   {
      word pd64;
      pd64 = (* (( (ptr) (* (( (ptr) gf←c37796)+75)/* var←c33540 */  ))+43) );
      (void) ( *( (fPt) ((*  (ptr) pd64 ))))(tSel←v9496, (* (( (ptr) formal←c37828)+4) ), 1, 1, pd64);
      };
SOURCE(8074, 57)
   newInsertion←v9608 = (word) SetInsertion←P840(tSel←v9496, (* (( (ptr) formal←c37828)+6) ), hitLine←v9580, 0, (* (( (ptr) formal←c37828)+5)
       ));
SOURCE(8133, 344)
   if ((((((*  (ptr) refSel←v9524 ) != (* (( (ptr) formal←c37828)+4) )) || ((* (( (ptr) refSel←v9524)+2) ) != (* (( (ptr) tSel←v9496)+2)
    ))) || ((* (( (ptr) refSel←v9524)+22) ) != 4)) || ((* (( (ptr) refSel←v9524)+26) ) != (* (( (ptr) formal←c37828)+8) ))) || ((* (
      ( (ptr) refSel←v9524)+24) ) != newInsertion←v9608)) {
SOURCE(8300, 25)
      (* (( (ptr) tSel←v9496)+22) ) = 4;
SOURCE(8327, 25)
      (* (( (ptr) tSel←v9496)+26) ) = (* (( (ptr) formal←c37828)+8) );
SOURCE(8354, 29)
      (* (( (ptr) tSel←v9496)+24) ) = newInsertion←v9608;
SOURCE(8385, 17)
      (void) SetSelLooks←P660(tSel←v9496);
SOURCE(8404, 73)
      {
         word pd65;
         pd65 = (* (( (ptr) (* (( (ptr) gf←c37796)+75)/* var←c33540 */  ))+25) );
         (void) ( *( (fPt) ((*  (ptr) pd65 ))))(tSel←v9496, (* (( (ptr) formal←c37828)+7) ), 0, 0, 0, pd65);
         };
      };
   }

static word Dist←P480(sel←v5900, dir←v5928, x←v5956, y←v5984)
   word sel←v5900;
   word dir←v5928;
   word x←v5956;
   word y←v5984;
   {
   word var←c6028;
   /* Dist: */ 
SOURCE(8539, 294)
SOURCE(8730, 103)
   if ((dir←v5928 == 0)) {
      {
         word var←c0415;
         {
            word var←c34276;
            word n←v31504;
            word var←c34308;
            word n←v31456;
            n←v31504 = (x←v5956 - (* (( (ptr) sel←v5900)+5) ));
SOURCE(8716, 11)
            var←c34276 = IOP2( * ,  (int)n←v31504,  (int)n←v31504);
            n←v31456 = (y←v5984 - (* (( (ptr) sel←v5900)+6) ));
SOURCE(8716, 11)
            var←c34308 = IOP2( * ,  (int)n←v31456,  (int)n←v31456);
            var←c0415 = (var←c34276 + var←c34308);
            };
         return(var←c0415);
         };
      }
   else {
      {
         word var←c0416;
         {
            word var←c34340;
            word n←v31408;
            word var←c34372;
            word n←v31360;
            n←v31408 = (x←v5956 - (* (( (ptr) sel←v5900)+14) ));
SOURCE(8716, 11)
            var←c34340 = IOP2( * ,  (int)n←v31408,  (int)n←v31408);
            n←v31360 = (y←v5984 - (* (( (ptr) sel←v5900)+15) ));
SOURCE(8716, 11)
            var←c34372 = IOP2( * ,  (int)n←v31360,  (int)n←v31360);
            var←c0416 = (var←c34340 + var←c34372);
            };
         return(var←c0416);
         };
      };
   }

static word CompareLoc←P540(loc1←v6088, loc2←v6116)
   W2 loc1←v6088;
   W2 loc2←v6116;
   {
   register ptr gf←c37860 =  (ptr) &globalframe;
   word order←v6160;
   /* CompareLoc: */ 
SOURCE(8839, 270)
SOURCE(8928, 122)
   if ((loc1←v6088.f0 == loc2←v6116.f0)) {
SOURCE(8956, 94)
      {
         word var←c34404;
         var←c34404 = loc1←v6088.f1;
         if (( (int)var←c34404 <  (int)loc2←v6116.f1)) {
            return(0);
            }
         else {
            if (( (int)var←c34404 ==  (int)loc2←v6116.f1)) {
               return(1);
               }
            else {
               return(2);
               };
            };
         };
      };
SOURCE(9052, 57)
   {
      word pd66;
      pd66 = (* (( (ptr) (* (( (ptr) gf←c37860)+80)/* var←c34468 */  ))+22) );
      return((word) ( *( (fPt) ((*  (ptr) pd66 ))))(loc1←v6088.f0, loc2←v6116.f0, pd66));
      };
   }

static void Extend←P600(formal←c0470, formal←c0471, x←v6276, y←v6304, formal←c0472, formal←c0473, formal←c0474, formal←c0475)
   word formal←c0470;
   word formal←c0471;
   word x←v6276;
   word y←v6304;
   word formal←c0472;
   word formal←c0473;
   word formal←c0474;
   word formal←c0475;
   {
   W12 var←c37892;
   /* declaration of viewer←v6220 skipped */ 
   /* declaration of tdd←v6248 skipped */ 
   /* declaration of sel←v6332 skipped */ 
   /* declaration of pDel←v6360 skipped */ 
   /* declaration of changeLevel←v6388 skipped */ 
   /* declaration of saveEnds←v6416 skipped */ 
   /* declaration of var←c34500 skipped */ 
   (* (( (ptr) &var←c37892)+4)/* viewer←v6220 */  ) = formal←c0470;
   (* (( (ptr) &var←c37892)+5)/* tdd←v6248 */  ) = formal←c0471;
   (* (( (ptr) &var←c37892)+6)/* sel←v6332 */  ) = formal←c0472;
   (* (( (ptr) &var←c37892)+7)/* pDel←v6360 */  ) = formal←c0473;
   (* (( (ptr) &var←c37892)+8)/* changeLevel←v6388 */  ) = formal←c0474;
   (* (( (ptr) &var←c37892)+9)/* saveEnds←v6416 */  ) = formal←c0475;
   /* Extend: */ 
SOURCE(9213, 3884)
   {
      word tmpAddr67;
      tmpAddr67 = (word) (( (ptr) &var←c37892)+10)/* var←c34500 */ ;
      (*  (ptr) tmpAddr67 ) = ( ((word)  (fPt) DoExtend←P1968) );
      (* (( (ptr) tmpAddr67) + 1) ) = 1;
      };
SOURCE(13055, 42)
   (void) DoSelect←P60((word) (( (bPt) &var←c37892)+40)/* var←c34500 */ , (* (( (ptr) &var←c37892)+4)/* viewer←v6220 */  ), (* (
         ( (ptr) &var←c37892)+5)/* tdd←v6248 */  ), x←v6276, y←v6304, (* (( (ptr) &var←c37892)+6)/* sel←v6332 */  ));
   }

static void DoExtend←P1968(tSel←v9876, refSel←v9904, rightOfLine←v9932, formal←c37956)
   word tSel←v9876;
   word refSel←v9904;
   word rightOfLine←v9932;
   word formal←c37956;
   {
   register ptr gf←c37924 =  (ptr) &globalframe;
   word end←v9960 = 0;
   word ok←v9988;
   W9 sp←v10016;
   formal←c37956 = (formal←c37956 - 40);
   /* DoExtend: */ 
SOURCE(9429, 3623)
SOURCE(9552, 32)
   XR←FillWords(&sp←v10016, 9, 0);
SOURCE(9618, 32)
   if (((*  (ptr) refSel←v9904 ) == 0)) {
SOURCE(9644, 6)
      return;
      };
SOURCE(9678, 30)
   ok←v9988 = ((* (( (ptr) refSel←v9904)+26) ) == (* (( (ptr) formal←c37956)+7) ));
SOURCE(9710, 22)
   end←v9960 = (* (( (ptr) refSel←v9904)+24) );
SOURCE(9734, 233)
   if (((*  (ptr) refSel←v9904 ) != (* (( (ptr) formal←c37956)+4) ))) {
SOURCE(9763, 204)
      {
         word refTDD←v10060;
SOURCE(9765, 68)
         refTDD←v10060 = XR←Narrow((* (( (ptr) (*  (ptr) refSel←v9904 ))+26) ), (* (( (ptr) gf←c37924)+22) ));
SOURCE(9835, 51)
         if ((refTDD←v10060 == 0) || ((*  (ptr) refTDD←v10060 ) != (*  (ptr) (* (( (ptr) formal←c37956)+5) ) ))) {
SOURCE(9880, 6)
            return;
            };
SOURCE(9888, 79)
         ok←v9988 = 0;
         };
      };
SOURCE(9970, 43)
   if (((* (( (ptr) refSel←v9904)+22) ) == 0)) {
SOURCE(10003, 10)
      ok←v9988 = 0;
      };
SOURCE(10015, 105)
   if ((0 != (* (( (ptr) formal←c37956)+9) )) || ((* (( (ptr) formal←c37956)+5) ) != (* (( (ptr) gf←c37924)+12)/* initTDD←v3840 */  ))) {
SOURCE(10049, 13)
      (* (( (ptr) gf←c37924)+12)/* initTDD←v3840 */  ) = (* (( (ptr) formal←c37956)+5) );
SOURCE(10064, 28)
      (*  (W2Pt) (( (ptr) gf←c37924)+8)/* initStart←v3784 */  ) = (*  (W2Pt) (( (ptr) refSel←v9904)+2) );
SOURCE(10094, 26)
      (*  (W2Pt) (( (ptr) gf←c37924)+10)/* initEnd←v3812 */  ) = (*  (W2Pt) (( (ptr) refSel←v9904)+11) );
      };
SOURCE(10123, 15)
   sp←v10016 = (*  (W9Pt) (( (ptr) tSel←v9876)+2) );
SOURCE(10140, 505)
   if ((end←v9960 == 1)) {
SOURCE(10160, 235)
      if (((word) CompareLoc←P540((*  (W2Pt) (( (ptr) tSel←v9876)+2) ), (*  (W2Pt) (( (ptr) refSel←v9904)+2) )) == 0)) {
SOURCE(10221, 12)
         end←v9960 = 0;
SOURCE(10235, 126)
         {
            word var←c34564;
            var←c34564 = (word) CompareLoc←P540((*  (W2Pt) (( (ptr) refSel←v9904)+2) ), (*  (W2Pt) (( (ptr) gf←c37924)+10)/* initEnd←v3812 */  ))
            ;
            if ((var←c34564 == 1) || (var←c34564 == 0)) {
SOURCE(10300, 24)
               (*  (W2Pt) (( (ptr) refSel←v9904)+11) ) = (*  (W2Pt) (( (ptr) gf←c37924)+10)/* initEnd←v3812 */  );
               }
            else {
SOURCE(10337, 24)
               (*  (W2Pt) (( (ptr) gf←c37924)+10)/* initEnd←v3812 */  ) = (*  (W2Pt) (( (ptr) refSel←v9904)+11) );
               };
            };
SOURCE(10383, 12)
         ok←v9988 = 0;
         };
      }
   else {
SOURCE(10406, 239)
      if (((word) CompareLoc←P540((*  (W2Pt) (( (ptr) tSel←v9876)+2) ), (*  (W2Pt) (( (ptr) refSel←v9904)+11) )) == 2)) {
SOURCE(10464, 11)
         end←v9960 = 1;
SOURCE(10477, 134)
         {
            word var←c34596;
            var←c34596 = (word) CompareLoc←P540((*  (W2Pt) (( (ptr) gf←c37924)+8)/* initStart←v3784 */  ), (*  (W2Pt) (( (ptr) refSel←v9904)+11)
                ));
            if ((var←c34596 == 1) || (var←c34596 == 0)) {
SOURCE(10542, 28)
               (*  (W2Pt) (( (ptr) refSel←v9904)+2) ) = (*  (W2Pt) (( (ptr) gf←c37924)+8)/* initStart←v3784 */  );
               }
            else {
SOURCE(10583, 28)
               (*  (W2Pt) (( (ptr) gf←c37924)+8)/* initStart←v3784 */  ) = (*  (W2Pt) (( (ptr) refSel←v9904)+2) );
               };
            };
SOURCE(10633, 12)
         ok←v9988 = 0;
         };
      };
SOURCE(10650, 126)
   if ( (  ( (0 != ok←v9988) ? ((* (( (ptr) formal←c37956)+8) ) == 2) : 0 )  ?  (  ( (end←v9960 == 0) ? XR←EqualWords(&sp←v10016, (
         ( (ptr) refSel←v9904)+2), 2) : 0 )  ? 1 :  ( (end←v9960 == 1) ? XR←EqualWords(&sp←v10016, (( (ptr) refSel←v9904)+11), 2) : 0 )  )  : 0 ) ) {
SOURCE(10770, 6)
      return;
      };
SOURCE(10791, 47)
   {
      word pd68;
      pd68 = (* (( (ptr) (* (( (ptr) gf←c37924)+75)/* var←c33540 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd68 ))))(refSel←v9904, tSel←v9876, pd68);
      };
SOURCE(10840, 20)
   (*  (ptr) tSel←v9876 ) = (* (( (ptr) formal←c37956)+4) );
SOURCE(10910, 242)
   if ( (  (  ( ((* (( (ptr) tSel←v9876)+22) ) == 0) ? (end←v9960 == 0) : 0 )  ? ( (int)(* (( (ptr) tSel←v9876)+12) ) >  (int)0) : 0 )  ?  ( ((*  (ptr) &sp←v10016 ) != (* (
      ( (ptr) tSel←v9876)+11) )) ? 1 : ( (int)(* (( (ptr) &sp←v10016)+1) ) <  (int)(* (( (ptr) tSel←v9876)+12) )) )  : 0 ) ) {
SOURCE(11060, 41)
      (* (( (ptr) tSel←v9876)+12) ) = ((* (( (ptr) tSel←v9876)+12) ) - 1);
SOURCE(11140, 12)
      ok←v9988 = 0;
      };
SOURCE(11155, 308)
   {
      word var←c34628;
      var←c34628 = (* (( (ptr) formal←c37956)+8) );
      switch (var←c34628) {
         case 2: 
            break;
         case 0: 
SOURCE(11205, 10)
            ok←v9988 = 0;
SOURCE(11217, 109)
            {
               word var←c34660;
               var←c34660 = (* (( (ptr) tSel←v9876)+22) );
               switch (var←c34660) {
                  case 4: 
                     (* (( (ptr) tSel←v9876)+22) ) = 3;
                     break;
                  case 3: 
                     (* (( (ptr) tSel←v9876)+22) ) = 2;
                     break;
                  case 2: 
                     (* (( (ptr) tSel←v9876)+22) ) = 1;
                     break;
                  default: 
                     (* (( (ptr) tSel←v9876)+22) ) = 1;
                     break;
                  };
               };
            break;
         case 1: 
SOURCE(11341, 10)
            ok←v9988 = 0;
SOURCE(11353, 110)
            {
               word var←c34692;
               var←c34692 = (* (( (ptr) tSel←v9876)+22) );
               switch (var←c34692) {
                  case 0: 
                     (* (( (ptr) tSel←v9876)+22) ) = 1;
                     break;
                  case 1: 
                     (* (( (ptr) tSel←v9876)+22) ) = 2;
                     break;
                  case 2: 
                     (* (( (ptr) tSel←v9876)+22) ) = 3;
                     break;
                  default: 
                     (* (( (ptr) tSel←v9876)+22) ) = 4;
                     break;
                  };
               };
            break;
         default: 
SOURCE(11477, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
SOURCE(11484, 1362)
   {
      word var←c34724;
      var←c34724 = (* (( (ptr) tSel←v9876)+22) );
      switch (var←c34724) {
         case 4: case 3: 
SOURCE(11531, 317)
            if ((end←v9960 == 1)) {
SOURCE(11551, 78)
               if (((* (( (ptr) tSel←v9876)+22) ) == 4)) {
SOURCE(11583, 46)
                  {
                     word pd69;
                     pd69 = (* (( (ptr) (* (( (ptr) gf←c37924)+79)/* var←c34212 */  ))+26) );
                     (*  (ptr) &sp←v10016 ) = (word) ( *( (fPt) ((*  (ptr) pd69 ))))((*  (ptr) (&sp←v10016) ), pd69);
                     };
                  };
SOURCE(11631, 51)
               if ( ( (0 != ok←v9988) ? ((*  (ptr) &sp←v10016 ) == (* (( (ptr) tSel←v9876)+11) )) : 0 ) ) {
SOURCE(11676, 6)
                  return;
                  };
SOURCE(11684, 65)
               {
                  word var←c34756;
                  {
                     word pd70;
                     word x71;
                     pd70 = (* (( (ptr) (* (( (ptr) gf←c37924)+78)/* var←c33828 */  ))+6) );
                     var←c34756 = ((x71 = (word) ( *( (fPt) ((*  (ptr) pd70 ))))((*  (ptr) (&sp←v10016) ), pd70),
                        MAX((int)(word), x71, 1)) - 1);
                     };
                  (* (( (ptr) tSel←v9876)+11) ) = (*  (ptr) &sp←v10016 );
                  (* (( (ptr) tSel←v9876)+12) ) = var←c34756;
                  };
               }
            else {
SOURCE(11760, 53)
               if ( ( (0 != ok←v9988) ? ((*  (ptr) &sp←v10016 ) == (* (( (ptr) tSel←v9876)+2) )) : 0 ) ) {
SOURCE(11807, 6)
                  return;
                  };
SOURCE(11815, 33)
               (* (( (ptr) tSel←v9876)+2) ) = (*  (ptr) &sp←v10016 );
               (* (( (ptr) tSel←v9876)+3) ) = 0;
               };
            break;
         case 2: 
SOURCE(11864, 750)
            {
               word prev←v10104;
               word start←v10132;
               word endPos←v10160;
               word node←v10188;
               word prevNode←v10216 = 0;
               word punc←v10244 = 0;
SOURCE(11892, 32)
               node←v10188 = (*  (ptr) &sp←v10016 );
SOURCE(11991, 56)
               {
                  W3 var←c34852;
                  (void) ExpandToWord←P780((word) &var←c34852, (*  (W2Pt) &sp←v10016 ), (end←v9960 == 0));
                  punc←v10244 = var←c34852.f2;
                  endPos←v10160 = var←c34852.f1;
                  start←v10132 = var←c34852.f0;
                  };
SOURCE(12049, 560)
               if ((end←v9960 == 1)) {
                  {
                     word var←c34884;
SOURCE(12069, 28)
                     prevNode←v10216 = (* (( (ptr) tSel←v9876)+11) );
SOURCE(12099, 24)
                     (* (( (ptr) tSel←v9876)+11) ) = node←v10188;
SOURCE(12125, 105)
                     if (((* (( (ptr) tSel←v9876)+23) ) != 1)) {
SOURCE(12160, 29)
                        (* (( (ptr) tSel←v9876)+23) ) = punc←v10244;
                        }
                     else {
SOURCE(12189, 41)
                        if ((punc←v10244 == 2)) {
SOURCE(12213, 17)
                           endPos←v10160 = (endPos←v10160 - 1);
                           };
                        };
SOURCE(12232, 25)
                     prev←v10104 = (* (( (ptr) tSel←v9876)+12) );
SOURCE(12259, 72)
                     {
                        word tc72;
                        word tc73;
                        var←c34884 = endPos←v10160;
                        (* (( (ptr) tSel←v9876)+12) ) = endPos←v10160;
                        if (( (int)var←c34884 ==  (int)prev←v10104)) {
                           tc73 =  (word) (0 != ok←v9988);
                           }
                        else {
                           tc73 =  (word) 0;
                           };
                        if (tc73) {
                           tc72 =  (word) (node←v10188 == prevNode←v10216);
                           }
                        else {
                           tc72 =  (word) 0;
                           };
                        if (tc72) {
SOURCE(12325, 6)
                           return;
                           };
                        };
                     };
                  }
               else {
                  {
                     word var←c34916;
SOURCE(12342, 30)
                     prevNode←v10216 = (* (( (ptr) tSel←v9876)+2) );
SOURCE(12374, 26)
                     (* (( (ptr) tSel←v9876)+2) ) = node←v10188;
SOURCE(12402, 103)
                     if (((* (( (ptr) tSel←v9876)+23) ) != 2)) {
SOURCE(12438, 29)
                        (* (( (ptr) tSel←v9876)+23) ) = punc←v10244;
                        }
                     else {
SOURCE(12467, 38)
                        if ((punc←v10244 == 1)) {
SOURCE(12490, 15)
                           start←v10132 = (start←v10132 + 1);
                           };
                        };
SOURCE(12507, 27)
                     prev←v10104 = (* (( (ptr) tSel←v9876)+3) );
SOURCE(12536, 73)
                     {
                        word tc74;
                        word tc75;
                        var←c34916 = start←v10132;
                        (* (( (ptr) tSel←v9876)+3) ) = start←v10132;
                        if (( (int)var←c34916 ==  (int)prev←v10104)) {
                           tc75 =  (word) (0 != ok←v9988);
                           }
                        else {
                           tc75 =  (word) 0;
                           };
                        if (tc75) {
                           tc74 =  (word) (node←v10188 == prevNode←v10216);
                           }
                        else {
                           tc74 =  (word) 0;
                           };
                        if (tc74) {
SOURCE(12603, 6)
                           return;
                           };
                        };
                     };
                  };
               };
            break;
         case 1: case 0: 
SOURCE(12634, 186)
            if ((end←v9960 == 1)) {
SOURCE(12654, 59)
               if ( (  ( (XR←EqualWords((( (ptr) tSel←v9876)+11), &sp←v10016, 9)) ? (0 != ok←v9988) : 0 )  ? ((* (( (ptr) tSel←v9876)+22)
                ) == 1) : 0 ) ) {
SOURCE(12707, 6)
                  return;
                  };
SOURCE(12715, 15)
               (*  (W9Pt) (( (ptr) tSel←v9876)+11) ) = sp←v10016;
               }
            else {
SOURCE(12740, 61)
               if ( (  ( (XR←EqualWords((( (ptr) tSel←v9876)+2), &sp←v10016, 9)) ? (0 != ok←v9988) : 0 )  ? ((* (( (ptr) tSel←v9876)+22)
                ) == 1) : 0 ) ) {
SOURCE(12795, 6)
                  return;
                  };
SOURCE(12803, 17)
               (*  (W9Pt) (( (ptr) tSel←v9876)+2) ) = sp←v10016;
               };
SOURCE(12823, 23)
            (* (( (ptr) tSel←v9876)+22) ) = 1;
            break;
         default: 
SOURCE(12862, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
SOURCE(12899, 20)
   (* (( (ptr) tSel←v9876)+24) ) = end←v9960;
SOURCE(12921, 25)
   (* (( (ptr) tSel←v9876)+26) ) = (* (( (ptr) formal←c37956)+7) );
SOURCE(12948, 17)
   (void) SetSelLooks←P660(tSel←v9876);
SOURCE(12967, 85)
   {
      word pd76;
      pd76 = (* (( (ptr) (* (( (ptr) gf←c37924)+75)/* var←c33540 */  ))+25) );
      (void) ( *( (fPt) ((*  (ptr) pd76 ))))(tSel←v9876, (* (( (ptr) formal←c37956)+6) ),  ( (end←v9960 == 1) ? (0 != ok←v9988) : 0 ) ,  ( (end←v9960 == 0) ? (0 != ok←v9988) : 0 ) , 0, pd76)
      ;
      };
   }

static void SetSelLooks←P660(sel←v6476)
   word sel←v6476;
   {
   register ptr gf←c37988 =  (ptr) &globalframe;
   W2 loc←v10288;
   word size←v10316;
   /* SetSelLooks: */ 
SOURCE(13103, 353)
SOURCE(13163, 86)
   {
      word tcp77;
      if (((* (( (ptr) sel←v6476)+24) ) == 0)) {
         tcp77 = (word) (( (ptr) sel←v6476)+2);
         }
      else {
         tcp77 = (word) (( (ptr) sel←v6476)+11);
         };
      loc←v10288 = (*  (W2Pt) tcp77 );
      };
SOURCE(13251, 35)
   {
      word pd78;
      pd78 = (* (( (ptr) (* (( (ptr) gf←c37988)+78)/* var←c33828 */  ))+6) );
      size←v10316 = (word) ( *( (fPt) ((*  (ptr) pd78 ))))(loc←v10288.f0, pd78);
      };
SOURCE(13288, 168)
   {
      word var←c34948;
      {
         word pd79;
         word pd80;
         if (( (int)size←v10316 <=  (int)0)) {
            var←c34948 = 0;
            }
         else {
            if (( (int)loc←v10288.f1 >=  (int)size←v10316)) {
               pd79 = (* (( (ptr) (* (( (ptr) gf←c37988)+78)/* var←c33828 */  ))+5) );
               var←c34948 = (word) ( *( (fPt) ((*  (ptr) pd79 ))))(loc←v10288.f0, (size←v10316 - 1), pd79);
               }
            else {
               pd80 = (* (( (ptr) (* (( (ptr) gf←c37988)+78)/* var←c33828 */  ))+5) );
               var←c34948 = (word) ( *( (fPt) ((*  (ptr) pd80 ))))(loc←v10288.f0, loc←v10288.f1, pd80);
               };
            };
         };
      (* (( (ptr) sel←v6476)+25) ) = var←c34948;
      };
   }

static void Update←P720(viewer←v6536, tdd←v6564, x←v6592, y←v6620, sel←v6648, pDel←v6676)
   word viewer←v6536;
   word tdd←v6564;
   word x←v6592;
   word y←v6620;
   word sel←v6648;
   word pDel←v6676;
   {
   register ptr gf←c38020 =  (ptr) &globalframe;
   word refSel←v10360;
   /* Update: */ 
SOURCE(13460, 524)
SOURCE(13615, 131)
   refSel←v10360 =  ( (sel←v6648 == 0) ? (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38020)+75)/* var←c33540 */  ))+4) ) ) :  ( (sel←v6648 == 1) ? (*  (ptr) (* (
      ( (ptr) (* (( (ptr) gf←c38020)+75)/* var←c33540 */  ))+5) ) ) : (
      XR←RaiseUnnamedError(), 0
      ) )  ) ;
SOURCE(13748, 236)
   {
      word var←c34980;
      var←c34980 = (* (( (ptr) refSel←v10360)+22) );
      switch (var←c34980) {
         case 2: 
SOURCE(13787, 40)
            (void) SelectWord←P300(viewer←v6536, tdd←v6564, x←v6592, y←v6620, sel←v6648, pDel←v6676);
            break;
         case 3: 
SOURCE(13837, 40)
            (void) SelectNode←P360(viewer←v6536, tdd←v6564, x←v6592, y←v6620, sel←v6648, pDel←v6676);
            break;
         case 4: 
SOURCE(13889, 42)
            (void) SelectBranch←P420(viewer←v6536, tdd←v6564, x←v6592, y←v6620, sel←v6648, pDel←v6676);
            break;
         default: 
SOURCE(13944, 40)
            (void) SelectChar←P240(viewer←v6536, tdd←v6564, x←v6592, y←v6620, sel←v6648, pDel←v6676);
            break;
         };
      };
   }

static void ExpandToWord←P780(formal←c0253, pos←v6736, frontOnly←v6764)
   word formal←c0253;
   W2 pos←v6736;
   word frontOnly←v6764;
   {
   register ptr gf←c38052 =  (ptr) &globalframe;
   word start←v6808;
   word end←v6836;
   word punc←v6864;
   word refChar←v10404;
   word char←v10432;
   word alpha←v10460;
   word node←v10488;
   word lastOffset←v10516;
   word ropeReader←v10544;
   /* ExpandToWord: */ 
SOURCE(13990, 1410)
SOURCE(13990, 1410)
   punc←v6864 = 0;
SOURCE(14182, 37)
   node←v10488 = pos←v6736.f0;
SOURCE(14221, 39)
   {
      word pd81;
      pd81 = (* (( (ptr) (* (( (ptr) gf←c38052)+78)/* var←c33828 */  ))+6) );
      lastOffset←v10516 = ((word) ( *( (fPt) ((*  (ptr) pd81 ))))(node←v10488, pd81) - 1);
      };
SOURCE(14262, 55)
   {
      word pd82;
      pd82 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+26) );
      ropeReader←v10544 = (word) ( *( (fPt) ((*  (ptr) pd82 ))))(pd82);
      };
SOURCE(14319, 23)
   {
      word var←c35044;
      var←c35044 = pos←v6736.f1;
      end←v6836 = var←c35044;
      start←v6808 = var←c35044;
      };
SOURCE(14344, 68)
   {
      word reader←v32044;
      word rope←v32072;
      word index←v32100;
      word var←c35108;
      word rope←v18280;
      reader←v32044 = ropeReader←v10544;
      {
         word pd83;
         pd83 = (* (( (ptr) (* (( (ptr) gf←c38052)+82)/* var←c35076 */  ))+4) );
         rope←v32072 = (word) ( *( (fPt) ((*  (ptr) pd83 ))))(node←v10488, pd83);
         };
      index←v32100 = end←v6836;
      {
         word tc84;
         rope←v18280 = 0;
         var←c35108 = (* (( (ptr) reader←v32044)+2) );
         if (((var←c35108 == rope←v32072)
         )) {
            tc84 =  (word) ( (int)((* (( (ptr) reader←v32044)+3) ) + (* (( (ptr) reader←v32044)+1) )) ==  (int)index←v32100);
            }
         else {
            tc84 =  (word) 0;
            };
         if (tc84) {
            goto lab←L100011;
            };
         };
      (* (( (ptr) reader←v32044)+2) ) = rope←v32072;
      (* (( (ptr) reader←v32044)+1) ) = 0;
      (*  (hPt) (*  (ptr) reader←v32044 ) ) = 0;
      (* (( (ptr) reader←v32044)+3) ) = index←v32100;
      lab←L100011: ;
      };
SOURCE(14414, 52)
   {
      word reader←v32164;
      reader←v32164 = ropeReader←v10544;
      (* (( (ptr) reader←v32164)+5) ) = 13;
      (* (( (ptr) reader←v32164)+4) ) = 1;
      };
SOURCE(14501, 36)
   {
      word var←c35140;
      word text←v16688;
      word i←v16732;
      text←v16688 = (*  (ptr) ropeReader←v10544 );
      i←v16732 = (* (( (ptr) ropeReader←v10544)+1) );
      {
         word pd86;
         if ((i←v16732 < (*  (hPt) text←v16688 ))) {
            (* (( (ptr) ropeReader←v10544)+1) ) = (i←v16732 + 1);
            {
               word limit85;
               var←c35140 = (word) (* ((( (bPt) text←v16688)+4)+(
                     limit85 = (word) (* (( (hPt) text←v16688)+1) ),
                     BCK(i←v16732, limit85)
                     )) );
               };
            }
         else {
            pd86 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+17) );
            var←c35140 = (word) ( *( (fPt) ((*  (ptr) pd86 ))))(ropeReader←v10544, 0, pd86);
            };
         };
      refChar←v10404 = var←c35140;
      };
SOURCE(14539, 90)
   {
      word var←c35204;
      var←c35204 = refChar←v10404;
      if ((var←c35204 == 13) || (var←c35204 == 10)) {
SOURCE(14583, 37)
         {
            word pd87;
            pd87 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+27) );
            (void) ( *( (fPt) ((*  (ptr) pd87 ))))(ropeReader←v10544, pd87);
            };
SOURCE(14622, 7)
         goto lab←L100009;
         };
      };
SOURCE(14665, 37)
   alpha←v10460 = ((word) (* (( (bPt) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38052)+83)/* var←c35236 */  ))+4) ) ))+refChar←v10404)
    ) == 2);
SOURCE(14704, 33)
   {
      word var←c35268;
      word text←v32356;
      word i←v32384;
      text←v32356 = (*  (ptr) ropeReader←v10544 );
      i←v32384 = (* (( (ptr) ropeReader←v10544)+1) );
      {
         word pd89;
         if ((i←v32384 < (*  (hPt) text←v32356 ))) {
            (* (( (ptr) ropeReader←v10544)+1) ) = (i←v32384 + 1);
            {
               word limit88;
               var←c35268 = (word) (* ((( (bPt) text←v32356)+4)+(
                     limit88 = (word) (* (( (hPt) text←v32356)+1) ),
                     BCK(i←v32384, limit88)
                     )) );
               };
            }
         else {
            pd89 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+17) );
            var←c35268 = (word) ( *( (fPt) ((*  (ptr) pd89 ))))(ropeReader←v10544, 0, pd89);
            };
         };
      char←v10432 = var←c35268;
      };
SOURCE(14740, 131)
   lab←L100016: ;
   {
      word tc90;
      word tc91;
      if ((0 != alpha←v10460)) {
         tc91 =  (word) ((word) (* (( (bPt) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38052)+83)/* var←c35236 */  ))+4) ) ))+char←v10432)
          ) == 2);
         }
      else {
         tc91 =  (word) 0;
         };
      if (tc91 || (char←v10432 == refChar←v10404)) {
         tc90 =  (word) ( (int)end←v6836 <  (int)lastOffset←v10516);
         }
      else {
         tc90 =  (word) 0;
         };
      if (tc90) {
         }
      else {
         goto lab←L100014;
         };
      };
SOURCE(14825, 33)
   {
      word var←c35332;
      word text←v32284;
      word i←v32312;
      text←v32284 = (*  (ptr) ropeReader←v10544 );
      i←v32312 = (* (( (ptr) ropeReader←v10544)+1) );
      {
         word pd93;
         if ((i←v32312 < (*  (hPt) text←v32284 ))) {
            (* (( (ptr) ropeReader←v10544)+1) ) = (i←v32312 + 1);
            {
               word limit92;
               var←c35332 = (word) (* ((( (bPt) text←v32284)+4)+(
                     limit92 = (word) (* (( (hPt) text←v32284)+1) ),
                     BCK(i←v32312, limit92)
                     )) );
               };
            }
         else {
            pd93 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+17) );
            var←c35332 = (word) ( *( (fPt) ((*  (ptr) pd93 ))))(ropeReader←v10544, 0, pd93);
            };
         };
      char←v10432 = var←c35332;
      };
SOURCE(14860, 11)
   end←v6836 = (end←v6836 + 1);
   goto lab←L100016;
   lab←L100014: ;
SOURCE(14882, 105)
   if ( (  (  ( (0 != (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38052)+84)/* var←c35396 */  ))+13) ) )) ? (0 == frontOnly←v6764) : 0 )  ? (0 != alpha←v10460) : 0 )  ? (char←v10432 == 32) : 0 ) ) {
SOURCE(14959, 15)
      punc←v6864 = 2;
SOURCE(14976, 11)
      end←v6836 = (end←v6836 + 1);
      };
SOURCE(14992, 70)
   {
      word reader←v31896;
      word rope←v31924;
      word index←v31952;
      word var←c35428;
      word rope←v32000;
      reader←v31896 = ropeReader←v10544;
      {
         word pd94;
         pd94 = (* (( (ptr) (* (( (ptr) gf←c38052)+82)/* var←c35076 */  ))+4) );
         rope←v31924 = (word) ( *( (fPt) ((*  (ptr) pd94 ))))(node←v10488, pd94);
         };
      index←v31952 = start←v6808;
      {
         word tc95;
         rope←v32000 = 0;
         var←c35428 = (* (( (ptr) reader←v31896)+2) );
         if (((var←c35428 == rope←v31924)
         )) {
            tc95 =  (word) ( (int)((* (( (ptr) reader←v31896)+3) ) + (* (( (ptr) reader←v31896)+1) )) ==  (int)index←v31952);
            }
         else {
            tc95 =  (word) 0;
            };
         if (tc95) {
            goto lab←L100019;
            };
         };
      (* (( (ptr) reader←v31896)+2) ) = rope←v31924;
      (* (( (ptr) reader←v31896)+1) ) = 0;
      (*  (hPt) (*  (ptr) reader←v31896 ) ) = 0;
      (* (( (ptr) reader←v31896)+3) ) = index←v31952;
      lab←L100019: ;
      };
SOURCE(15064, 39)
   {
      word var←c35460;
      word reader←v32596;
      reader←v32596 = ropeReader←v10544;
      {
         word i←v16036;
         i←v16036 = (* (( (ptr) reader←v32596)+1) );
         {
            word pd97;
            if ((i←v16036 > 0)) {
               {
                  word var←c35524;
                  word var←c35556;
                  var←c35524 = SGNCK((i←v16036 - 1));
                  (* (( (ptr) reader←v32596)+1) ) = var←c35524;
                  var←c35556 = (*  (ptr) reader←v32596 );
                  {
                     word limit96;
                     var←c35460 = (word) (* ((( (bPt) var←c35556)+4)+(
                           limit96 = (word) (* (( (hPt) var←c35556)+1) ),
                           BCK(var←c35524, limit96)
                           )) );
                     };
                  };
               }
            else {
               pd97 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+17) );
               var←c35460 = (word) ( *( (fPt) ((*  (ptr) pd97 ))))(reader←v32596, 1, pd97);
               };
            };
         };
      char←v10432 = var←c35460;
      };
SOURCE(15105, 134)
   lab←L100023: ;
   {
      word tc98;
      word tc99;
      if ((0 != alpha←v10460)) {
         tc99 =  (word) ((word) (* (( (bPt) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38052)+83)/* var←c35236 */  ))+4) ) ))+char←v10432)
          ) == 2);
         }
      else {
         tc99 =  (word) 0;
         };
      if (tc99 || (char←v10432 == refChar←v10404)) {
         tc98 =  (word) ( (int)start←v6808 >  (int)0);
         }
      else {
         tc98 =  (word) 0;
         };
      if (tc98) {
         }
      else {
         goto lab←L100021;
         };
      };
SOURCE(15183, 39)
   {
      word var←c35620;
      word reader←v32520;
      reader←v32520 = ropeReader←v10544;
      {
         word i←v32552;
         i←v32552 = (* (( (ptr) reader←v32520)+1) );
         {
            word pd101;
            if ((i←v32552 > 0)) {
               {
                  word var←c35684;
                  word var←c35716;
                  var←c35684 = SGNCK((i←v32552 - 1));
                  (* (( (ptr) reader←v32520)+1) ) = var←c35684;
                  var←c35716 = (*  (ptr) reader←v32520 );
                  {
                     word limit100;
                     var←c35620 = (word) (* ((( (bPt) var←c35716)+4)+(
                           limit100 = (word) (* (( (hPt) var←c35716)+1) ),
                           BCK(var←c35684, limit100)
                           )) );
                     };
                  };
               }
            else {
               pd101 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+17) );
               var←c35620 = (word) ( *( (fPt) ((*  (ptr) pd101 ))))(reader←v32520, 1, pd101);
               };
            };
         };
      char←v10432 = var←c35620;
      };
SOURCE(15224, 15)
   start←v6808 = (start←v6808 - 1);
   goto lab←L100023;
   lab←L100021: ;
SOURCE(15250, 107)
   if ( (  (  ( (0 != (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38052)+84)/* var←c35396 */  ))+13) ) )) ? (punc←v6864 == 0) : 0 )  ? (0 != alpha←v10460) : 0 )  ? (char←v10432 == 32) : 0 ) ) {
SOURCE(15326, 14)
      punc←v6864 = 1;
SOURCE(15342, 15)
      start←v6808 = (start←v6808 - 1);
      };
SOURCE(15363, 37)
   {
      word pd102;
      pd102 = (* (( (ptr) (* (( (ptr) gf←c38052)+81)/* var←c35012 */  ))+27) );
      (void) ( *( (fPt) ((*  (ptr) pd102 ))))(ropeReader←v10544, pd102);
      };
   /* removed tail goto */ 
   lab←L100009: ;
   (*  (ptr) formal←c0253 ) = start←v6808;
   (* (( (ptr) formal←c0253)+1) ) = end←v6836;
   (* (( (ptr) formal←c0253)+2) ) = punc←v6864;
   return;
   }

static word SetInsertion←P840(sel←v6924, x←v6952, line←v6980, rightOfLine←v7008, tdd←v7036)
   word sel←v6924;
   word x←v6952;
   word line←v6980;
   word rightOfLine←v7008;
   word tdd←v7036;
   {
   register ptr gf←c38084 =  (ptr) &globalframe;
   word var←c7080;
   word node←v10588;
   word size←v10616;
   /* SetInsertion: */ 
SOURCE(15406, 1254)
SOURCE(15574, 47)
   node←v10588 = (* (( (ptr) sel←v6924)+2) );
SOURCE(15623, 31)
   {
      word pd103;
      pd103 = (* (( (ptr) (* (( (ptr) gf←c38084)+78)/* var←c33828 */  ))+6) );
      size←v10616 = (word) ( *( (fPt) ((*  (ptr) pd103 ))))(node←v10588, pd103);
      };
SOURCE(15656, 81)
   if ( ( ( (int)(* (( (ptr) sel←v6924)+4) ) ==  (int)(* (( (ptr) sel←v6924)+13) )) ? ( (int)(* (( (ptr) sel←v6924)+3) ) >=  (int)size←v10616) : 0 ) ) {
SOURCE(15722, 15)
      return(0);
      };
SOURCE(15739, 354)
   {
      word var←c35780;
      word var←c35812;
      var←c35780 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38084)+84)/* var←c35396 */  ))+19) ) );
      if ((var←c35780 == 0)) {
SOURCE(15789, 139)
         {
            word tc104;
            word limit105;
            if ( (  ( (XR←EqualWords((( (ptr) sel←v6924)+2), (( (ptr) sel←v6924)+11), 2)) ? ((* (( (ptr) sel←v6924)+22) ) == 1) : 0 )  ? (0 != rightOfLine←v7008) : 0 ) ) {
               var←c35812 = (* (( (ptr) tdd←v7036)+1) );
               tc104 =  (word) (( (((unsigned)(* (( (ptr) (( (W9Pt) (( (ptr) var←c35812)+3))+(
                        limit105 = (* (( (ptr) var←c35812)+2) ),
                        BCK(line←v6980, limit105)
                        )))+2) ) << 1) >> 1) ) == 0);
               }
            else {
               tc104 =  (word) 0;
               };
            if (tc104) {
               return(1);
               }
            else {
               return(0);
               };
            };
         }
      else {
         if ((var←c35780 == 1)) {
SOURCE(15939, 154)
            if ( (  (  ( ( (int)(* (( (ptr) sel←v6924)+3) ) ==  (int)0) ? XR←EqualWords((( (ptr) sel←v6924)+2), (( (ptr) sel←v6924)+11)
               , 2) : 0 )  ? ((* (( (ptr) sel←v6924)+22) ) == 1) : 0 )  ? ( (int)(x←v6952 - (* (( (ptr) sel←v6924)+5) )) <=  (int)(((* (
               ( (ptr) sel←v6924)+14) ) + (* (( (ptr) sel←v6924)+16) )) - x←v6952)) : 0 ) ) {
               return(0);
               }
            else {
               return(1);
               };
            };
         };
      };
SOURCE(16104, 480)
   if (( (int)(* (( (ptr) sel←v6924)+4) ) ==  (int)line←v6980)) {
      {
         word var←c35876;
         word c←v32644;
         word var←c35940;
         word c←v13372;
SOURCE(16134, 41)
         if (( (int)(* (( (ptr) sel←v6924)+13) ) !=  (int)line←v6980)) {
SOURCE(16160, 15)
            return(0);
            };
SOURCE(16177, 49)
         if (( (int)(* (( (ptr) sel←v6924)+3) ) >=  (int)size←v10616)) {
SOURCE(16211, 15)
            return(0);
            };
SOURCE(16228, 231)
         if ((0 != rightOfLine←v7008)) {
SOURCE(16250, 209)
            {
               word tc106;
               if ( ( (XR←EqualWords((( (ptr) sel←v6924)+2), (( (ptr) sel←v6924)+11), 2)) ? ( (int)((* (( (ptr) sel←v6924)+3) ) + 1) <  (int)size←v10616) : 0 ) ) {
                  {
                     word pd107;
                     pd107 = (* (( (ptr) (* (( (ptr) gf←c38084)+78)/* var←c33828 */  ))+4) );
                     c←v32644 = (word) ( *( (fPt) ((*  (ptr) pd107 ))))(node←v10588, (* (( (ptr) sel←v6924)+3) ), pd107);
                     };
                  {
                     word tc108;
                     if (((c←v32644 >> 8) == 0)) {
                        c←v13372 = (c←v32644 & 0377);
                        var←c35940 = ((word) (* (( (bPt) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38084)+83)/* var←c35236 */  ))+4) ) ))+c←v13372) ) == 1);
                        tc108 =  (word) (0 != var←c35940);
                        }
                     else {
                        tc108 =  (word) 0;
                        };
                     var←c35876 = tc108;
                     };
                  tc106 =  (word) (0 != var←c35876);
                  }
               else {
                  tc106 =  (word) 0;
                  };
               if (tc106) {
                  return(0);
                  }
               else {
                  return(1);
                  };
               };
            };
SOURCE(16464, 72)
         if (( (int)(x←v6952 - (* (( (ptr) sel←v6924)+5) )) <=  (int)(((* (( (ptr) sel←v6924)+14) ) + (* (( (ptr) sel←v6924)+16) )) - x←v6952))) {
            return(0);
            }
         else {
            return(1);
            };
         };
      }
   else {
SOURCE(16545, 39)
      if (( (int)(* (( (ptr) sel←v6924)+13) ) ==  (int)line←v6980)) {
SOURCE(16571, 13)
         return(1);
         };
      };
SOURCE(16586, 74)
   if (( (int)(line←v6980 - (* (( (ptr) sel←v6924)+4) )) <=  (int)((* (( (ptr) sel←v6924)+13) ) - line←v6980))) {
      return(0);
      }
   else {
      return(1);
      };
   }

static word ResolveToChar←P900(selection←v7140, viewer←v7168, tdd←v7196, x←v7224, y←v7252)
   word selection←v7140;
   word viewer←v7168;
   word tdd←v7196;
   word x←v7224;
   word y←v7252;
   {
   register ptr gf←c38116 =  (ptr) &globalframe;
   word rightOfLine←v7296;
   word lines←v10660 = 0;
   word line←v10688 = 0;
   word lastLine←v10716;
   /* ResolveToChar: */ 
SOURCE(16699, 1186)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c38116)+16)/* LOCK←v3504 */ ));
SOURCE(16965, 21)
   lines←v10660 = (* (( (ptr) tdd←v7196)+1) );
SOURCE(16988, 32)
   {
      word var←c35972;
      var←c35972 = (*  (ptr) lines←v10660 );
      lastLine←v10716 = var←c35972;
      line←v10688 = var←c35972;
      };
SOURCE(17022, 31)
   y←v7252 = (y←v7252 - (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38116)+84)/* var←c35396 */  ))+17) ) ));
SOURCE(17104, 454)
   {
      word limit109;
      word limit110;
      if (( (int)y←v7252 >  (int)((* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
               limit109 = (* (( (ptr) lines←v10660)+2) ),
               BCK(lastLine←v10716, limit109)
               )))+6) ) + (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
               limit110 = (* (( (ptr) lines←v10660)+2) ),
               BCK(lastLine←v10716, limit110)
               )))+4) )))) {
SOURCE(17187, 16)
         x←v7224 = ((* (( (ptr) viewer←v7168)+7) ) + 10);
         }
      else {
SOURCE(17212, 346)
         {
            register word n←v10760 = 1;
            register word noName←c36004;
            noName←c36004 = lastLine←v10716;
            if (( (int)n←v10760 >  (int)noName←c36004)) {
               goto lab←L100027;
               };
            lab←L100030: ;
SOURCE(17274, 284)
            {
               word limit111;
               if (( (int)(* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
                        limit111 = (* (( (ptr) lines←v10660)+2) ),
                        BCK(n←v10760, limit111)
                        )))+6) ) >=  (int)y←v7252)) {
SOURCE(17304, 262)
                  {
                     word bottomOfUpper←v10804;
                     word topOfLower←v10832;
                     word break←v10860;
SOURCE(17306, 62)
                     {
                        word var←c36036;
                        word var←c0417;
                        word var←c36068;
                        word var←c0418;
                        {
                           word limit112;
                           var←c36036 = (n←v10760 - 1);
                           var←c0417 = (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
/*1*/         limit112 = (* (( (ptr) lines←v10660)+2) ),
/*1*/         BCK(var←c36036, limit112)
/*1*/         )))+6) );
                           };
                        {
                           word limit113;
                           var←c36068 = (n←v10760 - 1);
                           var←c0418 = (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
/*1*/         limit113 = (* (( (ptr) lines←v10660)+2) ),
/*1*/         BCK(var←c36068, limit113)
/*1*/         )))+4) );
                           };
                        bottomOfUpper←v10804 = (var←c0417 + var←c0418);
                        };
SOURCE(17370, 54)
                     {
                        word limit114;
                        word limit115;
                        topOfLower←v10832 = ((* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
/*1*/      limit114 = (* (( (ptr) lines←v10660)+2) ),
/*1*/      BCK(n←v10760, limit114)
/*1*/      )))+6) ) - (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
/*1*/      limit115 = (* (( (ptr) lines←v10660)+2) ),
/*1*/      BCK(n←v10760, limit115)
/*1*/      )))+3) ));
                        };
SOURCE(17426, 95)
                     {
                        word var←c36100;
                        word var←c0419;
                        word var←c0420;
                        {
                           word limit116;
                           var←c36100 = (n←v10760 - 1);
                           var←c0419 = (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
/*1*/         limit116 = (* (( (ptr) lines←v10660)+2) ),
/*1*/         BCK(var←c36100, limit116)
/*1*/         )))+6) );
                           };
                        {
                           word x117;
                           var←c0420 = (x117 = IOP2( / ,  (int)(bottomOfUpper←v10804 + topOfLower←v10832),  (int)2),
/*1*/   MAX((int)(word), x117, var←c0419));
                           };
                        {
                           word limit118;
                           word x119;
                           break←v10860 = (x119 = ((* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
/*1*/            limit118 = (* (( (ptr) lines←v10660)+2) ),
/*1*/            BCK(n←v10760, limit118)
/*1*/            )))+6) ) - 1),
/*1*/   MIN((int)(word), var←c0420, x119));
                           };
                        };
SOURCE(17523, 35)
                     if (( (int)y←v7252 <  (int)break←v10860)) {
                        line←v10688 = (n←v10760 - 1);
                        }
                     else {
                        line←v10688 = n←v10760;
                        };
SOURCE(17560, 4)
                     goto lab←L100028;
                     };
                  };
               };
            if (( (int)n←v10760 >=  (int)noName←c36004)) {
               goto lab←L100027;
               };
            n←v10760 = (n←v10760 + 1);
            goto lab←L100030;
            lab←L100027: ;
            lab←L100028: ;
            };
         };
      };
SOURCE(17578, 58)
   {
      word limit120;
      word limit121;
      (* (( (ptr) selection←v7140)+6) ) = ((* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
               limit120 = (* (( (ptr) lines←v10660)+2) ),
               BCK(line←v10688, limit120)
               )))+6) ) - (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
               limit121 = (* (( (ptr) lines←v10660)+2) ),
               BCK(line←v10688, limit121)
               )))+3) ));
      };
SOURCE(17638, 86)
   {
      word limit122;
      word limit123;
      word x124;
      word x125;
      word idx126;
      (* (( (ptr) selection←v7140)+8) ) = (
         idx126 = (word) ((* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
                  limit122 = (* (( (ptr) lines←v10660)+2) ),
                  BCK(line←v10688, limit122)
                  )))+3) ) + (x124 = (* (( (ptr) (( (W9Pt) (( (ptr) lines←v10660)+3))+(
                     limit123 = (* (( (ptr) lines←v10660)+2) ),
                     BCK(line←v10688, limit123)
                     )))+4) ),
            x125 = (* (( (ptr) gf←c38116)+13)/* selectionDescentLimit←v4008 */  ),
            MIN( (unsigned) , x124, x125))),
         SGNCK(idx126)
         );
      };
SOURCE(17726, 27)
   (* (( (ptr) selection←v7140)+4) ) = line←v10688;
SOURCE(17755, 21)
   (void) GetLine←P1320(viewer←v7168, line←v10688);
SOURCE(17778, 107)
   {
      W5 var←c36132;
      {
         word pd127;
         pd127 = (* (( (ptr) (* (( (ptr) gf←c38116)+74)/* var←c33444 */  ))+7) );
         (void) ( *( (fPt) ((*  (ptr) pd127 ))))((word) &var←c36132, (* (( (ptr) gf←c38116)+16)/* lineInfo←v4260 */  ), x←v7224, pd127)
         ;
         };
      rightOfLine←v7296 = var←c36132.f4;
      (* (( (ptr) selection←v7140)+7) ) = var←c36132.f3;
      (* (( (ptr) selection←v7140)+5) ) = var←c36132.f2;
      (*  (W2Pt) (( (ptr) selection←v7140)+2) ) = (*  (W2Pt) &var←c36132 );
      };
SOURCE(16699, 1186)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c38116)+16)/* LOCK←v3504 */ ));
   return(rightOfLine←v7296);
   }

static void GrowSelectionToBlanks←P960()
   {
   W6 var←c38148;
   /* declaration of var←c36164 skipped */ 
   /* GrowSelectionToBlanks: */ 
SOURCE(17891, 159)
   {
      word tmpAddr128;
      tmpAddr128 = (word) (( (ptr) &var←c38148)+4)/* var←c36164 */ ;
      (*  (ptr) tmpAddr128 ) = ( ((word)  (fPt) Blank←P2220) );
      (* (( (ptr) tmpAddr128) + 1) ) = 1;
      };
SOURCE(18010, 40)
   (void) GrowSelectionToSomething←P1020((word) (( (bPt) &var←c38148)+16)/* var←c36164 */ , (word) (( (bPt) &var←c38148)+16)
      /* var←c36164 */ );
   }

static word Blank←P2220(char←v10980, formal←c38212)
   word char←v10980;
   word formal←c38212;
   {
   register ptr gf←c38180 =  (ptr) &globalframe;
   word var←c11024;
   formal←c38212 = (formal←c38212 - 16);
   /* Blank: */ 
SOURCE(17930, 77)
SOURCE(17977, 30)
   return(((word) (* (( (bPt) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38180)+83)/* var←c35236 */  ))+4) ) ))+char←v10980) ) == 1));
   }

static void GrowSelectionToSomething←P1020(left←v7372, right←v7400)
   word left←v7372;
   word right←v7400;
   {
   register ptr gf←c38244 =  (ptr) &globalframe;
   word tSel←v11052 = 0;
   word cSel←v11080 = 0;
   word selection←v11108;
   word start←v11136 = 0;
   word end←v11164 = 0;
   word startPos←v11192;
   word endPos←v11220;
   word endLen←v11248;
   word ropeReader←v11276 = 0;
   /* GrowSelectionToSomething: */ 
SOURCE(18054, 1692)
SOURCE(18309, 26)
   cSel←v11080 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+5) ) );
SOURCE(18337, 21)
   selection←v11108 = 1;
SOURCE(18360, 100)
   if ((cSel←v11080 == 0) || ((*  (ptr) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+5) ) ) ) == 0)) {
SOURCE(18413, 26)
      cSel←v11080 = (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+4) ) );
SOURCE(18441, 19)
      selection←v11108 = 0;
      };
SOURCE(18465, 42)
   if ((cSel←v11080 == 0) || ((*  (ptr) cSel←v11080 ) == 0)) {
SOURCE(18501, 6)
      return;
      };
SOURCE(18509, 29)
   {
      word pd129;
      pd129 = (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+10) );
      tSel←v11052 = (word) ( *( (fPt) ((*  (ptr) pd129 ))))(pd129);
      };
SOURCE(18540, 45)
   {
      word pd130;
      pd130 = (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd130 ))))(cSel←v11080, tSel←v11052, pd130);
      };
SOURCE(18587, 27)
   start←v11136 = (* (( (ptr) tSel←v11052)+2) );
SOURCE(18616, 39)
   {
      word pd131;
      pd131 = (* (( (ptr) (* (( (ptr) gf←c38244)+81)/* var←c35012 */  ))+26) );
      ropeReader←v11276 = (word) ( *( (fPt) ((*  (ptr) pd131 ))))(pd131);
      };
SOURCE(18657, 86)
   {
      word reader←v31748;
      word rope←v31776;
      word index←v31804;
      word var←c36196;
      word rope←v31852;
      reader←v31748 = ropeReader←v11276;
      {
         word pd132;
         pd132 = (* (( (ptr) (* (( (ptr) gf←c38244)+82)/* var←c35076 */  ))+4) );
         rope←v31776 = (word) ( *( (fPt) ((*  (ptr) pd132 ))))(start←v11136, pd132);
         };
      index←v31804 = (* (( (ptr) tSel←v11052)+3) );
      {
         word tc133;
         rope←v31852 = 0;
         var←c36196 = (* (( (ptr) reader←v31748)+2) );
         if (((var←c36196 == rope←v31776)
         )) {
            tc133 =  (word) ( (int)((* (( (ptr) reader←v31748)+3) ) + (* (( (ptr) reader←v31748)+1) )) ==  (int)index←v31804);
            }
         else {
            tc133 =  (word) 0;
            };
         if (tc133) {
            goto lab←L100032;
            };
         };
      (* (( (ptr) reader←v31748)+2) ) = rope←v31776;
      (* (( (ptr) reader←v31748)+1) ) = 0;
      (*  (hPt) (*  (ptr) reader←v31748 ) ) = 0;
      (* (( (ptr) reader←v31748)+3) ) = index←v31804;
      lab←L100032: ;
      };
SOURCE(18745, 200)
   lab←L100035: ;
SOURCE(18745, 200)
   {
      word loc←v11320;
      word var←c36228;
SOURCE(18798, 42)
      loc←v11320 = ((* (( (ptr) ropeReader←v11276)+3) ) + (* (( (ptr) ropeReader←v11276)+1) ));
SOURCE(18842, 30)
      if (( (int)loc←v11320 ==  (int)0)) {
SOURCE(18860, 12)
         startPos←v11192 = 0;
SOURCE(18874, 5)
         goto lab←L100034;
         };
SOURCE(18882, 63)
      {
         word var←c36260;
         word reader←v32444;
         reader←v32444 = ropeReader←v11276;
         {
            word i←v32476;
            i←v32476 = (* (( (ptr) reader←v32444)+1) );
            {
               word pd135;
               if ((i←v32476 > 0)) {
                  {
                     word var←c36324;
                     word var←c36356;
                     var←c36324 = SGNCK((i←v32476 - 1));
                     (* (( (ptr) reader←v32444)+1) ) = var←c36324;
                     var←c36356 = (*  (ptr) reader←v32444 );
                     {
                        word limit134;
                        var←c36260 = (word) (* ((( (bPt) var←c36356)+4)+(
/*1*/   limit134 = (word) (* (( (hPt) var←c36356)+1) ),
/*1*/   BCK(var←c36324, limit134)
/*1*/   )) );
                        };
                     };
                  }
               else {
                  pd135 = (* (( (ptr) (* (( (ptr) gf←c38244)+81)/* var←c35012 */  ))+17) );
                  var←c36260 = (word) ( *( (fPt) ((*  (ptr) pd135 ))))(reader←v32444, 1, pd135);
                  };
               };
            };
         var←c36228 = var←c36260;
         };
      if ((0 != (word) ( *( (fPt) ((*  (ptr) left←v7372 ))))(var←c36228, left←v7372))) {
SOURCE(18931, 14)
         startPos←v11192 = loc←v11320;
SOURCE(18947, 5)
         goto lab←L100034;
         };
      };
   goto lab←L100035;
   lab←L100034: ;
SOURCE(18964, 31)
   (* (( (ptr) tSel←v11052)+3) ) = startPos←v11192;
SOURCE(18997, 23)
   end←v11164 = (* (( (ptr) tSel←v11052)+11) );
SOURCE(19022, 84)
   if (((* (( (ptr) tSel←v11052)+22) ) == 0)) {
      endPos←v11220 = (* (( (ptr) tSel←v11052)+12) );
      }
   else {
      endPos←v11220 = ((* (( (ptr) tSel←v11052)+12) ) + 1);
      };
SOURCE(19108, 46)
   {
      word var←c36420;
      {
         word pd136;
         pd136 = (* (( (ptr) (* (( (ptr) gf←c38244)+82)/* var←c35076 */  ))+4) );
         var←c36420 = (word) ( *( (fPt) ((*  (ptr) pd136 ))))(end←v11164, pd136);
         };
      {
         word pd137;
         pd137 = (* (( (ptr) (* (( (ptr) gf←c38244)+85)/* var←c36452 */  ))+15) );
         endLen←v11248 = (word) ( *( (fPt) ((*  (ptr) pd137 ))))(var←c36420, pd137);
         };
      };
SOURCE(19156, 70)
   {
      word reader←v31600;
      word rope←v31628;
      word index←v31656;
      word var←c36484;
      word rope←v31704;
      reader←v31600 = ropeReader←v11276;
      {
         word pd138;
         pd138 = (* (( (ptr) (* (( (ptr) gf←c38244)+82)/* var←c35076 */  ))+4) );
         rope←v31628 = (word) ( *( (fPt) ((*  (ptr) pd138 ))))(end←v11164, pd138);
         };
      index←v31656 = endPos←v11220;
      {
         word tc139;
         rope←v31704 = 0;
         var←c36484 = (* (( (ptr) reader←v31600)+2) );
         if (((var←c36484 == rope←v31628)
         )) {
            tc139 =  (word) ( (int)((* (( (ptr) reader←v31600)+3) ) + (* (( (ptr) reader←v31600)+1) )) ==  (int)index←v31656);
            }
         else {
            tc139 =  (word) 0;
            };
         if (tc139) {
            goto lab←L100038;
            };
         };
      (* (( (ptr) reader←v31600)+2) ) = rope←v31628;
      (* (( (ptr) reader←v31600)+1) ) = 0;
      (*  (hPt) (*  (ptr) reader←v31600 ) ) = 0;
      (* (( (ptr) reader←v31600)+3) ) = index←v31656;
      lab←L100038: ;
      };
SOURCE(19228, 200)
   lab←L100041: ;
SOURCE(19228, 200)
   {
      word loc←v11364;
      word var←c36516;
SOURCE(19280, 42)
      loc←v11364 = ((* (( (ptr) ropeReader←v11276)+3) ) + (* (( (ptr) ropeReader←v11276)+1) ));
SOURCE(19324, 38)
      if (( (int)loc←v11364 ==  (int)endLen←v11248)) {
SOURCE(19347, 15)
         endPos←v11220 = endLen←v11248;
SOURCE(19364, 5)
         goto lab←L100040;
         };
SOURCE(19372, 56)
      {
         word var←c36548;
         word text←v32212;
         word i←v32240;
         text←v32212 = (*  (ptr) ropeReader←v11276 );
         i←v32240 = (* (( (ptr) ropeReader←v11276)+1) );
         {
            word pd141;
            if ((i←v32240 < (*  (hPt) text←v32212 ))) {
               (* (( (ptr) ropeReader←v11276)+1) ) = (i←v32240 + 1);
               {
                  word limit140;
                  var←c36548 = (word) (* ((( (bPt) text←v32212)+4)+(
                        limit140 = (word) (* (( (hPt) text←v32212)+1) ),
                        BCK(i←v32240, limit140)
                        )) );
                  };
               }
            else {
               pd141 = (* (( (ptr) (* (( (ptr) gf←c38244)+81)/* var←c35012 */  ))+17) );
               var←c36548 = (word) ( *( (fPt) ((*  (ptr) pd141 ))))(ropeReader←v11276, 0, pd141);
               };
            };
         var←c36516 = var←c36548;
         };
      if ((0 != (word) ( *( (fPt) ((*  (ptr) right←v7400 ))))(var←c36516, right←v7400))) {
SOURCE(19416, 12)
         endPos←v11220 = loc←v11364;
SOURCE(19430, 5)
         goto lab←L100040;
         };
      };
   goto lab←L100041;
   lab←L100040: ;
SOURCE(19447, 37)
   {
      word pd142;
      pd142 = (* (( (ptr) (* (( (ptr) gf←c38244)+81)/* var←c35012 */  ))+27) );
      (void) ( *( (fPt) ((*  (ptr) pd142 ))))(ropeReader←v11276, pd142);
      };
SOURCE(19486, 29)
   (* (( (ptr) tSel←v11052)+12) ) = (endPos←v11220 - 1);
SOURCE(19517, 80)
   if ( ( ( (int)(endPos←v11220 - startPos←v11192) >  (int)1) ? ((* (( (ptr) tSel←v11052)+22) ) == 0) : 0 ) ) {
SOURCE(19574, 23)
      (* (( (ptr) tSel←v11052)+22) ) = 1;
      };
SOURCE(19599, 55)
   if (((* (( (ptr) tSel←v11052)+22) ) != 0)) {
SOURCE(19632, 22)
      (* (( (ptr) tSel←v11052)+24) ) = 1;
      };
SOURCE(19656, 61)
   {
      word pd143;
      pd143 = (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+25) );
      (void) ( *( (fPt) ((*  (ptr) pd143 ))))(tSel←v11052, selection←v11108, 0, 0, 1, pd143);
      };
SOURCE(19719, 27)
   {
      word pd144;
      pd144 = (* (( (ptr) (* (( (ptr) gf←c38244)+75)/* var←c33540 */  ))+11) );
      (void) ( *( (fPt) ((*  (ptr) pd144 ))))(tSel←v11052, pd144);
      };
   }

static void GrowSelection←P1080()
   {
   register ptr gf←c38276 =  (ptr) &globalframe;
   word tSel←v11408 = 0;
   /* GrowSelection: */ 
SOURCE(19750, 1254)
SOURCE(19812, 72)
   if (((*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+4) ) ) == 0) || ((*  (ptr) (*  (ptr) (* (( (ptr) (* (
         ( (ptr) gf←c38276)+75)/* var←c33540 */  ))+4) ) ) ) == 0)) {
SOURCE(19878, 6)
      return;
      };
SOURCE(19886, 29)
   {
      word pd145;
      pd145 = (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+10) );
      tSel←v11408 = (word) ( *( (fPt) ((*  (ptr) pd145 ))))(pd145);
      };
SOURCE(19917, 60)
   {
      word pd146;
      pd146 = (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd146 ))))((*  (ptr) (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+4) ) ), tSel←v11408, pd146)
      ;
      };
SOURCE(19979, 934)
   {
      word var←c36612;
      var←c36612 = (* (( (ptr) tSel←v11408)+22) );
      switch (var←c36612) {
         case 0: 
SOURCE(20019, 23)
            (* (( (ptr) tSel←v11408)+22) ) = 1;
            break;
         case 1: 
SOURCE(20055, 168)
            {
               word start←v11452;
               word end←v11480;
SOURCE(20074, 23)
               (* (( (ptr) tSel←v11408)+22) ) = 2;
SOURCE(20099, 49)
               {
                  W3 var←c36644;
                  (void) ExpandToWord←P780((word) &var←c36644, (*  (W2Pt) (( (ptr) tSel←v11408)+2) ), 0);
                  end←v11480 = var←c36644.f1;
                  start←v11452 = var←c36644.f0;
                  };
SOURCE(20150, 28)
               (* (( (ptr) tSel←v11408)+3) ) = start←v11452;
SOURCE(20180, 41)
               (* (( (ptr) tSel←v11408)+11) ) = (* (( (ptr) tSel←v11408)+2) );
               (* (( (ptr) tSel←v11408)+12) ) = end←v11480;
               };
            break;
         case 2: 
SOURCE(20236, 24)
            (* (( (ptr) tSel←v11408)+3) ) = 0;
SOURCE(20262, 55)
            {
               word pd147;
               pd147 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+36) );
               (* (( (ptr) tSel←v11408)+12) ) = (word) ( *( (fPt) ((*  (ptr) pd147 ))))((* ((( (ptr) tSel←v11408)+11)) ), pd147);
               };
SOURCE(20319, 128)
            {
               word var←c36708;
               {
                  word tc148;
                  word pd149;
                  if (((* (( (ptr) tSel←v11408)+2) ) == (* (( (ptr) tSel←v11408)+11) ))) {
                     pd149 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+28) );
                     tc148 =  (word) ((word) ( *( (fPt) ((*  (ptr) pd149 ))))((* ((( (ptr) tSel←v11408)+11)) ), pd149) == 0);
                     }
                  else {
                     tc148 =  (word) 0;
                     };
                  if (tc148) {
                     var←c36708 = 4;
                     }
                  else {
                     var←c36708 = 3;
                     };
                  };
               (* (( (ptr) tSel←v11408)+22) ) = var←c36708;
               };
            break;
         case 3: 
SOURCE(20462, 25)
            (* (( (ptr) tSel←v11408)+22) ) = 4;
SOURCE(20489, 58)
            {
               word pd150;
               pd150 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+26) );
               (* (( (ptr) tSel←v11408)+11) ) = (word) ( *( (fPt) ((*  (ptr) pd150 ))))((* ((( (ptr) tSel←v11408)+11)) ), pd150);
               };
SOURCE(20549, 55)
            {
               word pd151;
               pd151 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+36) );
               (* (( (ptr) tSel←v11408)+12) ) = (word) ( *( (fPt) ((*  (ptr) pd151 ))))((* ((( (ptr) tSel←v11408)+11)) ), pd151);
               };
            break;
         case 4: 
SOURCE(20619, 296)
            {
               word parent←v11524;
SOURCE(20621, 59)
               {
                  word pd152;
                  pd152 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+8) );
                  parent←v11524 = (word) ( *( (fPt) ((*  (ptr) pd152 ))))((* ((( (ptr) tSel←v11408)+2)) ), pd152);
                  };
SOURCE(20682, 94)
               {
                  word pd153;
                  pd153 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+8) );
                  if (((word) ( *( (fPt) ((*  (ptr) pd153 ))))(parent←v11524, pd153) == 0)) {
SOURCE(20735, 31)
                     {
                        word pd154;
                        pd154 = (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+48) );
                        (void) ( *( (fPt) ((*  (ptr) pd154 ))))(pd154);
                        };
SOURCE(20768, 8)
                     return;
                     };
                  };
SOURCE(20779, 28)
               (* (( (ptr) tSel←v11408)+2) ) = parent←v11524;
               (* (( (ptr) tSel←v11408)+3) ) = 0;
SOURCE(20809, 47)
               {
                  word pd155;
                  pd155 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+26) );
                  (* (( (ptr) tSel←v11408)+11) ) = (word) ( *( (fPt) ((*  (ptr) pd155 ))))(parent←v11524, pd155);
                  };
SOURCE(20858, 55)
               {
                  word pd156;
                  pd156 = (* (( (ptr) (* (( (ptr) gf←c38276)+79)/* var←c34212 */  ))+36) );
                  (* (( (ptr) tSel←v11408)+12) ) = (word) ( *( (fPt) ((*  (ptr) pd156 ))))((* ((( (ptr) tSel←v11408)+11)) ), pd156);
                  };
               };
            break;
         default: 
SOURCE(20929, 5)
            (void) XR←RaiseUnnamedError();
            break;
         };
      };
SOURCE(20936, 39)
   {
      word pd157;
      pd157 = (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+25) );
      (void) ( *( (fPt) ((*  (ptr) pd157 ))))(tSel←v11408, 0, 0, 0, 1, pd157);
      };
SOURCE(20977, 27)
   {
      word pd158;
      pd158 = (* (( (ptr) (* (( (ptr) gf←c38276)+75)/* var←c33540 */  ))+11) );
      (void) ( *( (fPt) ((*  (ptr) pd158 ))))(tSel←v11408, pd158);
      };
   }

static void InsertionPoint←P1140(formal←c0342, s←v7580)
   word formal←c0342;
   word s←v7580;
   {
   register ptr gf←c38308 =  (ptr) &globalframe;
   W2 ip←v7624;
   word nodeSel←v11568;
   word viewer←v11596;
   /* InsertionPoint: */ 
SOURCE(21008, 813)
SOURCE(21008, 813)
   ip←v7624.f0 = 0;
   ip←v7624.f1 = 0;
SOURCE(21123, 65)
   nodeSel←v11568 =  ( ((* (( (ptr) s←v7580)+22) ) == 3) ? 1 : ((* (( (ptr) s←v7580)+22) ) == 4) ) ;
SOURCE(21190, 39)
   viewer←v11596 = (*  (ptr) s←v7580 );
SOURCE(21231, 62)
   if ((viewer←v11596 == 0) || ((* (( (ptr) s←v7580)+1) ) != (* (( (ptr) viewer←v11596)+26) ))) {
SOURCE(21276, 17)
      ip←v7624.f0 = 0;
      ip←v7624.f1 = 0;
      goto lab←L100043;
      };
SOURCE(21328, 493)
   if ( ( (0 != nodeSel←v11568) ? ((* (( (ptr) s←v7580)+2) ) == 0) : 0 ) ) {
SOURCE(21369, 288)
      {
         word place←v11640;
         word node←v11668;
SOURCE(21371, 68)
         place←v11640 =  ( ((* (( (ptr) s←v7580)+24) ) == 0) ? 0 : 1 ) ;
SOURCE(21441, 80)
         node←v11668 =  ( (place←v11640 == 0) ? (* (( (ptr) s←v7580)+2) ) : (* (( (ptr) s←v7580)+11) ) ) ;
SOURCE(21523, 132)
         {
            word var←c36772;
            {
               word pd159;
               pd159 = (* (( (ptr) (* (( (ptr) gf←c38308)+79)/* var←c34212 */  ))+9) );
               var←c36772 = (word) ( *( (fPt) ((*  (ptr) pd159 ))))(node←v11668, pd159);
               };
            {
               word pd160;
               pd160 = (* (( (ptr) (* (( (ptr) gf←c38308)+80)/* var←c34468 */  ))+15) );
               ip←v7624.f0 = (word) ( *( (fPt) ((*  (ptr) pd160 ))))(var←c36772, node←v11668, place←v11640, 1, (*  (ptr) (* (( (ptr) (* (
                        ( (ptr) gf←c38308)+86)/* var←c36804 */  ))+6) ) ), pd160);
               };
            };
         ip←v7624.f1 = 0;
         };
      }
   else {
SOURCE(21666, 155)
      if (((* (( (ptr) s←v7580)+24) ) == 0)) {
SOURCE(21694, 16)
         ip←v7624 = (*  (W2Pt) (( (ptr) s←v7580)+2) );
         }
      else {
SOURCE(21717, 106)
         {
            word size←v11712;
SOURCE(21719, 41)
            {
               word pd161;
               pd161 = (* (( (ptr) (* (( (ptr) gf←c38308)+78)/* var←c33828 */  ))+6) );
               size←v11712 = (word) ( *( (fPt) ((*  (ptr) pd161 ))))((* ((( (ptr) s←v7580)+11)) ), pd161);
               };
SOURCE(21762, 59)
            ip←v7624.f0 = (* (( (ptr) s←v7580)+11) );
            {
               word x162;
               word x163;
               ip←v7624.f1 = (x163 = (x162 = ((* (( (ptr) s←v7580)+12) ) + 1),
                     MAX((int)(word), x162, 0)),
                  MIN((int)(word), x163, size←v11712));
               };
            };
         };
      };
   /* removed tail goto */ 
   lab←L100043: ;
   (*  (W2Pt) formal←c0342 ) = ip←v7624;
   return;
   }

static word GetSelectionGrain←P1200(sel←v7684)
   word sel←v7684;
   {
   word var←c7728;
   /* GetSelectionGrain: */ 
SOURCE(21833, 311)
SOURCE(21938, 72)
   if (((* (( (ptr) sel←v7684)+22) ) == 3) || ((* (( (ptr) sel←v7684)+22) ) == 4)) {
SOURCE(21997, 13)
      return(3);
      };
SOURCE(22012, 78)
   if ( ( ((* (( (ptr) sel←v7684)+22) ) == 0) ? XR←EqualWords((( (ptr) sel←v7684)+2), (( (ptr) sel←v7684)+11), 2) : 0 ) ) {
SOURCE(22076, 14)
      return(0);
      };
SOURCE(22092, 52)
   if (((* (( (ptr) sel←v7684)+22) ) == 2)) {
      return(2);
      }
   else {
      return(1);
      };
   }

static void InvalidateLineCache←P1260()
   {
   register ptr gf←c38340 =  (ptr) &globalframe;
   /* InvalidateLineCache: */ 
SOURCE(22278, 64)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c38340)+16)/* LOCK←v3504 */ ));
SOURCE(22321, 21)
   (* (( (ptr) gf←c38340)+14)/* lineInfoViewer←v4204 */  ) = 0;
SOURCE(22278, 64)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c38340)+16)/* LOCK←v3504 */ ));
   return;
   }

static void GetLine←P1320(viewer←v7804, line←v7832)
   word viewer←v7804;
   word line←v7832;
   {
   register ptr gf←c38372 =  (ptr) &globalframe;
   /* GetLine: */ 
SOURCE(22345, 708)
SOURCE(22418, 635)
   {
      word var←c36836;
      var←c36836 = (* (( (ptr) viewer←v7804)+26) );
      if ((var←c36836 == 0)) {
         goto lab←L100044;
         };
      if (((* (( (ptr) gf←c38372)+22) ) == XR←GetReferentType(var←c36836))) {
         {
            word tdd←v11756;
            tdd←v11756 = var←c36836;
SOURCE(22487, 571)
            {
               word lines←v11800;
SOURCE(22489, 46)
               lines←v11800 = (* (( (ptr) tdd←v11756)+1) );
SOURCE(22537, 516)
               if ((viewer←v7804 != (* (( (ptr) gf←c38372)+14)/* lineInfoViewer←v4204 */  )) || ( (int)line←v7832 !=  (int)(* (( (ptr) gf←c38372)+15)
               /* lineInfoLine←v4232 */  ))) {
SOURCE(22588, 467)
                  {
                     word style←v11844;
                     W2 pos←v11872;
                     word kind←v11900;
SOURCE(22590, 43)
                     {
                        word pd164;
                        pd164 = (* (( (ptr) (* (( (ptr) gf←c38372)+87)/* var←c36868 */  ))+6) );
                        style←v11844 = (word) ( *( (fPt) ((*  (ptr) pd164 ))))(pd164);
                        };
SOURCE(22635, 40)
                     {
                        word limit165;
                        pos←v11872 = (*  (W2Pt) (( (W9Pt) (( (ptr) lines←v11800)+3))+(
/*1*/   limit165 = (* (( (ptr) lines←v11800)+2) ),
/*1*/   BCK(line←v7832, limit165)
/*1*/   )) );
                        };
SOURCE(22677, 103)
                     {
                        word tc166;
                        word pd167;
                        pd167 = (* (( (ptr) (* (( (ptr) gf←c38372)+88)/* var←c36900 */  ))+29) );
                        if (((word) ( *( (fPt) ((*  (ptr) pd167 ))))(viewer←v7804, (* (( (ptr) gf←c38372)+25) ), pd167) == (* (( (ptr) gf←c38372)+27)
                         ))) {
                           tc166 =  (word) 1;
                           }
                        else {
                           tc166 =  (word) 0;
                           };
                        kind←v11900 = tc166;
                        };
SOURCE(22782, 56)
                     {
                        word pd168;
                        word limit169;
                        pd168 = (* (( (ptr) (* (( (ptr) gf←c38372)+87)/* var←c36868 */  ))+15) );
                        (void) ( *( (fPt) ((*  (ptr) pd168 ))))(style←v11844, (*  (ptr) (( (W9Pt) (( (ptr) lines←v11800)+3))+(
/*1*/      limit169 = (* (( (ptr) lines←v11800)+2) ),
/*1*/      BCK(line←v7832, limit169)
/*1*/      )) ), kind←v11900, pd168);
                        };
SOURCE(22840, 141)
                     {
                        word var←c36932;
                        {
                           word var←c36964;
                           word int←v31552;
                           int←v31552 = (* (( (ptr) viewer←v7804)+7) );
                           var←c36964 = (int←v31552 << 16);
                           var←c36932 = var←c36964;
                           };
                        {
                           word pd170;
                           pd170 = (* (( (ptr) (* (( (ptr) gf←c38372)+74)/* var←c33444 */  ))+5) );
                           (void) ( *( (fPt) ((*  (ptr) pd170 ))))((* (( (ptr) gf←c38372)+16)/* lineInfo←v4260 */  ), pos←v11872.f0, pos←v11872.f1, style←v11844, var←c36932, 0, pd170)
                           ;
                           };
                        };
SOURCE(22983, 23)
                     (* (( (ptr) gf←c38372)+14)/* lineInfoViewer←v4204 */  ) = viewer←v7804;
SOURCE(23008, 19)
                     (* (( (ptr) gf←c38372)+15)/* lineInfoLine←v4232 */  ) = line←v7832;
SOURCE(23029, 24)
                     {
                        word pd171;
                        pd171 = (* (( (ptr) (* (( (ptr) gf←c38372)+87)/* var←c36868 */  ))+7) );
                        (void) ( *( (fPt) ((*  (ptr) pd171 ))))(style←v11844, pd171);
                        };
                     };
                  };
               };
            };
         }
      else {
         lab←L100044: ;
         };
      };
   }

static void CharPositionInCachedLine←P1380(formal←c0363, viewer←v7892, line←v7920, pos←v7948)
   word formal←c0363;
   word viewer←v7892;
   word line←v7920;
   W2 pos←v7948;
   {
   register ptr gf←c38404 =  (ptr) &globalframe;
   word x←v7992;
   word width←v8020;
   /* CharPositionInCachedLine: */ 
SOURCE(23082, 227)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c38404)+16)/* LOCK←v3504 */ ));
SOURCE(23228, 21)
   (void) GetLine←P1320(viewer←v7892, line←v7920);
SOURCE(23251, 58)
   {
      W2 var←c37028;
      {
         word pd172;
         pd172 = (* (( (ptr) (* (( (ptr) gf←c38404)+74)/* var←c33444 */  ))+8) );
         (void) ( *( (fPt) ((*  (ptr) pd172 ))))((word) &var←c37028, (* (( (ptr) gf←c38404)+16)/* lineInfo←v4260 */  ), pos←v7948.f1, pd172)
         ;
         };
      width←v8020 = var←c37028.f1;
      x←v7992 = var←c37028.f0;
      };
   /* removed tail goto */ 
   (void) (XR←MonitorExit((word) (( (bPt) gf←c38404)+16)/* LOCK←v3504 */ ));
   (*  (ptr) formal←c0363 ) = x←v7992;
   (* (( (ptr) formal←c0363)+1) ) = width←v8020;
   return;
   }

static void NoName←Q4824(formal←c0368, formal←c200004, formal←c200005, formal←c200006, formal←c200007)
   word formal←c0368;
   word formal←c200004;
   word formal←c200005;
   word formal←c200006;
   word formal←c200007;
   {
   register ptr gf←c0409 =  (ptr) &globalframe;
   if ((formal←c200005 == XR←Unwind)) {
SOURCE(2622, 37)
      {
         word pd173;
         pd173 = (* (( (ptr) (* (( (ptr) gf←c0409)+77)/* var←c33668 */  ))+9) );
         (void) ( *( (fPt) ((*  (ptr) pd173 ))))((* ((( (ptr) (*  (ptr) formal←c200004 ))+6)) ), pd173);
         };
      };
   (*  (ptr) formal←c0368 ) = 0;
   (* (( (ptr) formal←c0368)+1) ) = 0;
   return;
   }

static void NoName←Q4884(formal←c0373, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c0373;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c0410 =  (ptr) &globalframe;
   if ((formal←c200001 == XR←Unwind)) {
SOURCE(2825, 30)
      {
         word pd174;
         pd174 = (* (( (ptr) (* (( (ptr) gf←c0410)+75)/* var←c33540 */  ))+22) );
         (void) ( *( (fPt) ((*  (ptr) pd174 ))))((* ((( (ptr) formal←c200000)+9)) ), pd174);
         };
      };
   (*  (ptr) formal←c0373 ) = 0;
   (* (( (ptr) formal←c0373)+1) ) = 0;
   return;
   }

/* file: TEditMouseImpl, module: TEditMouseImpl, compiled at: February 28, 1992 10:40:02 am PST */ 
extern void XR←install←TEditMouseImpl() {
   NoName←Q4644();
   }
extern void XR←run←TEditMouseImpl() { XR←Start(&globalframe); }