/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: February 27, 1992 7:05:37 pm PST */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: TEditDisplay2Impl, module: TEditDisplay2Impl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [420396262,1576743929] TEditDisplay2Impl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1;} W2;
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {W8 f; word r;} W9;
typedef W9 *W9Pt;
typedef W2 *W2Pt;
typedef struct {unsigned f:1, u2:7;} * P1x0b;
typedef struct {word f0, f1, f2, f3, f4;} W5;
typedef struct {W8 f; W5 r;} W13;
typedef struct {word f0, f1, f2, f3;} W4;
typedef W4 *W4Pt;
typedef struct {word f0, f1, f2, f3, f4, f5;} W6;
typedef struct {W8 f; W6 r;} W14;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W8 f; W3 r;} W11;
typedef struct {unsigned u1:7, f:1;} * P1x7b;
typedef struct {unsigned u1:8, f:24;} * P24x8w;
#define SOURCE(p, l) /* source p, l */
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
#define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i )
#define MAX(cast, x, y)  ( ( cast x) > ( cast y) ? (x) : (y) )
#define MIN(cast, x, y)  ( ( cast x) < ( cast y) ? (x) : (y) )
static void NoName←Q3300();
static void TEditDisplay2Impl←P0();
static void SetNewVersion←P60();
static void EstablishLine←P120();
static void UndoChangeViewer←P180();
static word AlreadySaved←P240();
static void SaveViewerPos←P300();
static void UpdateAfterTextEdit←P360();
static void Update←P1536();
static word LineContainsPreviousBlank←P1596();
static void InvalidateSpan←P420();
static void InvalidateLinesInSpan←P1848();
static word NoName←Q3360();
static void InvalidateChildren←P480();
static void InvalidateBranch←P540();
static void InvalidateBranchAndNext←P600();
static void UpdateStartPos←P660();
static void UpdateViewerStartPos←P2004();
static void InvalidateDest←P720();
static void InvalidateDestLine←P2112();
static word NoName←Q3420();
static word NoName←Q3480();
static word FirstLevelParent←P780();
static word SpanIsBranches←P840();
static void SpanFromNodes←P900();
static word ViewerFromNode←P960();
static void NotifyBeforeEdit←P1020();
static void NotifyAfterEdit←P1080();
static void Init←P1140();
static void NoName←Q3540();
static void NoName←Q3600();
static void NoName←Q3660();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\343\357\262\137\300\144\166\356\317\100\164\000\000"};
static struct {unsigned f; char r[16];} string2 = {851981, "\006\005\000\001\004\001\054\001\070\001\100\114\001\000\000"};
static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\113\175\243\331\300\252\247\212\133\100\164\000\000"};
static struct {unsigned f; char r[36];} string4 = {2162721, "\006\014\000\001\060\001\064\001\070\001\074\001\100\100\001\100\124\001\100\130\001\100\134\001\100\140\001\100\144\001\100\150\001\000\000"};
static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\315\326\221\074\300\013\016\175\231\100\200\000\000"};
static struct {unsigned f; char r[20];} string6 = {1048592, "\007\000\040\007\004\101\342\004\036\004\012\014\004\006\016\016\000\000\000"};
static struct {unsigned f; char r[4];} string7 = {131076, "\216\251\000"};
static struct {unsigned f; char r[4];} string8 = {65537, "\001\000\000"};
static struct {unsigned f; char r[8];} string9 = {458760, "Visible"};
static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\031\016\274\346\300\135\373\063\371\100\164\000\000"};
static struct {unsigned f; char r[4];} string11 = {131074, "\003\022\000"};
static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\314\212\213\004\300\112\342\014\072\100\164\000\000"};
static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\315\326\221\074\300\013\016\175\231\100\150\000\000"};
static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\234\060\361\073\300\103\025\207\123\100\150\000\000"};
static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"};
static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\366\233\214\046\300\233\036\213\260\100\150\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\343\357\262\137\300\144\166\356\317\100\150\000\000"};
static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\013\141\323\354\300\341\005\243\127\100\150\000\000"};
static struct {unsigned f; char r[16];} string19 = {851984, "\257\300\343\112\327\166\300\041\341\335\211\100\150\000\000"};
static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\261\010\310\246\300\337\340\027\051\100\150\000\000"};
static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\042\224\360\026\300\243\254\175\360\100\150\000\000"};
static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\173\025\006\177\300\073\326\146\175\100\150\000\000"};
static struct {unsigned f; char r[16];} string23 = {851984, "\257\300\354\332\367\333\300\361\203\205\173\100\150\000\000"};
static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\320\263\152\354\300\340\215\053\236\100\150\000\000"};
static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\302\136\246\312\300\076\314\360\376\100\150\000\000"};
static struct {unsigned f; char r[24];} string26 = {1376280, "\211\011\010\105\166\145\156\164\122\145\160\300\302\136\246\312\300\076\314\360\376\000\000"};
static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\173\025\006\177\300\073\326\146\175\100\164\000\000"};
static struct {
   word f0[8]; word f8; word f9[10]; word f19; 
   word f20; word f21; word f22; word f23; 
   word f24; word f25; word f26; word f27; 
   word f28; word f29; word f30; word f31; 
   word f32; word f33; word f34; word f35; 
   word f36; word f37; word f38; word f39; 
   word f40; word f41; word f42; word f43; 
   word f44; word f45; word f46; word f47; 
   word f48; word f49; word f50; word f51; 
   word f52; word f53; word f54; word f55; 
   word f56; word f57; word f58[15]; 
   } globalframe = {
   {0}, 20, {0}, (word) Init←P1140, 
   0, (word) NotifyAfterEdit←P1080, 0, (word) NotifyBeforeEdit←P1020, 
   0, (word) ViewerFromNode←P960, 0, (word) SpanFromNodes←P900, 
   0, (word) SpanIsBranches←P840, 0, (word) FirstLevelParent←P780, 
   0, (word) InvalidateDest←P720, 0, (word) UpdateStartPos←P660, 
   0, (word) InvalidateBranchAndNext←P600, 0, (word) InvalidateBranch←P540, 
   0, (word) InvalidateChildren←P480, 0, (word) InvalidateSpan←P420, 
   0, (word) UpdateAfterTextEdit←P360, 0, (word) SaveViewerPos←P300, 
   0, (word) AlreadySaved←P240, 0, (word) UndoChangeViewer←P180, 
   0, (word) EstablishLine←P120, 0, (word) SetNewVersion←P60, 
   0, (word) TEditDisplay2Impl←P0, {0}
   };

static void NoName←Q3300()
   {
   register ptr gf←c0247 =  (ptr) &globalframe;
   word var←c25816;
   (* (( (ptr) gf←c0247)+10) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c0247)+12) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4);
   (* (( (ptr) gf←c0247)+13) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string6);
   (* (( (ptr) gf←c0247)+15) ) = (word) XR←GetTypeIndex((word) &string7, 0, (word) &string8);
   (*  (ptr) (( (bPt) gf←c0247)+72) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0247)+15) ), (word) &string9);
   (void) XR←DeclareGlobalFrame((word) "TEditDisplay2Impl", &globalframe, (word) XR←GetTypeIndex((word) &string10, 0, (word) &string11)
      , (word) (( (bPt) gf←c0247)+228)/* var←c23768 */ );
   var←c25816 = (word) XR←ImportInterface((word) "CharOps", (word) XR←GetTypeIndexS((word) (&string12)), 14);
   (* (( (ptr) gf←c0247)+64)/* var←c24504 */  ) = var←c25816;
   var←c25816 = (word) XR←ImportInterface((word) "EditNotify", (word) XR←GetTypeIndexS((word) (&string13)), 3);
   (* (( (ptr) gf←c0247)+70)/* var←c25784 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 1048580);
   var←c25816 = (word) XR←ImportInterface((word) "NodeProps", (word) XR←GetTypeIndexS((word) (&string14)), 28);
   (* (( (ptr) gf←c0247)+69)/* var←c25560 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 67639554);
   var←c25816 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string15)), 43);
   (* (( (ptr) gf←c0247)+62)/* var←c24248 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 67634434);
   var←c25816 = (word) XR←ImportInterface((word) "RopeReader", (word) XR←GetTypeIndexS((word) (&string16)), 25);
   (* (( (ptr) gf←c0247)+63)/* var←c24344 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 268033);
   (void) XR←ImportProcS(var←c25816, 67636482);
   (void) XR←ImportProcS(var←c25816, 67114496);
   var←c25816 = (word) XR←ImportInterface((word) "TEditDocument", (word) XR←GetTypeIndexS((word) (&string17)), 6);
   (* (( (ptr) gf←c0247)+68)/* var←c25400 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 67372289);
   var←c25816 = (word) XR←ImportInterface((word) "TEditInput", (word) XR←GetTypeIndexS((word) (&string18)), 44);
   (* (( (ptr) gf←c0247)+60)/* var←c23960 */  ) = var←c25816;
   var←c25816 = (word) XR←ImportInterface((word) "TEditSelection", (word) XR←GetTypeIndexS((word) (&string19)), 68);
   (* (( (ptr) gf←c0247)+65)/* var←c24568 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 135275779);
   (void) XR←ImportProcS(var←c25816, 269755394);
   var←c25816 = (word) XR←ImportInterface((word) "TextEdit", (word) XR←GetTypeIndexS((word) (&string20)), 39);
   (* (( (ptr) gf←c0247)+67)/* var←c24824 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 67371521);
   var←c25816 = (word) XR←ImportInterface((word) "TextNode", (word) XR←GetTypeIndexS((word) (&string21)), 34);
   (* (( (ptr) gf←c0247)+66)/* var←c24728 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 67372289);
   (void) XR←ImportProcS(var←c25816, 67372545);
   (void) XR←ImportProcS(var←c25816, 135007491);
   (void) XR←ImportProcS(var←c25816, 67372033);
   (void) XR←ImportProcS(var←c25816, 67374081);
   (void) XR←ImportProcS(var←c25816, 67373569);
   (void) XR←ImportProcS(var←c25816, 134481921);
   (void) XR←ImportProcS(var←c25816, 67376641);
   (void) XR←ImportProcS(var←c25816, 134485761);
   (void) XR←ImportProcS(var←c25816, 67377153);
   var←c25816 = (word) XR←ImportInterface((word) "UndoEvent", (word) XR←GetTypeIndexS((word) (&string22)), 5);
   (* (( (ptr) gf←c0247)+61)/* var←c24056 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 786691);
   var←c25816 = (word) XR←ImportInterface((word) "ViewerOps", (word) XR←GetTypeIndexS((word) (&string23)), 43);
   (* (( (ptr) gf←c0247)+59)/* var←c23832 */  ) = var←c25816;
   (void) XR←ImportProcS(var←c25816, 269569);
   var←c25816 = (word) XR←ExportInterface((word) "TEditDisplay", (word) XR←GetTypeIndexS((word) (&string24)), 4);
   (* (( (ptr) gf←c0247)+71)/* var←c25848 */  ) = var←c25816;
   (void) XR←ExportProcS(var←c25816, (word) (( (bPt) gf←c0247)+212)/* var←c23704 */ , 1048579);
   (void) XR←ExportProcS(var←c25816, (word) (( (bPt) gf←c0247)+172)/* var←c23544 */ , 2097413);
   (void) XR←ExportProcS(var←c25816, (word) (( (bPt) gf←c0247)+164)/* var←c23512 */ , 524802);
   (void) XR←ExportProcS(var←c25816, (word) (( (bPt) gf←c0247)+156)/* var←c23480 */ , 525058);
   var←c25816 = (word) XR←ExportInterface((word) "Tioga", (word) XR←GetTypeIndexS((word) (&string25)), 1);
   (* (( (ptr) gf←c0247)+72)/* var←c25880 */  ) = var←c25816;
   (void) XR←ExportType((word) "EventRep", (word) XR←GetTypeIndexS((word) (&string26)), (word) XR←GetTypeIndex((word) &string27, 0, (word) &string8)
      );
   }

static void TEditDisplay2Impl←P0(formal←c050, formal←c049)
   word formal←c050;
   word formal←c049;
   {
   /* TEditDisplay2Impl: */ 
SOURCE(743, 11446)
   /* moved to installation proc */ 
SOURCE(12183, 6)
   (void) Init←P1140();
   }

static void SetNewVersion←P60(viewer←v3948)
   word viewer←v3948;
   {
   register ptr gf←c25912 =  (ptr) &globalframe;
   /* SetNewVersion: */ 
SOURCE(1126, 189)
SOURCE(1167, 148)
   if ((viewer←v3948 != 0)) {
SOURCE(1188, 127)
      {
         word var←c23800;
         var←c23800 = (* (( (ptr) viewer←v3948)+26) );
         if ((var←c23800 == 0)) {
            goto lab←L100000;
            };
         if (((* (( (ptr) gf←c25912)+10) ) == XR←GetReferentType(var←c23800))) {
            {
               word tdd←v5912;
               tdd←v5912 = var←c23800;
SOURCE(1259, 56)
               if (((* (( (ptr) tdd←v5912)+11) ) == 0)) {
SOURCE(1284, 31)
                  {
                     word pd28;
                     if ( ( ( ! ((* (( (bPt) viewer←v3948)+76) ) & 04)) ?  ! ((* (( (bPt) viewer←v3948)+76) ) & 02) : 0 ) ) {
                        pd28 = (* (( (ptr) (* (( (ptr) gf←c25912)+59)/* var←c23832 */  ))+33) );
                        (void) ( *( (fPt) ((*  (ptr) pd28 ))))(viewer←v3948, pd28);
                        };
                     };
                  };
               };
            }
         else {
            lab←L100000: ;
            };
         };
      };
   }

static void EstablishLine←P120(tdd←v4008, newLine←v4036, position←v4064)
   word tdd←v4008;
   W2 newLine←v4036;
   word position←v4064;
   {
   register ptr gf←c25944 =  (ptr) &globalframe;
   word lines←v5956;
   /* EstablishLine: */ 
SOURCE(1341, 6726)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c25944)+16)/* LOCK←v3168 */ ));
SOURCE(1465, 46)
   lines←v5956 = (* (( (ptr) tdd←v4008)+1) );
SOURCE(1513, 6554)
   if ((lines←v5956 != 0)) {
SOURCE(1535, 6532)
      {
         word limit29;
         (*  (W2Pt) (( (W9Pt) (( (ptr) lines←v5956)+3))+(
               limit29 = (* (( (ptr) lines←v5956)+2) ),
               BCK(position←v4064, limit29)
               )) ) = newLine←v4036;
         };
SOURCE(1566, 6501)
      {
         word limit30;
         ((P1x0b) (( (bPt) (( (W9Pt) (( (bPt) lines←v5956)+12))+(
                  limit30 = (* (( (ptr) lines←v5956)+2) ),
                  BCK(position←v4064, limit30)
                  ))) + 8))->f = 0;
         };
      };
SOURCE(1341, 6726)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c25944)+16)/* LOCK←v3168 */ ));
   return;
   }

static void UndoChangeViewer←P180(undoRef←v4124, currentEvent←v4152)
   word undoRef←v4124;
   word currentEvent←v4152;
   {
   register ptr gf←c25976 =  (ptr) &globalframe;
   /* UndoChangeViewer: */ 
SOURCE(1604, 6463)
SOURCE(1674, 6393)
   {
      word var←c23864;
      var←c23864 = undoRef←v4124;
      if ((var←c23864 == 0)) {
         goto lab←L100001;
         };
      if (((*  (ptr) var←c23864 ) == 6)) {
         {
            word x←v6000;
            x←v6000 = var←c23864;
SOURCE(1729, 297)
            {
               word v←v6056;
SOURCE(1731, 26)
               v←v6056 = XR←Narrow((* (( (ptr) x←v6000)+1) ), (* (( (ptr) gf←c25976)+12) ));
SOURCE(1759, 6308)
               if ((v←v6056 != 0)) {
SOURCE(1775, 6292)
                  {
                     word var←c23896;
                     var←c23896 = (* (( (ptr) v←v6056)+26) );
                     if ((var←c23896 == 0)) {
                        goto lab←L100002;
                        };
                     if (((* (( (ptr) gf←c25976)+10) ) == XR←GetReferentType(var←c23896))) {
                        {
                           word tdd←v6100;
                           tdd←v6100 = var←c23896;
SOURCE(1841, 6226)
                           if ((0 == (word) AlreadySaved←P240(v←v6056))) {
SOURCE(1869, 110)
/*1*/   {
/*1*/      word lines←v6144;
SOURCE(1871, 46)
/*1*/      lines←v6144 = (* (( (ptr) tdd←v6100)+1) );
SOURCE(1919, 6148)
/*1*/      if ((lines←v6144 != 0)) {
SOURCE(1939, 6128)
/*1*/         {
/*1*/            word var←c23928;
/*1*/            W2 var←c0281;
/*1*/            {
/*1*/               word limit31;
/*1*/               var←c23928 = (* (( (ptr) tdd←v6100)+1) );
/*1*/               var←c0281 = (*  (W2Pt) (( (W9Pt) (( (ptr) var←c23928)+3))+(
/*1*/                     limit31 = (* (( (ptr) var←c23928)+2) ),
/*1*/                     BCK(0, limit31)
/*1*/                     )) );
/*1*/               };
/*1*/            (void) SaveViewerPos←P300(v←v6056, var←c0281);
/*1*/            };
/*1*/         };
/*1*/      };
/*1*/   };
SOURCE(1982, 6085)
                           (void) EstablishLine←P120(tdd←v6100, (*  (W2Pt) (( (ptr) x←v6000)+2) ), 0);
                           };
                        }
                     else {
                        lab←L100002: ;
                        };
                     };
                  };
               };
            };
         }
      else {
         lab←L100001: ;
         };
      };
   }

static word AlreadySaved←P240(v←v4224)
   word v←v4224;
   {
   register ptr gf←c26008 =  (ptr) &globalframe;
   word var←c4268;
   word k←v6188;
   /* AlreadySaved: */ 
SOURCE(2068, 365)
SOURCE(2118, 23)
   k←v6188 = (* (( (ptr) gf←c26008)+8)/* maxSearchDepth←v3420 */  );
SOURCE(2143, 51)
   if (((*  (ptr) (* (( (ptr) (* (( (ptr) gf←c26008)+60)/* var←c23960 */  ))+6) ) ) == 0)) {
SOURCE(2181, 13)
      return(1);
      };
SOURCE(2196, 206)
   {
      register word l←v6232;
      l←v6232 = (*  (ptr) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c26008)+60)/* var←c23960 */  ))+6) ) ) );
      lab←L100006: ;
      if ((l←v6232 != 0)) {
         }
      else {
         goto lab←L100003;
         };
SOURCE(2281, 88)
      {
         word var←c23992;
         var←c23992 = (* (( (ptr) l←v6232)+2) );
         if ((var←c23992 == 0)) {
            goto lab←L100007;
            };
         if (((*  (ptr) var←c23992 ) == 6)) {
            {
               word x←v6276;
               x←v6276 = var←c23992;
SOURCE(2338, 31)
               if (((* (( (ptr) x←v6276)+1) ) == v←v4224)) {
SOURCE(2357, 12)
                  return(1);
                  };
               };
            }
         else {
            lab←L100007: ;
            };
         };
SOURCE(2380, 22)
      k←v6188 = SGNCK((k←v6188 - 1));
      if ((k←v6188 == 0)) {
SOURCE(2402, 4)
         goto lab←L100004;
         };
      l←v6232 = (*  (ptr) l←v6232 );
      goto lab←L100006;
      lab←L100003: ;
      lab←L100004: ;
      };
SOURCE(2417, 16)
   return(0);
   }

static void SaveViewerPos←P300(viewer←v4328, oldLine←v4356)
   word viewer←v4328;
   W2 oldLine←v4356;
   {
   register ptr gf←c26040 =  (ptr) &globalframe;
   word notify←v6332;
   /* SaveViewerPos: */ 
SOURCE(2437, 5630)
SOURCE(2503, 58)
   notify←v6332 = XR←NewObject(16, (* (( (ptr) gf←c26040)+13) ));
   (*  (ptr) notify←v6332 ) = 6;
SOURCE(2563, 5504)
   (*  (ptr) notify←v6332 ) = 6;
   (* (( (ptr) notify←v6332)+1) ) = viewer←v4328;
   (*  (W2Pt) (( (ptr) notify←v6332)+2) ) = oldLine←v4356;
SOURCE(2606, 67)
   {
      word pd32;
      pd32 = (* (( (ptr) (* (( (ptr) gf←c26040)+61)/* var←c24056 */  ))+5) );
      (void) ( *( (fPt) ((*  (ptr) pd32 ))))((*  (ptr) (* (( (ptr) (* (( (ptr) gf←c26040)+60)/* var←c23960 */  ))+6) ) ), (word) (
            ( (bPt) gf←c26040)+204)/* var←c23672 */ , notify←v6332, pd32);
      };
   }

static void UpdateAfterTextEdit←P360(viewer←v4416, formal←c0298, formal←c0299, formal←c0300, oldlen←v4528, oldrope←v4556)
   word viewer←v4416;
   word formal←c0298;
   word formal←c0299;
   word formal←c0300;
   word oldlen←v4528;
   word oldrope←v4556;
   {
   W13 var←c26072;
   /* declaration of text←v4444 skipped */ 
   /* declaration of start←v4472 skipped */ 
   /* declaration of newlen←v4500 skipped */ 
   /* declaration of var←c24088 skipped */ 
   /* declaration of var←c24120 skipped */ 
   /* declaration of delta←v6388 skipped */ 
   /* declaration of end←v6416 skipped */ 
   (* (( (ptr) &var←c26072)+4)/* text←v4444 */  ) = formal←c0298;
   (* (( (ptr) &var←c26072)+5)/* start←v4472 */  ) = formal←c0299;
   (* (( (ptr) &var←c26072)+6)/* newlen←v4500 */  ) = formal←c0300;
   /* UpdateAfterTextEdit: */ 
SOURCE(2677, 5390)
   {
      word tmpAddr33;
      tmpAddr33 = (word) (( (ptr) &var←c26072)+7)/* var←c24088 */ ;
      (*  (ptr) tmpAddr33 ) = ( ((word)  (fPt) LineContainsPreviousBlank←P1596) );
      (* (( (ptr) tmpAddr33) + 1) ) = 1;
      };
   {
      word tmpAddr34;
      tmpAddr34 = (word) (( (ptr) &var←c26072)+9)/* var←c24120 */ ;
      (*  (ptr) tmpAddr34 ) = ( ((word)  (fPt) Update←P1536) );
      (* (( (ptr) tmpAddr34) + 1) ) = 1;
      };
SOURCE(2785, 26)
   (* (( (ptr) &var←c26072)+11)/* delta←v6388 */  ) = ((* (( (ptr) &var←c26072)+6)/* newlen←v4500 */  ) - oldlen←v4528);
SOURCE(2813, 23)
   (* (( (ptr) &var←c26072)+12)/* end←v6416 */  ) = ((* (( (ptr) &var←c26072)+5)/* start←v4472 */  ) + oldlen←v4528);
SOURCE(4292, 14)
   (void) Update←P1536(viewer←v4416, (word) (( (bPt) &var←c26072)+36)/* var←c24120 */ );
SOURCE(4308, 74)
   {
      register word v←v6708;
      v←v6708 = (* (( (ptr) viewer←v4416)+21) );
      lab←L100011: ;
      if ( ( (v←v6708 != 0) ? (v←v6708 != viewer←v4416) : 0 ) ) {
         }
      else {
         goto lab←L100008;
         };
SOURCE(4373, 9)
      (void) Update←P1536(v←v6708, (word) (( (bPt) &var←c26072)+36)/* var←c24120 */ );
      v←v6708 = (* (( (ptr) v←v6708)+21) );
      goto lab←L100011;
      lab←L100008: ;
      };
   }

static void Update←P1536(v←v6548, formal←c26136)
   word v←v6548;
   word formal←c26136;
   {
   register ptr gf←c26104 =  (ptr) &globalframe;
   word tdd←v6752;
   word lines←v6780;
   formal←c26136 = (formal←c26136 - 36);
   /* Update: */ 
SOURCE(2838, 5229)
SOURCE(2867, 53)
   tdd←v6752 = XR←Narrow((* (( (ptr) v←v6548)+26) ), (* (( (ptr) gf←c26104)+10) ));
SOURCE(2922, 46)
   lines←v6780 = (* (( (ptr) tdd←v6752)+1) );
SOURCE(2970, 24)
   if ((tdd←v6752 == 0)) {
SOURCE(2988, 6)
      return;
      };
SOURCE(2996, 16)
   (void) SetNewVersion←P60(v←v6548);
SOURCE(3014, 5053)
   if ((0 == (word) AlreadySaved←P240(v←v6548))) {
SOURCE(3042, 5025)
      {
         word limit35;
         (void) SaveViewerPos←P300(v←v6548, (*  (W2Pt) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
                  limit35 = (* (( (ptr) lines←v6780)+2) ),
                  BCK(0, limit35)
                  )) ));
         };
      };
SOURCE(3101, 4966)
   {
      register word n←v6824;
      n←v6824 = (*  (ptr) lines←v6780 );
      if (( (int)0 >  (int)n←v6824)) {
         goto lab←L100012;
         };
      lab←L100015: ;
SOURCE(3153, 4914)
      {
         word limit36;
         if (((*  (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
               limit36 = (* (( (ptr) lines←v6780)+2) ),
               BCK(n←v6824, limit36)
               )) ) == (* (( (ptr) formal←c26136)+4) ))) {
SOURCE(3186, 579)
            {
               word where←v6868;
SOURCE(3188, 31)
               {
                  word limit37;
                  where←v6868 = (* (( (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
                           limit37 = (* (( (ptr) lines←v6780)+2) ),
                           BCK(n←v6824, limit37)
                           )))+1) );
                  };
SOURCE(3221, 4846)
               {
                  word tc38;
                  word limit39;
                  word x40;
                  word limit41;
                  word x42;
                  word x43;
                  if ((int)(* (( (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
                           limit39 = (* (( (ptr) lines←v6780)+2) ),
                           BCK(n←v6824, limit39)
                           )))+2) )<0) {
                     tc38 =  (word) ( (int)(x40 = (* (( (ptr) formal←c26136)+5) ),
                        MAX((int)(word), where←v6868, x40)) <=  (int)(x42 = (where←v6868 + (* (( (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/      limit41 = (* (( (ptr) lines←v6780)+2) ),
/*1*/      BCK(n←v6824, limit41)
/*1*/      )))+5) )),
                        x43 = (* (( (ptr) formal←c26136)+12) ),
                        MIN((int)(word), x42, x43)));
                     }
                  else {
                     tc38 =  (word) 0;
                     };
                  if (tc38) {
SOURCE(3301, 4766)
                     {
                        word limit44;
                        ((P1x0b) (( (bPt) (( (W9Pt) (( (bPt) lines←v6780)+12))+(
/*1*/      limit44 = (* (( (ptr) lines←v6780)+2) ),
/*1*/      BCK(n←v6824, limit44)
/*1*/      ))) + 8))->f = 0;
                        };
                     };
                  };
SOURCE(3325, 4742)
               {
                  word var←c24152;
                  word var←c24184;
                  word var←c0282;
                  word var←c24216;
                  word var←c24280;
                  word var←c24312;
                  var←c24152 = where←v6868;
                  if (( (int)var←c24152 <=  (int)(* (( (ptr) formal←c26136)+5) ))) {
SOURCE(3357, 4710)
                     {
                        word tc45;
                        word tc46;
                        word tc47;
                        word tc48;
                        word tc49;
                        word limit51;
                        word limit52;
                        if (( (int)n←v6824 >  (int)0)) {
                           {
/*1*/   word limit50;
/*1*/   var←c24184 = (n←v6824 - 1);
/*1*/   var←c0282 = (*  (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/         limit50 = (* (( (ptr) lines←v6780)+2) ),
/*1*/         BCK(var←c24184, limit50)
/*1*/         )) );
/*1*/   };
                           tc49 =  (word) (var←c0282 == (* (( (ptr) formal←c26136)+4) ));
                           }
                        else {
                           tc49 =  (word) 0;
                           };
                        if (tc49) {
                           var←c24216 = (n←v6824 - 1);
                           tc48 =  (word) (((unsigned)(* (( (bPt) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/         limit51 = (* (( (ptr) lines←v6780)+2) ),
/*1*/         BCK(var←c24216, limit51)
/*1*/         )))+8) ) << 24) >> 31);
                           }
                        else {
                           tc48 =  (word) 0;
                           };
                        if (tc48) {
                           tc47 =  (word)  ! ((int)(* (( (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/         limit52 = (* (( (ptr) lines←v6780)+2) ),
/*1*/         BCK(n←v6824, limit52)
/*1*/         )))+2) )<0);
                           }
                        else {
                           tc47 =  (word) 0;
                           };
                        if (tc47) {
                           {
/*1*/   word pd53;
/*1*/   pd53 = (* (( (ptr) (* (( (ptr) gf←c26104)+62)/* var←c24248 */  ))+9) );
/*1*/   var←c24280 = (word) ( *( (fPt) ((*  (ptr) pd53 ))))((* (( (ptr) (* (( (ptr) formal←c26136)+4) ))+3) ), (where←v6868 - 1), pd53)
/*1*/   ;
/*1*/   };
                           tc46 =  (word) (0 ==  ( ((var←c24280 == 13) || (var←c24280 == 10)) ? 1 : 0 ) );
                           }
                        else {
                           tc46 =  (word) 0;
                           };
                        if (tc46) {
                           tc45 =  (word) (0 == (word) LineContainsPreviousBlank←P1596(n←v6824, lines←v6780, (word) (( (bPt) formal←c26136)+28)));
                           }
                        else {
                           tc45 =  (word) 0;
                           };
                        if (tc45) {
SOURCE(3588, 4479)
                           {
/*1*/   word limit54;
/*1*/   var←c24312 = (n←v6824 - 1);
/*1*/   ((P1x0b) (( (bPt) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/            limit54 = (* (( (ptr) lines←v6780)+2) ),
/*1*/            BCK(var←c24312, limit54)
/*1*/            ))) + 8))->f = 0;
/*1*/   };
                           };
                        };
                     }
                  else {
                     if (( (int)var←c24152 >=  (int)(* (( (ptr) formal←c26136)+12) ))) {
SOURCE(3630, 4437)
                        {
                           word limit55;
                           (* (( (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/         limit55 = (* (( (ptr) lines←v6780)+2) ),
/*1*/         BCK(n←v6824, limit55)
/*1*/         )))+1) ) = (where←v6868 + (* (( (ptr) formal←c26136)+11) ));
                           };
                        }
                     else {
SOURCE(3677, 4390)
                        if (( (int)n←v6824 ==  (int)0)) {
SOURCE(3691, 4376)
                           {
/*1*/   word limit56;
/*1*/   word x57;
/*1*/   (* (( (ptr) (( (W9Pt) (( (ptr) lines←v6780)+3))+(
/*1*/            limit56 = (* (( (ptr) lines←v6780)+2) ),
/*1*/            BCK(0, limit56)
/*1*/            )))+1) ) = (x57 = ((* (( (ptr) formal←c26136)+5) ) + (* (( (ptr) formal←c26136)+6) )),
/*1*/      MIN((int)(word), where←v6868, x57));
/*1*/   };
SOURCE(3738, 21)
                           (* (( (ptr) tdd←v6752)+5) ) = 1;
                           };
                        };
                     };
                  };
               };
            };
         };
      if (( (int)0 >=  (int)n←v6824)) {
         goto lab←L100012;
         };
      n←v6824 = (n←v6824 - 1);
      goto lab←L100015;
      lab←L100012: ;
      };
   }

static word LineContainsPreviousBlank←P1596(n←v6608, lines←v6636, formal←c26200)
   word n←v6608;
   word lines←v6636;
   word formal←c26200;
   {
   register ptr gf←c26168 =  (ptr) &globalframe;
   word yes←v6680;
   word rdr←v6912 = 0;
   word lineStart←v6940;
   word searchEnd←v6968;
   formal←c26200 = (formal←c26200 - 28);
   /* LineContainsPreviousBlank: */ 
SOURCE(3780, 4287)
SOURCE(3902, 35)
   {
      word limit58;
      lineStart←v6940 = (* (( (ptr) (( (W9Pt) (( (ptr) lines←v6636)+3))+(
               limit58 = (* (( (ptr) lines←v6636)+2) ),
               BCK(n←v6608, limit58)
               )))+1) );
      };
SOURCE(3939, 54)
   {
      word limit59;
      word x60;
      word x61;
      searchEnd←v6968 = (x60 = (lineStart←v6940 + (* (( (ptr) (( (W9Pt) (( (ptr) lines←v6636)+3))+(
                  limit59 = (* (( (ptr) lines←v6636)+2) ),
                  BCK(n←v6608, limit59)
                  )))+5) )),
         x61 = (* (( (ptr) formal←c26200)+5) ),
         MIN((int)(word), x60, x61));
      };
SOURCE(3995, 39)
   if (( (int)lineStart←v6940 >=  (int)(* (( (ptr) formal←c26200)+5) ))) {
SOURCE(4020, 14)
      return(0);
      };
SOURCE(4036, 4031)
   {
      word pd62;
      pd62 = (* (( (ptr) (* (( (ptr) gf←c26168)+63)/* var←c24344 */  ))+26) );
      rdr←v6912 = (word) ( *( (fPt) ((*  (ptr) pd62 ))))(pd62);
      };
SOURCE(4070, 11)
   yes←v6680 = 0;
SOURCE(4083, 49)
   {
      word reader←v23004;
      word rope←v23032;
      word var←c24376;
      word rope←v12452;
      reader←v23004 = rdr←v6912;
      rope←v23032 = (* (( (ptr) (* (( (ptr) formal←c26200)+4) ))+3) );
      {
         word tc63;
         rope←v12452 = 0;
         var←c24376 = (* (( (ptr) reader←v23004)+2) );
         if (((var←c24376 == rope←v23032)
         )) {
            tc63 =  (word) ( (int)((* (( (ptr) reader←v23004)+3) ) + (* (( (ptr) reader←v23004)+1) )) ==  (int)lineStart←v6940);
            }
         else {
            tc63 =  (word) 0;
            };
         if (tc63) {
            goto lab←L100017;
            };
         };
      (* (( (ptr) reader←v23004)+2) ) = rope←v23032;
      (* (( (ptr) reader←v23004)+1) ) = 0;
      (*  (hPt) (*  (ptr) reader←v23004 ) ) = 0;
      (* (( (ptr) reader←v23004)+3) ) = lineStart←v6940;
      lab←L100017: ;
      };
SOURCE(4134, 3933)
   {
      register word i←v7012;
      word var←c24408;
      word c←v23112;
      i←v7012 = lineStart←v6940;
      lab←L100021: ;
      if (( (int)i←v7012 !=  (int)searchEnd←v6968)) {
         }
      else {
         goto lab←L100018;
         };
SOURCE(4183, 3884)
      {
         word text←v11416;
         word i←v11504;
         text←v11416 = (*  (ptr) rdr←v6912 );
         i←v11504 = (* (( (ptr) rdr←v6912)+1) );
         {
            word pd65;
            if ((i←v11504 < (*  (hPt) text←v11416 ))) {
               (* (( (ptr) rdr←v6912)+1) ) = (i←v11504 + 1);
               {
                  word limit64;
                  c←v23112 = (word) (* ((( (bPt) text←v11416)+4)+(
                        limit64 = (word) (* (( (hPt) text←v11416)+1) ),
                        BCK(i←v11504, limit64)
                        )) );
                  };
               }
            else {
               pd65 = (* (( (ptr) (* (( (ptr) gf←c26168)+63)/* var←c24344 */  ))+17) );
               c←v23112 = (word) ( *( (fPt) ((*  (ptr) pd65 ))))(rdr←v6912, 0, pd65);
               };
            };
         };
      var←c24408 = ((word) (* (( (bPt) (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c26168)+64)/* var←c24504 */  ))+4) ) ))+c←v23112) ) == 1);
      if (((0 != var←c24408)
      )) {
SOURCE(4228, 10)
         yes←v6680 = 1;
SOURCE(4240, 5)
         goto lab←L100019;
         };
      i←v7012 = (i←v7012 + 1);
      goto lab←L100021;
      lab←L100018: ;
      lab←L100019: ;
      };
SOURCE(4257, 32)
   {
      word pd66;
      pd66 = (* (( (ptr) (* (( (ptr) gf←c26168)+63)/* var←c24344 */  ))+27) );
      (void) ( *( (fPt) ((*  (ptr) pd66 ))))(rdr←v6912, pd66);
      };
SOURCE(3780, 4287)
   return(yes←v6680);
   }

static void InvalidateSpan←P420(viewer←v4616, formal←c0301, formal←c0302, formal←c0303, formal←c0304)
   word viewer←v4616;
   W4 formal←c0301;
   word formal←c0302;
   word formal←c0303;
   word formal←c0304;
   {
   W13 var←c26232;
   /* declaration of span←v4644 skipped */ 
   /* declaration of errorFlag←v4672 skipped */ 
   /* declaration of movingOut←v4700 skipped */ 
   /* declaration of unnesting←v4728 skipped */ 
   /* declaration of var←c24536 skipped */ 
   (*  (W4Pt) (( (ptr) &var←c26232)+4)/* span←v4644 */  ) = formal←c0301;
   (* (( (ptr) &var←c26232)+8)/* errorFlag←v4672 */  ) = formal←c0302;
   (* (( (ptr) &var←c26232)+9)/* movingOut←v4700 */  ) = formal←c0303;
   (* (( (ptr) &var←c26232)+10)/* unnesting←v4728 */  ) = formal←c0304;
   /* InvalidateSpan: */ 
SOURCE(4397, 3670)
   {
      word tmpAddr67;
      tmpAddr67 = (word) (( (ptr) &var←c26232)+11)/* var←c24536 */ ;
      (*  (ptr) tmpAddr67 ) = ( ((word)  (fPt) InvalidateLinesInSpan←P1848) );
      (* (( (ptr) tmpAddr67) + 1) ) = 1;
      };
SOURCE(5763, 29)
   (void) InvalidateLinesInSpan←P1848(viewer←v4616, (word) (( (bPt) &var←c26232)+44)/* var←c24536 */ );
SOURCE(5794, 89)
   {
      register word v←v7160;
      v←v7160 = (* (( (ptr) viewer←v4616)+21) );
      lab←L100027: ;
      if ( ( (v←v7160 != 0) ? (v←v7160 != viewer←v4616) : 0 ) ) {
         }
      else {
         goto lab←L100024;
         };
SOURCE(5859, 24)
      (void) InvalidateLinesInSpan←P1848(v←v7160, (word) (( (bPt) &var←c26232)+44)/* var←c24536 */ );
      v←v7160 = (* (( (ptr) v←v7160)+21) );
      goto lab←L100027;
      lab←L100024: ;
      };
   }

static void InvalidateLinesInSpan←P1848(formal←c0305, formal←c26328)
   word formal←c0305;
   word formal←c26328;
   {
   W14 var←c26264;
   /* declaration of v←v7132 skipped */ 
   register ptr gf←c26296 =  (ptr) &globalframe;
   /* declaration of start←v7204 skipped */ 
   /* declaration of end←v7232 skipped */ 
   /* declaration of startClipped←v7260 skipped */ 
   /* declaration of endClipped←v7288 skipped */ 
   word tdd←v7316;
   word lines←v7344;
   formal←c26328 = (formal←c26328 - 44);
   (* (( (ptr) &var←c26264)+4)/* v←v7132 */  ) = formal←c0305;
   (*  (ptr) &var←c26264 ) = formal←c26328;
   /* InvalidateLinesInSpan: */ 
SOURCE(4524, 3543)
SOURCE(4621, 53)
   tdd←v7316 = XR←Narrow((* (( (ptr) (* (( (ptr) &var←c26264)+4)/* v←v7132 */  ))+26) ), (* (( (ptr) gf←c26296)+10) ));
SOURCE(4676, 46)
   lines←v7344 = (* (( (ptr) tdd←v7316)+1) );
SOURCE(4724, 3343)
   if ( ( (0 != (* (( (ptr) tdd←v7316)+7) )) ? (0 != (* (( (ptr) tdd←v7316)+8) )) : 0 ) ) {
SOURCE(4763, 9)
      (* (( (ptr) &var←c26264)+5)/* start←v7204 */  ) = 0;
SOURCE(4774, 19)
      (* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) = 2147483647;
SOURCE(4795, 35)
      (* (( (ptr) &var←c26264)+8)/* endClipped←v7288 */  ) = 0;
      (* (( (ptr) &var←c26264)+7)/* startClipped←v7260 */  ) = 0;
      }
   else {
SOURCE(4837, 3230)
SOURCE(4837, 3230)
      {
         W4 var←c24600;
         {
            /* declaration of var←c01 skipped */ 
            (* (( (ptr) &var←c26264)+9)/* var←c01 */  ) = (* (( (ptr) (* (( (ptr) gf←c26296)+65)/* var←c24568 */  ))+40) );
            {
               /* declaration of var←c02 skipped */ 
               {
                  word var←c03;
                  {
                     word var←c0283;
                     var←c0283 = (word) &var←c26264;
                     var←c03 = (word) XR←Enable(( ((word)  (fPt) NoName←Q3360) ), ( ((word)  (fPt) NoName←Q3660) ), var←c0283);
                     };
                  if ((var←c03 == 2)) {
                     goto lab←L100029;
                     };
                  };
               var←c24600 = (*  (W4Pt) (( (ptr) &var←c26264)+10)/* var←c02 */  );
               };
            };
         (* (( (ptr) &var←c26264)+8)/* endClipped←v7288 */  ) = var←c24600.f3;
         (* (( (ptr) &var←c26264)+7)/* startClipped←v7260 */  ) = var←c24600.f2;
         (* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) = var←c24600.f1;
         (* (( (ptr) &var←c26264)+5)/* start←v7204 */  ) = var←c24600.f0;
         };
      lab←L100029: ;
      };
SOURCE(5112, 22)
   if (( (int)(* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) <  (int)0)) {
SOURCE(5128, 6)
      return;
      };
SOURCE(5150, 2917)
   if (( (int)(* (( (ptr) &var←c26264)+5)/* start←v7204 */  ) ==  (int)2147483647)) {
SOURCE(5180, 2887)
      {
         word tc69;
         word idx70;
         word limit71;
         word idx72;
         word limit73;
         word idx74;
         word limit75;
         if ( ( (0 != (* (( (ptr) formal←c26328)+10) )) ? ((* (( (ptr) tdd←v7316)+2) ) < 1023) : 0 ) ) { goto then068;};
         if (((*  (ptr) (( (W9Pt) (( (ptr) lines←v7344)+3))+(
               idx70 = (*  (ptr) lines←v7344 ),
               limit71 = (* (( (ptr) lines←v7344)+2) ),
               BCK(idx70, limit71)
               )) ) == (* (( (ptr) formal←c26328)+4) ))) {
            tc69 =  (word) ( (int)((* (( (ptr) (( (W9Pt) (( (ptr) lines←v7344)+3))+(
                     idx72 = (*  (ptr) lines←v7344 ),
                     limit73 = (* (( (ptr) lines←v7344)+2) ),
                     BCK(idx72, limit73)
                     )))+1) ) + (* (( (ptr) (( (W9Pt) (( (ptr) lines←v7344)+3))+(
                     idx74 = (*  (ptr) lines←v7344 ),
                     limit75 = (* (( (ptr) lines←v7344)+2) ),
                     BCK(idx74, limit75)
                     )))+5) )) ==  (int)(* (( (ptr) formal←c26328)+5) ));
            }
         else {
            tc69 =  (word) 0;
            };
         if (tc69) {
            then068: ;
SOURCE(5380, 50)
            (* (( (ptr) &var←c26264)+5)/* start←v7204 */  ) = (*  (ptr) lines←v7344 );
            }
         else {
SOURCE(5430, 6)
            return;
            };
         };
      };
SOURCE(5438, 27)
   if (( (int)(* (( (ptr) &var←c26264)+5)/* start←v7204 */  ) <  (int)0)) {
SOURCE(5456, 9)
      (* (( (ptr) &var←c26264)+5)/* start←v7204 */  ) = 0;
      };
SOURCE(5490, 148)
   if (( (int)(* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) ==  (int)2147483647)) {
SOURCE(5518, 55)
      (* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) = (*  (ptr) (* (( (ptr) tdd←v7316)+1) ) );
      }
   else {
SOURCE(5573, 65)
      if ( ( (0 != (* (( (ptr) &var←c26264)+8)/* endClipped←v7288 */  )) ?  ( ( (int)(* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) >  (int)(* (
         ( (ptr) &var←c26264)+5)/* start←v7204 */  )) ? 1 : (0 == (* (( (ptr) formal←c26328)+10) )) )  : 0 ) ) {
SOURCE(5627, 11)
         (* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) = ((* (( (ptr) &var←c26264)+6)/* end←v7232 */  ) - 1);
         };
      };
SOURCE(5640, 2427)
   {
      register word n←v7388;
      register word noName←c24632;
      word var←c24664;
      n←v7388 = (* (( (ptr) &var←c26264)+5)/* start←v7204 */  );
      noName←c24632 = (* (( (ptr) &var←c26264)+6)/* end←v7232 */  );
      if (( (int)n←v7388 >  (int)noName←c24632)) {
         goto lab←L100032;
         };
      lab←L100035: ;
SOURCE(5674, 2393)
      {
         word limit76;
         var←c24664 = (* (( (ptr) tdd←v7316)+1) );
         ((P1x0b) (( (bPt) (( (W9Pt) (( (ptr) var←c24664)+3))+(
                  limit76 = (* (( (ptr) var←c24664)+2) ),
                  BCK(n←v7388, limit76)
                  ))) + 8))->f = 0;
         };
      if (( (int)n←v7388 >=  (int)noName←c24632)) {
         goto lab←L100032;
         };
      n←v7388 = (n←v7388 + 1);
      goto lab←L100035;
      lab←L100032: ;
      };
SOURCE(5721, 39)
   if ((0 != (* (( (ptr) formal←c26328)+9) ))) {
SOURCE(5739, 21)
      (* (( (ptr) tdd←v7316)+7) ) = 1;
      };
   }

static word NoName←Q3360(formal←c0259)
   word formal←c0259;
   {
SOURCE(4837, 3230)
   {
      word pd77;
      pd77 = (* (( (ptr) formal←c0259)+9) );
      (void) ( *( (fPt) ((*  (ptr) pd77 ))))((word) (( (bPt) formal←c0259)+40), (* (( (ptr) formal←c0259)+4) ), (*  (W4Pt) (( (ptr) (*  (ptr) formal←c0259 ))+4)
          ), pd77);
      };
   return(0);
   }

static void InvalidateChildren←P480(viewer←v4788, node←v4816)
   word viewer←v4788;
   word node←v4816;
   {
   register ptr gf←c26360 =  (ptr) &globalframe;
   word child←v7432 = 0;
   W4 span←v7460;
   /* InvalidateChildren: */ 
SOURCE(5898, 2169)
SOURCE(5976, 16)
   span←v7460.f0 = 0;
   span←v7460.f1 =  (word) -1;
   span←v7460.f2 = 0;
   span←v7460.f3 =  (word) -1;
SOURCE(5994, 2073)
   {
      word pd78;
      pd78 = (* (( (ptr) (* (( (ptr) gf←c26360)+66)/* var←c24728 */  ))+28) );
      child←v7432 = (word) ( *( (fPt) ((*  (ptr) pd78 ))))(node←v4816, pd78);
      };
   if ((child←v7432 == 0)) {
SOURCE(6042, 6)
      return;
      };
SOURCE(6050, 2017)
   span←v7460.f0 = child←v7432;
   span←v7460.f1 = 0;
   {
      word pd79;
      pd79 = (* (( (ptr) (* (( (ptr) gf←c26360)+66)/* var←c24728 */  ))+27) );
      (void) ( *( (fPt) ((*  (ptr) pd79 ))))((word) (( (bPt) &span←v7460)+8), node←v4816, pd79);
      };
SOURCE(6101, 30)
   (void) InvalidateSpan←P420(viewer←v4788, span←v7460, 1, 0, 0);
   }

static void InvalidateBranch←P540(viewer←v4876, node←v4904)
   word viewer←v4876;
   word node←v4904;
   {
   register ptr gf←c26392 =  (ptr) &globalframe;
   W4 span←v7504;
   /* InvalidateBranch: */ 
SOURCE(6135, 1932)
SOURCE(6198, 60)
   span←v7504.f0 = node←v4904;
   span←v7504.f1 = 0;
   {
      word pd80;
      pd80 = (* (( (ptr) (* (( (ptr) gf←c26392)+66)/* var←c24728 */  ))+27) );
      (void) ( *( (fPt) ((*  (ptr) pd80 ))))((word) (( (bPt) &span←v7504)+8), node←v4904, pd80);
      };
SOURCE(6260, 30)
   (void) InvalidateSpan←P420(viewer←v4876, span←v7504, 1, 0, 0);
   }

static void InvalidateBranchAndNext←P600(viewer←v4964, node←v4992)
   word viewer←v4964;
   word node←v4992;
   {
   register ptr gf←c26424 =  (ptr) &globalframe;
   word last←v7548;
   word next←v7576;
   W2 var←c0144;
   word end←v7604;
   W4 span←v7632;
   /* InvalidateBranchAndNext: */ 
SOURCE(6294, 1773)
SOURCE(6357, 38)
   {
      word pd81;
      pd81 = (* (( (ptr) (* (( (ptr) gf←c26424)+66)/* var←c24728 */  ))+26) );
      last←v7548 = (word) ( *( (fPt) ((*  (ptr) pd81 ))))(node←v4992, pd81);
      };
SOURCE(6397, 38)
   {
      word pd82;
      pd82 = (* (( (ptr) (* (( (ptr) gf←c26424)+66)/* var←c24728 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd82 ))))((word) &var←c0144, last←v7548, pd82);
      };
   next←v7576 = var←c0144.f0;
SOURCE(6437, 43)
   end←v7604 =  ( (next←v7576 == 0) ? last←v7548 : next←v7576 ) ;
SOURCE(6482, 57)
   span←v7632.f0 = node←v4992;
   span←v7632.f1 = 0;
   span←v7632.f2 = end←v7604;
   {
      word pd83;
      pd83 = (* (( (ptr) (* (( (ptr) gf←c26424)+67)/* var←c24824 */  ))+6) );
      span←v7632.f3 = (word) ( *( (fPt) ((*  (ptr) pd83 ))))(end←v7604, pd83);
      };
SOURCE(6541, 30)
   (void) InvalidateSpan←P420(viewer←v4964, span←v7632, 1, 0, 0);
   }

static void UpdateStartPos←P660(viewer←v5052, formal←c0306, last←v5108)
   word viewer←v5052;
   word formal←c0306;
   word last←v5108;
   {
   W8 var←c26456;
   /* declaration of first←v5080 skipped */ 
   register ptr gf←c26488 =  (ptr) &globalframe;
   /* declaration of var←c24856 skipped */ 
   /* declaration of next←v7676 skipped */ 
   var←c26456.f4/* first←v5080 */  = formal←c0306;
   /* UpdateStartPos: */ 
SOURCE(6575, 1492)
   {
      word tmpAddr84;
      tmpAddr84 = (word) (( (ptr) &var←c26456)+5)/* var←c24856 */ ;
      (*  (ptr) tmpAddr84 ) = ( ((word)  (fPt) UpdateViewerStartPos←P2004) );
      (* (( (ptr) tmpAddr84) + 1) ) = 1;
      };
SOURCE(6636, 39)
   {
      word pd85;
      pd85 = (* (( (ptr) (* (( (ptr) gf←c26488)+66)/* var←c24728 */  ))+14) );
      var←c26456.f7/* next←v7676 */  = (word) ( *( (fPt) ((*  (ptr) pd85 ))))(last←v5108, pd85);
      };
SOURCE(7038, 28)
   (void) UpdateViewerStartPos←P2004(viewer←v5052, (word) (( (bPt) &var←c26456)+20)/* var←c24856 */ );
SOURCE(7068, 88)
   {
      register word v←v7808;
      v←v7808 = (* (( (ptr) viewer←v5052)+21) );
      lab←L100039: ;
      if ( ( (v←v7808 != 0) ? (v←v7808 != viewer←v5052) : 0 ) ) {
         }
      else {
         goto lab←L100036;
         };
SOURCE(7133, 23)
      (void) UpdateViewerStartPos←P2004(v←v7808, (word) (( (bPt) &var←c26456)+20)/* var←c24856 */ );
      v←v7808 = (* (( (ptr) v←v7808)+21) );
      goto lab←L100039;
      lab←L100036: ;
      };
   }

static void UpdateViewerStartPos←P2004(v←v7780, formal←c26552)
   word v←v7780;
   word formal←c26552;
   {
   register ptr gf←c26520 =  (ptr) &globalframe;
   word tdd←v7852;
   word lines←v7880 = 0;
   formal←c26552 = (formal←c26552 - 20);
   /* UpdateViewerStartPos: */ 
SOURCE(6677, 1390)
SOURCE(6720, 53)
   tdd←v7852 = XR←Narrow((* (( (ptr) v←v7780)+26) ), (* (( (ptr) gf←c26520)+10) ));
SOURCE(6807, 24)
   if ((tdd←v7852 == 0)) {
SOURCE(6825, 6)
      return;
      };
SOURCE(6833, 21)
   lines←v7880 = (* (( (ptr) tdd←v7852)+1) );
SOURCE(6856, 1211)
   {
      word limit86;
      if (((*  (ptr) (( (W9Pt) (( (ptr) lines←v7880)+3))+(
            limit86 = (* (( (ptr) lines←v7880)+2) ),
            BCK(0, limit86)
            )) ) != (* (( (ptr) formal←c26552)+7) ))) {
SOURCE(6889, 6)
         return;
         };
      };
SOURCE(6897, 1170)
   if ((0 == (word) AlreadySaved←P240(v←v7780))) {
SOURCE(6925, 1142)
      {
         word limit87;
         (void) SaveViewerPos←P300(v←v7780, (*  (W2Pt) (( (W9Pt) (( (ptr) lines←v7880)+3))+(
                  limit87 = (* (( (ptr) lines←v7880)+2) ),
                  BCK(0, limit87)
                  )) ));
         };
      };
SOURCE(6984, 1083)
   {
      word var←c24888;
      {
         word limit88;
         var←c24888 = (word) (( (W9Pt) (( (bPt) lines←v7880)+12))+(
               limit88 = (* (( (ptr) lines←v7880)+2) ),
               BCK(0, limit88)
               ));
         };
      (*  (ptr) var←c24888 ) = (* (( (ptr) formal←c26552)+4) );
      (* (( (ptr) var←c24888)+1) ) = 0;
      };
SOURCE(7011, 1056)
   {
      word limit89;
      ((P1x0b) (( (bPt) (( (W9Pt) (( (bPt) lines←v7880)+12))+(
               limit89 = (* (( (ptr) lines←v7880)+2) ),
               BCK(0, limit89)
               ))) + 8))->f = 0;
      };
   }

static void InvalidateDest←P720(viewer←v5168, node←v5196, formal←c0307, formal←c0308)
   word viewer←v5168;
   word node←v5196;
   word formal←c0307;
   word formal←c0308;
   {
   W8 var←c26584;
   /* declaration of movingIn←v5224 skipped */ 
   /* declaration of afterDest←v5252 skipped */ 
   register ptr gf←c26616 =  (ptr) &globalframe;
   /* declaration of var←c24920 skipped */ 
   W2 pos←v7952;
   var←c26584.f4/* movingIn←v5224 */  = formal←c0307;
   var←c26584.f5/* afterDest←v5252 */  = formal←c0308;
   /* InvalidateDest: */ 
SOURCE(7171, 1452)
   {
      word tmpAddr90;
      tmpAddr90 = (word) (( (ptr) &var←c26584)+6)/* var←c24920 */ ;
      (*  (ptr) tmpAddr90 ) = ( ((word)  (fPt) InvalidateDestLine←P2112) );
      (* (( (ptr) tmpAddr90) + 1) ) = 1;
      };
SOURCE(8422, 75)
   pos←v7952.f0 = node←v5196;
   {
      word pd91;
      if ((0 != var←c26584.f5/* afterDest←v5252 */ )) {
         pd91 = (* (( (ptr) (* (( (ptr) gf←c26616)+67)/* var←c24824 */  ))+6) );
         pos←v7952.f1 = (word) ( *( (fPt) ((*  (ptr) pd91 ))))(node←v5196, pd91);
         }
      else {
         pos←v7952.f1 = 0;
         };
      };
SOURCE(8499, 31)
   (void) InvalidateDestLine←P2112(viewer←v5168, pos←v7952, (word) (( (bPt) &var←c26584)+24)/* var←c24920 */ );
SOURCE(8532, 91)
   {
      register word v←v8084;
      v←v8084 = (* (( (ptr) viewer←v5168)+21) );
      lab←L100043: ;
      if ( ( (v←v8084 != 0) ? (v←v8084 != viewer←v5168) : 0 ) ) {
         }
      else {
         goto lab←L100040;
         };
SOURCE(8597, 26)
      (void) InvalidateDestLine←P2112(v←v8084, pos←v7952, (word) (( (bPt) &var←c26584)+24)/* var←c24920 */ );
      v←v8084 = (* (( (ptr) v←v8084)+21) );
      goto lab←L100043;
      lab←L100040: ;
      };
   }

static void InvalidateDestLine←P2112(formal←c0309, formal←c0310, formal←c26712)
   word formal←c0309;
   W2 formal←c0310;
   word formal←c26712;
   {
   W11 var←c26648;
   /* declaration of v←v8028 skipped */ 
   /* declaration of dest←v8056 skipped */ 
   register ptr gf←c26680 =  (ptr) &globalframe;
   word line←v8128;
   word clipped←v8156 = 0;
   /* declaration of failed←v8184 skipped */ 
   formal←c26712 = (formal←c26712 - 24);
   (* (( (ptr) &var←c26648)+4)/* v←v8028 */  ) = formal←c0309;
   (*  (W2Pt) (( (ptr) &var←c26648)+5)/* dest←v8056 */  ) = formal←c0310;
   (*  (ptr) &var←c26648 ) = formal←c26712;
   /* InvalidateDestLine: */ 
SOURCE(7252, 1153)
SOURCE(7330, 30)
   (* (( (ptr) &var←c26648)+7)/* failed←v8184 */  ) = 0;
SOURCE(7362, 1043)
   {
      word var←c24984;
      var←c24984 = (* (( (ptr) (* (( (ptr) &var←c26648)+4)/* v←v8028 */  ))+26) );
      if ((var←c24984 == 0)) {
         goto lab←L100044;
         };
      if (((* (( (ptr) gf←c26680)+10) ) == XR←GetReferentType(var←c24984))) {
         {
            word tdd←v8228;
            tdd←v8228 = var←c24984;
            {
               word var←c25112;
SOURCE(7428, 35)
               if ((0 != (* (( (ptr) formal←c26712)+4) ))) {
SOURCE(7445, 18)
                  (* (( (ptr) tdd←v8228)+8) ) = 1;
                  };
SOURCE(7513, 554)
SOURCE(7513, 554)
               {
                  W2 var←c25016;
                  {
                     /* declaration of var←c04 skipped */ 
                     (* (( (ptr) &var←c26648)+8)/* var←c04 */  ) = (* (( (ptr) (* (( (ptr) gf←c26680)+65)/* var←c24568 */  ))+41) );
                     {
                        /* declaration of var←c05 skipped */ 
                        {
                           word var←c06;
                           {
/*1*/   word var←c0284;
/*1*/   var←c0284 = (word) &var←c26648;
/*1*/   var←c06 = (word) XR←Enable(( ((word)  (fPt) NoName←Q3480) ), ( ((word)  (fPt) NoName←Q3600) ), var←c0284);
/*1*/   };
                           if ((var←c06 == 3)) {
/*1*/   goto lab←L100046;
/*1*/   };
                           };
                        var←c25016 = (*  (W2Pt) (( (ptr) &var←c26648)+9)/* var←c05 */  );
                        };
                     };
                  clipped←v8156 = var←c25016.f1;
                  line←v8128 = var←c25016.f0;
                  };
               lab←L100046: ;
SOURCE(7635, 432)
               if ( ( (0 != (* (( (ptr) &var←c26648)+7)/* failed←v8184 */  )) ? ((* (( (ptr) tdd←v8228)+2) ) < 1023) : 0 ) ) {
SOURCE(7692, 395)
                  {
                     word n←v8272;
                     word delta←v8300;
SOURCE(7694, 19)
                     n←v8272 = (* (( (ptr) &var←c26648)+5) );
SOURCE(7715, 49)
                     {
                        word pd92;
                        pd92 = (* (( (ptr) (* (( (ptr) gf←c26680)+66)/* var←c24728 */  ))+16) );
                        delta←v8300 = ((word) ( *( (fPt) ((*  (ptr) pd92 ))))(n←v8272, pd92) - (* (( (ptr) tdd←v8228)+2) ));
                        };
SOURCE(7766, 301)
                     if (( (int)delta←v8300 >  (int)0)) {
                        {
                           W2 var←c0176;
SOURCE(7786, 281)
                           {
/*1*/   register word i←v8344 = 0;
/*1*/   register word noName←c25048;
/*1*/   noName←c25048 = delta←v8300;
/*1*/   if (( (int)i←v8344 >=  (int)noName←c25048)) {
/*1*/      goto lab←L100049;
/*1*/      };
/*1*/   lab←L100052: ;
SOURCE(7818, 249)
/*1*/   {
/*1*/      word pd93;
/*1*/      pd93 = (* (( (ptr) (* (( (ptr) gf←c26680)+66)/* var←c24728 */  ))+8) );
/*1*/      n←v8272 = (word) ( *( (fPt) ((*  (ptr) pd93 ))))(n←v8272, pd93);
/*1*/      };
/*1*/   i←v8344 = (i←v8344 + 1);
/*1*/   if (( (int)i←v8344 <  (int)noName←c25048)) {
/*1*/      goto lab←L100052;
/*1*/      };
/*1*/   lab←L100049: ;
/*1*/   };
SOURCE(7851, 216)
                           {
/*1*/   word pd94;
/*1*/   pd94 = (* (( (ptr) (* (( (ptr) gf←c26680)+66)/* var←c24728 */  ))+17) );
/*1*/   (void) ( *( (fPt) ((*  (ptr) pd94 ))))((word) &var←c0176, n←v8272, (* (( (ptr) tdd←v8228)+2) ), 0, pd94);
/*1*/   };
                           n←v8272 = var←c0176.f0;
SOURCE(7901, 166)
                           if ((n←v8272 != 0)) {
SOURCE(7919, 148)
/*1*/   (* (( (ptr) &var←c26648)+5) ) = n←v8272;
/*1*/   (* (( (ptr) &var←c26648)+6) ) = 0;
SOURCE(7934, 26)
/*1*/   (* (( (ptr) &var←c26648)+7)/* failed←v8184 */  ) = 0;
/*1*/   (* (( (ptr) formal←c26712)+5) ) = 0;
SOURCE(7962, 105)
SOURCE(7962, 105)
/*1*/   {
/*1*/      W2 var←c25080;
/*1*/      {
/*1*/         /* declaration of var←c07 skipped */ 
/*1*/         (* (( (ptr) &var←c26648)+8)/* var←c07 */  ) = (* (( (ptr) (* (( (ptr) gf←c26680)+65)/* var←c24568 */  ))+41) );
/*1*/         {
/*1*/            /* declaration of var←c08 skipped */ 
/*1*/            {
/*1*/               word var←c09;
/*1*/               {
/*1*/                  word var←c0285;
/*1*/                  var←c0285 = (word) &var←c26648;
/*1*/                  var←c09 = (word) XR←Enable(( ((word)  (fPt) NoName←Q3420) ), ( ((word)  (fPt) NoName←Q3540) ), var←c0285);
/*1*/                  };
/*1*/               if ((var←c09 == 4)) {
/*1*/                  goto lab←L100054;
/*1*/                  };
/*1*/               };
/*1*/            var←c25080 = (*  (W2Pt) (( (ptr) &var←c26648)+9)/* var←c08 */  );
/*1*/            };
/*1*/         };
/*1*/      clipped←v8156 = var←c25080.f1;
/*1*/      line←v8128 = var←c25080.f0;
/*1*/      };
/*1*/   lab←L100054: ;
/*1*/   };
                           };
                        };
                     };
                  };
SOURCE(8090, 33)
               if ((0 != (* (( (ptr) &var←c26648)+7)/* failed←v8184 */  )) || ( (int)line←v8128 <  (int)0)) {
SOURCE(8117, 6)
                  return;
                  };
SOURCE(8140, 147)
               if (( (int)line←v8128 ==  (int)2147483647)) {
SOURCE(8200, 87)
                  if (((* (( (ptr) tdd←v8228)+2) ) < 1023)) {
SOURCE(8246, 35)
                     line←v8128 = (*  (ptr) (* (( (ptr) tdd←v8228)+1) ) );
                     }
                  else {
SOURCE(8281, 6)
                     return;
                     };
                  };
SOURCE(8289, 81)
               if ( (  ( (0 != (* (( (ptr) formal←c26712)+5) )) ? (0 == clipped←v8156) : 0 )  ? ( (int)line←v8128 <  (int)(*  (ptr) (* (
                  ( (ptr) tdd←v8228)+1) ) )) : 0 ) ) {
SOURCE(8357, 13)
                  line←v8128 = (line←v8128 + 1);
                  };
SOURCE(8372, 33)
               {
                  word limit95;
                  var←c25112 = (* (( (ptr) tdd←v8228)+1) );
                  ((P1x0b) (( (bPt) (( (W9Pt) (( (ptr) var←c25112)+3))+(
                           limit95 = (* (( (ptr) var←c25112)+2) ),
                           BCK(line←v8128, limit95)
                           ))) + 8))->f = 0;
                  };
               };
            };
         }
      else {
         lab←L100044: ;
         };
      };
   }

static word NoName←Q3420(formal←c0269)
   word formal←c0269;
   {
SOURCE(7962, 105)
   {
      word pd96;
      pd96 = (* (( (ptr) formal←c0269)+8) );
      (void) ( *( (fPt) ((*  (ptr) pd96 ))))((word) (( (bPt) formal←c0269)+36), (* (( (ptr) formal←c0269)+4) ), (*  (W2Pt) (( (ptr) formal←c0269)+5)
          ), 0, pd96);
      };
   return(0);
   }

static word NoName←Q3480(formal←c0270)
   word formal←c0270;
   {
SOURCE(7513, 554)
   {
      word pd97;
      pd97 = (* (( (ptr) formal←c0270)+8) );
      (void) ( *( (fPt) ((*  (ptr) pd97 ))))((word) (( (bPt) formal←c0270)+36), (* (( (ptr) formal←c0270)+4) ), (*  (W2Pt) (( (ptr) formal←c0270)+5)
          ), 0, pd97);
      };
   return(0);
   }

static word FirstLevelParent←P780(node←v5312)
   word node←v5312;
   {
   register ptr gf←c26744 =  (ptr) &globalframe;
   word var←c5356;
   word prev1←v8388 = 0;
   word prev2←v8416 = 0;
   /* FirstLevelParent: */ 
SOURCE(8639, 171)
SOURCE(8714, 69)
   lab←L100059: ;
   if ((node←v5312 != 0)) {
      }
   else {
      goto lab←L100057;
      };
SOURCE(8732, 13)
   prev2←v8416 = prev1←v8388;
SOURCE(8747, 36)
   {
      word var←c25144;
      var←c25144 = node←v5312;
      prev1←v8388 = node←v5312;
      {
         word pd98;
         pd98 = (* (( (ptr) (* (( (ptr) gf←c26744)+66)/* var←c24728 */  ))+8) );
         node←v5312 = (word) ( *( (fPt) ((*  (ptr) pd98 ))))(var←c25144, pd98);
         };
      };
   goto lab←L100059;
   lab←L100057: ;
SOURCE(8794, 16)
   return(prev2←v8416);
   }

static word SpanIsBranches←P840(first←v5416, last←v5444)
   word first←v5416;
   word last←v5444;
   {
   register ptr gf←c26776 =  (ptr) &globalframe;
   word var←c5488;
   word parent←v8460;
   word n←v8488;
   /* SpanIsBranches: */ 
SOURCE(8814, 349)
SOURCE(8874, 37)
   {
      word pd99;
      pd99 = (* (( (ptr) (* (( (ptr) gf←c26776)+66)/* var←c24728 */  ))+8) );
      parent←v8460 = (word) ( *( (fPt) ((*  (ptr) pd99 ))))(first←v5416, pd99);
      };
SOURCE(8913, 14)
   n←v8488 = last←v5444;
SOURCE(8929, 51)
   {
      word pd100;
      pd100 = (* (( (ptr) (* (( (ptr) gf←c26776)+66)/* var←c24728 */  ))+28) );
      if (((word) ( *( (fPt) ((*  (ptr) pd100 ))))(n←v8488, pd100) != 0)) {
SOURCE(8966, 14)
         return(0);
         };
      };
SOURCE(8982, 154)
   lab←L100062: ;
SOURCE(8985, 60)
   {
      word var←c25208;
      {
         word pd101;
         pd101 = (* (( (ptr) (* (( (ptr) gf←c26776)+66)/* var←c24728 */  ))+8) );
         n←v8488 = (word) ( *( (fPt) ((*  (ptr) pd101 ))))(n←v8488, pd101);
         };
      var←c25208 = n←v8488;
      if ((var←c25208 == parent←v8460)) {
SOURCE(9032, 13)
         return(1);
         }
      else {
         if ((var←c25208 == 0)) {
SOURCE(9054, 4)
            goto lab←L100061;
            };
         };
      };
SOURCE(9069, 67)
   {
      word pd102;
      pd102 = (* (( (ptr) (* (( (ptr) gf←c26776)+66)/* var←c24728 */  ))+10) );
      if (((word) ( *( (fPt) ((*  (ptr) pd102 ))))(n←v8488, pd102) != 0)) {
SOURCE(9100, 36)
         {
            word pd103;
            pd103 = (* (( (ptr) (* (( (ptr) gf←c26776)+66)/* var←c24728 */  ))+8) );
            return(((word) ( *( (fPt) ((*  (ptr) pd103 ))))(n←v8488, pd103) == parent←v8460));
            };
         };
      };
   goto lab←L100062;
   lab←L100061: ;
SOURCE(9147, 16)
   return(0);
   }

static void SpanFromNodes←P900(formal←c0198, first←v5548, last←v5576)
   word formal←c0198;
   word first←v5548;
   word last←v5576;
   {
   register ptr gf←c26808 =  (ptr) &globalframe;
   W4 var←c5620;
   /* SpanFromNodes: */ 
SOURCE(9167, 127)
SOURCE(9232, 62)
   {
      W4 var←c25304;
      {
         W4 var←c25272;
         var←c25272.f0 = first←v5548;
         var←c25272.f1 = 0;
         var←c25272.f2 = last←v5576;
         {
            word pd104;
            word x105;
            pd104 = (* (( (ptr) (* (( (ptr) gf←c26808)+67)/* var←c24824 */  ))+6) );
            var←c25272.f3 = ((x105 = (word) ( *( (fPt) ((*  (ptr) pd104 ))))(last←v5576, pd104),
               MAX((int)(word), x105, 1)) - 1);
            };
         var←c25304 = var←c25272;
         };
      var←c5620 = var←c25304;
      /* removed tail goto */ 
      };
   (*  (W4Pt) formal←c0198 ) = var←c5620;
   return;
   }

static word ViewerFromNode←P960(node←v5680)
   word node←v5680;
   {
   register ptr gf←c26840 =  (ptr) &globalframe;
   word var←c5724;
   /* ViewerFromNode: */ 
SOURCE(9298, 144)
SOURCE(9353, 28)
   if ((node←v5680 == 0)) {
SOURCE(9370, 11)
      return(0);
      };
SOURCE(9383, 59)
   {
      word var←c25368;
      {
         word pd106;
         pd106 = (* (( (ptr) (* (( (ptr) gf←c26840)+66)/* var←c24728 */  ))+9) );
         var←c25368 = (word) ( *( (fPt) ((*  (ptr) pd106 ))))(node←v5680, pd106);
         };
      {
         word pd107;
         pd107 = (* (( (ptr) (* (( (ptr) gf←c26840)+68)/* var←c25400 */  ))+9) );
         return((word) ( *( (fPt) ((*  (ptr) pd107 ))))(var←c25368, pd107));
         };
      };
   }

static void NotifyBeforeEdit←P1020(change←v5784)
   word change←v5784;
   {
   register ptr gf←c26872 =  (ptr) &globalframe;
   word viewer←v8532 = 0;
   W4 span←v8560;
   /* NotifyBeforeEdit: */ 
SOURCE(9448, 1122)
SOURCE(9521, 16)
   span←v8560.f0 = 0;
   span←v8560.f1 =  (word) -1;
   span←v8560.f2 = 0;
   span←v8560.f3 =  (word) -1;
SOURCE(9539, 993)
   {
      word var←c25464;
      var←c25464 = change←v5784;
      if ((var←c25464 == 0)) {
         goto lab←L100064;
         };
      {
         word var←c25592;
         var←c25592 = (*  (ptr) var←c25464 );
         switch (var←c25592) {
            case 4: 
               {
                  word x←v8604;
                  x←v8604 = var←c25464;
SOURCE(9603, 53)
                  viewer←v8532 = (word) ViewerFromNode←P960((* ((( (ptr) x←v8604)+1)) ));
                  if ((viewer←v8532 == 0)) {
SOURCE(9650, 6)
                     return;
                     };
SOURCE(9658, 37)
                  (void) SpanFromNodes←P900((word) &span←v8560, (* (( (ptr) x←v8604)+1) ), (* (( (ptr) x←v8604)+2) ));
SOURCE(9697, 103)
                  if ((0 == (word) SpanIsBranches←P840((* (( (ptr) x←v8604)+1) ), (* (( (ptr) x←v8604)+2) )))) {
SOURCE(9741, 59)
                     {
                        word var←c25496;
                        var←c25496 = (word) FirstLevelParent←P780((* ((( (ptr) x←v8604)+2)) ));
                        {
                           word pd108;
                           pd108 = (* (( (ptr) (* (( (ptr) gf←c26872)+66)/* var←c24728 */  ))+27) );
                           (void) ( *( (fPt) ((*  (ptr) pd108 ))))((word) (( (bPt) &span←v8560)+8), var←c25496, pd108);
                           };
                        };
                     };
SOURCE(9802, 57)
                  (void) InvalidateSpan←P420(viewer←v8532, span←v8560, 1, 0, ( (int)(* (( (ptr) x←v8604)+3) ) <  (int)0));
                  };
               break;
            case 3: 
               {
                  word x←v8660;
                  x←v8660 = var←c25464;
SOURCE(9902, 287)
                  viewer←v8532 = (word) ViewerFromNode←P960((* ((( (ptr) x←v8660)+2)) ));
                  if ((viewer←v8532 != 0)) {
SOURCE(9951, 238)
                     {
                        word branches←v8716;
SOURCE(9953, 48)
                        branches←v8716 = (word) SpanIsBranches←P840((* (( (ptr) x←v8660)+2) ), (* (( (ptr) x←v8660)+3) ));
SOURCE(10003, 37)
                        (void) SpanFromNodes←P900((word) &span←v8560, (* (( (ptr) x←v8660)+2) ), (* (( (ptr) x←v8660)+3) ));
SOURCE(10042, 80)
                        if ((0 == branches←v8716)) {
SOURCE(10063, 59)
                           {
/*1*/   word var←c25528;
/*1*/   var←c25528 = (word) FirstLevelParent←P780((* ((( (ptr) x←v8660)+3)) ));
/*1*/   {
/*1*/      word pd109;
/*1*/      pd109 = (* (( (ptr) (* (( (ptr) gf←c26872)+66)/* var←c24728 */  ))+27) );
/*1*/      (void) ( *( (fPt) ((*  (ptr) pd109 ))))((word) (( (bPt) &span←v8560)+8), var←c25528, pd109);
/*1*/      };
/*1*/   };
                           };
SOURCE(10124, 40)
                        (void) InvalidateSpan←P420(viewer←v8532, span←v8560, 1, 1, 0);
SOURCE(10166, 23)
                        (void) SetNewVersion←P60(viewer←v8532);
                        };
                     };
SOURCE(10192, 34)
                  ((P1x7b) (( (bPt) (* (( (ptr) x←v8660)+4) )) + 36))->f = 1;
                  ((P1x7b) (( (bPt) (* (( (ptr) x←v8660)+1) )) + 36))->f = 1;
SOURCE(10228, 52)
                  viewer←v8532 = (word) ViewerFromNode←P960((* ((( (ptr) x←v8660)+1)) ));
                  if ((viewer←v8532 == 0)) {
SOURCE(10274, 6)
                     return;
                     };
SOURCE(10282, 51)
                  (void) InvalidateDest←P720(viewer←v8532, (* (( (ptr) x←v8660)+1) ), 1, (* (( (ptr) x←v8660)+6) ));
                  };
               break;
            case 1: 
               {
                  word x←v8760;
                  x←v8760 = var←c25464;
SOURCE(10377, 19)
                  ((P1x7b) (( (bPt) (* (( (ptr) x←v8760)+1) )) + 36))->f = 1;
SOURCE(10398, 52)
                  viewer←v8532 = (word) ViewerFromNode←P960((* ((( (ptr) x←v8760)+1)) ));
                  if ((viewer←v8532 == 0)) {
SOURCE(10444, 6)
                     return;
                     };
SOURCE(10452, 80)
                  {
                     word pd110;
                     pd110 = (* (( (ptr) (* (( (ptr) gf←c26872)+69)/* var←c25560 */  ))+29) );
                     if ((0 != (word) ( *( (fPt) ((*  (ptr) pd110 ))))((* (( (ptr) x←v8760)+2) ), (* (( (ptr) gf←c26872)+18) ), pd110))) {
SOURCE(10493, 39)
                        (void) InvalidateBranchAndNext←P600(viewer←v8532, (* (( (ptr) x←v8760)+1) ));
                        };
                     };
                  };
               break;
            default: 
               lab←L100064: ;
               break;
            };
         };
      };
SOURCE(10549, 21)
   (void) SetNewVersion←P60(viewer←v8532);
   }

static void NotifyAfterEdit←P1080(change←v5856)
   word change←v5856;
   {
   register ptr gf←c26904 =  (ptr) &globalframe;
   word viewer←v8816 = 0;
   W4 span←v8844;
   /* NotifyAfterEdit: */ 
SOURCE(10576, 1081)
SOURCE(10648, 16)
   span←v8844.f0 = 0;
   span←v8844.f1 =  (word) -1;
   span←v8844.f2 = 0;
   span←v8844.f3 =  (word) -1;
SOURCE(10666, 991)
   {
      word var←c25656;
      var←c25656 = change←v5856;
      if ((var←c25656 == 0)) {
         goto lab←L100065;
         };
      {
         word var←c25752;
         var←c25752 = (*  (ptr) var←c25656 );
         switch (var←c25752) {
            case 0: 
               {
                  word x←v8888;
                  x←v8888 = var←c25656;
SOURCE(10731, 19)
                  ((P1x7b) (( (bPt) (* (( (ptr) x←v8888)+1) )) + 36))->f = 1;
SOURCE(10752, 52)
                  viewer←v8816 = (word) ViewerFromNode←P960((* ((( (ptr) x←v8888)+1)) ));
                  if ((viewer←v8816 == 0)) {
SOURCE(10798, 6)
                     return;
                     };
SOURCE(10806, 77)
                  (void) UpdateAfterTextEdit←P360(viewer←v8816, (* (( (ptr) x←v8888)+1) ), (* (( (ptr) x←v8888)+2) ), (* (( (ptr) x←v8888)+3)
                      ), (* (( (ptr) x←v8888)+4) ), (* (( (ptr) x←v8888)+5) ));
                  };
               break;
            case 5: 
               {
                  word x←v8944;
                  x←v8944 = var←c25656;
SOURCE(10926, 428)
                  {
                     W4 span←v9000;
                     word child←v9028 = 0;
SOURCE(10928, 16)
                     span←v9000.f0 = 0;
                     span←v9000.f1 =  (word) -1;
                     span←v9000.f2 = 0;
                     span←v9000.f3 =  (word) -1;
SOURCE(10959, 31)
                     ((P1x7b) (( (bPt) (* (( (ptr) x←v8944)+2) )) + 36))->f = 1;
                     ((P24x8w) (( (ptr) (* (( (ptr) x←v8944)+1) )) + 9))->f = 1;
SOURCE(10992, 52)
                     viewer←v8816 = (word) ViewerFromNode←P960((* ((( (ptr) x←v8944)+2)) ));
                     if ((viewer←v8816 == 0)) {
SOURCE(11038, 6)
                        return;
                        };
SOURCE(11046, 21)
                     (void) SetNewVersion←P60(viewer←v8816);
SOURCE(11069, 43)
                     (void) InvalidateDest←P720(viewer←v8816, (* (( (ptr) x←v8944)+2) ), 0, 1);
SOURCE(11114, 238)
                     {
                        word pd111;
                        pd111 = (* (( (ptr) (* (( (ptr) gf←c26904)+66)/* var←c24728 */  ))+28) );
                        child←v9028 = (word) ( *( (fPt) ((*  (ptr) pd111 ))))((* ((( (ptr) x←v8944)+1)) ), pd111);
                        };
                     if ((child←v9028 != 0)) {
SOURCE(11232, 50)
                        span←v9000.f0 = child←v9028;
                        span←v9000.f1 = 0;
                        {
                           word pd112;
                           pd112 = (* (( (ptr) (* (( (ptr) gf←c26904)+66)/* var←c24728 */  ))+27) );
                           (void) ( *( (fPt) ((*  (ptr) pd112 ))))((word) (( (bPt) &span←v9000)+8), (* (( (ptr) x←v8944)+1) ), pd112);
                           };
SOURCE(11284, 28)
                        (void) InvalidateSpan←P420(viewer←v8816, span←v9000, 1, 0, 0);
SOURCE(11314, 38)
                        (void) UpdateStartPos←P660(viewer←v8816, (* (( (ptr) x←v8944)+1) ), (* (( (ptr) x←v8944)+1) ));
                        };
                     };
                  };
               break;
            case 3: 
               {
                  word x←v9072;
                  x←v9072 = var←c25656;
SOURCE(11397, 52)
                  viewer←v8816 = (word) ViewerFromNode←P960((* ((( (ptr) x←v9072)+1)) ));
                  if ((viewer←v8816 == 0)) {
SOURCE(11443, 6)
                     return;
                     };
SOURCE(11451, 39)
                  (void) UpdateStartPos←P660(viewer←v8816, (* (( (ptr) x←v9072)+2) ), (* (( (ptr) x←v9072)+3) ));
SOURCE(11492, 46)
                  if ((0 != (word) SpanIsBranches←P840((* (( (ptr) x←v9072)+2) ), (* (( (ptr) x←v9072)+3) )))) {
SOURCE(11532, 6)
                     return;
                     };
SOURCE(11540, 24)
                  span←v8844.f0 = (* (( (ptr) x←v9072)+1) );
                  span←v8844.f1 = 0;
SOURCE(11566, 59)
                  {
                     word var←c25720;
                     var←c25720 = (word) FirstLevelParent←P780((* ((( (ptr) x←v9072)+3)) ));
                     {
                        word pd113;
                        pd113 = (* (( (ptr) (* (( (ptr) gf←c26904)+66)/* var←c24728 */  ))+27) );
                        (void) ( *( (fPt) ((*  (ptr) pd113 ))))((word) (( (bPt) &span←v8844)+8), var←c25720, pd113);
                        };
                     };
SOURCE(11627, 30)
                  (void) InvalidateSpan←P420(viewer←v8816, span←v8844, 1, 0, 0);
                  };
               break;
            default: 
               lab←L100065: ;
               break;
            };
         };
      };
   }

static void Init←P1140()
   {
   register ptr gf←c26936 =  (ptr) &globalframe;
   word beforeEditChanges←v9128 = 127;
   word afterEditChanges←v9156 = 0;
   /* Init: */ 
SOURCE(11673, 504)
SOURCE(11794, 39)
   beforeEditChanges←v9128 = (beforeEditChanges←v9128 & 4294967231) | (((0)) << 6);
SOURCE(11835, 40)
   beforeEditChanges←v9128 = (beforeEditChanges←v9128 & 4294967293) | (((0)) << 1);
SOURCE(11877, 92)
   {
      word pd114;
      pd114 = (* (( (ptr) (* (( (ptr) gf←c26936)+70)/* var←c25784 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd114 ))))((word) (( (bPt) gf←c26936)+92)/* var←c23224 */ , 0, 1, beforeEditChanges←v9128, pd114)
      ;
      };
SOURCE(11971, 36)
   afterEditChanges←v9156 = (afterEditChanges←v9156 & 4294967287) | (((1)) << 3);
SOURCE(12009, 38)
   afterEditChanges←v9156 = (afterEditChanges←v9156 & 4294967293) | (((1)) << 1);
SOURCE(12049, 37)
   afterEditChanges←v9156 = (afterEditChanges←v9156 & 4294967231) | (((1)) << 6);
SOURCE(12088, 89)
   {
      word pd115;
      pd115 = (* (( (ptr) (* (( (ptr) gf←c26936)+70)/* var←c25784 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd115 ))))((word) (( (bPt) gf←c26936)+84)/* var←c23192 */ , 1, 1, afterEditChanges←v9156, pd115)
      ;
      };
   }

static void NoName←Q3540(formal←c0236, formal←c200008, formal←c200009, formal←c200010, formal←c200011)
   word formal←c0236;
   word formal←c200008;
   word formal←c200009;
   word formal←c200010;
   word formal←c200011;
   {
   register ptr gf←c0278 =  (ptr) &globalframe;
   if ((formal←c200009 == (* (( (ptr) (* (( (ptr) gf←c0278)+65)/* var←c24568 */  ))+39) ))) {
SOURCE(8054, 13)
      (* (( (ptr) formal←c200008)+7) ) = 1;
SOURCE(8069, 9)
      (*  (ptr) formal←c0236 ) = 2;
      (* (( (ptr) formal←c0236)+1) ) = 4;
      return;
      };
   (*  (ptr) formal←c0236 ) = 0;
   (* (( (ptr) formal←c0236)+1) ) = 0;
   return;
   }

static void NoName←Q3600(formal←c0241, formal←c200004, formal←c200005, formal←c200006, formal←c200007)
   word formal←c0241;
   word formal←c200004;
   word formal←c200005;
   word formal←c200006;
   word formal←c200007;
   {
   register ptr gf←c0279 =  (ptr) &globalframe;
   if ((formal←c200005 == (* (( (ptr) (* (( (ptr) gf←c0279)+65)/* var←c24568 */  ))+39) ))) {
SOURCE(7606, 13)
      (* (( (ptr) formal←c200004)+7) ) = 1;
SOURCE(7621, 9)
      (*  (ptr) formal←c0241 ) = 2;
      (* (( (ptr) formal←c0241)+1) ) = 3;
      return;
      };
   (*  (ptr) formal←c0241 ) = 0;
   (* (( (ptr) formal←c0241)+1) ) = 0;
   return;
   }

static void NoName←Q3660(formal←c0246, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c0246;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c0280 =  (ptr) &globalframe;
   if ((formal←c200001 == (* (( (ptr) (* (( (ptr) gf←c0280)+65)/* var←c24568 */  ))+39) ))) {
SOURCE(4954, 19)
      (* (( (ptr) formal←c200000)+6) ) = 2147483647;
SOURCE(4975, 33)
      (* (( (ptr) formal←c200000)+8) ) = 0;
      (* (( (ptr) formal←c200000)+7) ) = 0;
SOURCE(5010, 85)
      if ((0 != (* (( (ptr) (*  (ptr) formal←c200000 ))+8) ))) {
         (* (( (ptr) formal←c200000)+5) ) = 0;
         }
      else {
         (* (( (ptr) formal←c200000)+5) ) = 2147483647;
         };
SOURCE(5097, 10)
      (*  (ptr) formal←c0246 ) = 2;
      (* (( (ptr) formal←c0246)+1) ) = 2;
      return;
      };
   (*  (ptr) formal←c0246 ) = 0;
   (* (( (ptr) formal←c0246)+1) ) = 0;
   return;
   }

/* file: TEditDisplay2Impl, module: TEditDisplay2Impl, compiled at: February 27, 1992 7:05:36 pm PST */ 
extern void XR←install←TEditDisplay2Impl() {
   NoName←Q3300();
   }
extern void XR←run←TEditDisplay2Impl() { XR←Start(&globalframe); }