/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: July 28, 1993 10:20:12 am PDT */
/* C2C version: April 20, 1993 (sun4) */
/* ref-counting: off */
/* file: ImagerManhattanImpl, module: ImagerManhattanImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [1906274210,780468037] ImagerManhattanImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {word f0, f1, f2, f3, f4;} W5;
typedef struct {W8 f; W5 r;} W13;
typedef struct {word f0, f1;} W2;
typedef word (*fPt)();
typedef struct {word f0, f1, f2, f3;} W4;
typedef W4 *W4Pt;
typedef struct {word f0, f1, f2, f3, f4, f5;} W6;
typedef W6 *W6Pt;
typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7;
typedef W7 *W7Pt;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W8 f; W3 r;} W11;
typedef W2 *W2Pt;
typedef struct {W8 f; word r;} W9;
#define SOURCE(p, l) /* source p, l */
#define MIN(cast, x, y)  ( ( cast x) < ( cast y) ? (x) : (y) )
#define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i )
#define MAX(cast, x, y)  ( ( cast x) > ( cast y) ? (x) : (y) )
static void NoName←Q5532();
static void ImagerManhattanImpl←P0();
static word Validate←P60();
static word CreateFromRuns←P120();
static void Run←P2304();
static void Repeat←P2364();
static word TryToMergeRows←P180();
static void Destroy←P240();
static word Copy←P300();
static void Advance←P420();
static void SkipTo←P480();
static void TestReader←P540();
static void Run←P2616();
static word Union←P600();
static void Runs←P2676();
static word Intersection←P660();
static void Runs←P2832();
static word Invert←P720();
static void Emit←P2988();
static word Difference←P780();
static void Shift←P840();
static word FullyDestructiveUnion←P900();
static word DestructiveUnion←P960();
static word DestructiveIntersection←P1020();
static word DestructiveClip←P1080();
static word DestructiveDifference←P1140();
static word SplitOffSecondHalf←P1200();
static word Canonicalize←P1260();
static word CreateFromBoxes←P1320();
static word NoName←Q5592();
static void AddBox←P3240();
static void BoundingBox←P1380();
static word CountBoxes←P1440();
static word CountRuns←P1500();
static word TestCreate←P1560();
static void Runs←P3492();
static void boxAction←P3552();
static void Map←P1620();
static void Clip←P1680();
static word IsVisible←P1740();
static void ClipBoxToMask←P1800();
static word Equal←P1860();
static word FromList←P1920();
static word CreateFromBox←P1980();
static word GetScratch←P2040();
static void FreeScratch←P2100();
static void NoName←Q5652();
static struct {unsigned f; char r[4];} string1 = {65540, "\242\000\000"};
static struct {unsigned f; char r[44];} string2 = {2752556, "\260\006\005\146\151\162\163\164\257\300\243\162\130\311\300\344\000\142\023\101\130\005\004\162\145\163\164\214\257\300\243\162\130\311\300\344\000\142\023\101\130\261\000"};
static struct {unsigned f; char r[4];} string3 = {131074, "\003\004\000"};
static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\161\237\157\242\300\056\204\377\105\100\164\000\000"};
static struct {unsigned f; char r[4];} string5 = {131074, "\003\010\000"};
static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\350\311\135\367\300\362\215\374\250\100\150\000\000"};
static struct {
   word f0[16]; word f16; word f17; word f18; 
   word f19; word f20; word f21; word f22; 
   word f23; word f24; word f25; word f26; 
   word f27; word f28; word f29; word f30; 
   word f31; word f32; word f33; word f34; 
   word f35; word f36; word f37; word f38; 
   word f39; word f40; word f41; word f42; 
   word f43; word f44; word f45; word f46; 
   word f47; word f48; word f49; word f50; 
   word f51; word f52; word f53; word f54; 
   word f55; word f56; word f57; word f58; 
   word f59; word f60; word f61; word f62; 
   word f63; word f64; word f65; word f66; 
   word f67; word f68; word f69; word f70; 
   word f71; word f72; word f73; word f74; 
   word f75; word f76; word f77; word f78; 
   word f79; word f80; word f81; word f82; 
   word f83; word f84; word f85; word f86; 
   word f87[3]; word f90; word f91[7]; 
   } globalframe = {
   {0}, (word) FreeScratch←P2100, 0, (word) GetScratch←P2040, 
   0, (word) CreateFromBox←P1980, 0, (word) FromList←P1920, 
   0, (word) Equal←P1860, 0, (word) ClipBoxToMask←P1800, 
   0, (word) IsVisible←P1740, 0, (word) Clip←P1680, 
   0, (word) Map←P1620, 0, (word) TestCreate←P1560, 
   0, (word) CountRuns←P1500, 0, (word) CountBoxes←P1440, 
   0, (word) BoundingBox←P1380, 0, (word) CreateFromBoxes←P1320, 
   0, (word) Canonicalize←P1260, 0, (word) SplitOffSecondHalf←P1200, 
   0, (word) DestructiveDifference←P1140, 0, (word) DestructiveClip←P1080, 
   0, (word) DestructiveIntersection←P1020, 0, (word) DestructiveUnion←P960, 
   0, (word) FullyDestructiveUnion←P900, 0, (word) Shift←P840, 
   0, (word) Difference←P780, 0, (word) Invert←P720, 
   0, (word) Intersection←P660, 0, (word) Union←P600, 
   0, (word) TestReader←P540, 0, (word) SkipTo←P480, 
   0, (word) Advance←P420, 0, (word) Copy←P300, 
   0, (word) Destroy←P240, 0, (word) TryToMergeRows←P180, 
   0, (word) CreateFromRuns←P120, 0, (word) Validate←P60, 
   0, (word) ImagerManhattanImpl←P0, 0, (word) 2147483647, 
   {0}, (word) 1, {0}
   };

static void NoName←Q5532()
   {
   register ptr gf←c0339 =  (ptr) &globalframe;
   word var←c24648;
   (* (( (ptr) gf←c0339)+13) ) = (word) XR←GetTypeIndexS((word) (&string1));
   (* (( (ptr) gf←c0339)+14) ) = (word) XR←GetTypeIndex((word) &string2, 0, (word) &string3);
   (void) XR←DeclareGlobalFrame((word) "ImagerManhattanImpl", &globalframe, (word) XR←GetTypeIndex((word) &string4, 0, (word) &string5)
      , (word) (( (bPt) gf←c0339)+336)/* var←c22216 */ );
   var←c24648 = (word) XR←ExportInterface((word) "ImagerManhattan", (word) XR←GetTypeIndexS((word) (&string6)), 24);
   (* (( (ptr) gf←c0339)+97)/* var←c24616 */  ) = var←c24648;
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+328)/* var←c22184 */ , 67371009, (word) "Validate");
   (void) XR←ExportVar(var←c24648, 1, (word) (( (bPt) gf←c0339)+60)/* var←c21096 */ );
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+320)/* var←c22152 */ , 67371521, (word) "CreateFromRuns");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+80)/* var←c21192 */ , 68158209, (word) "CreateFromBox");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+168)/* var←c21544 */ , 67372033, (word) "CreateFromBoxes");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+304)/* var←c22088 */ , 263425, (word) "Destroy");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+296)/* var←c22056 */ , 67372545, (word) "Copy");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+264)/* var←c21928 */ , 67634946, (word) "Union");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+256)/* var←c21896 */ , 67635202, (word) "Intersection");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+240)/* var←c21832 */ , 67635458, (word) "Difference");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+232)/* var←c21800 */ , 788995, (word) "Shift");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+176)/* var←c21576 */ , 67373825, (word) "Canonicalize");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+160)/* var←c21512 */ , 268700673, (word) "BoundingBox");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+152)/* var←c21480 */ , 67374337, (word) "CountBoxes");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+144)/* var←c21448 */ , 67374593, (word) "CountRuns");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+128)/* var←c21384 */ , 790275, (word) "Map");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+120)/* var←c21352 */ , 1839108, (word) "Clip");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+96)/* var←c21256 */ , 67637506, (word) "Equal");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+112)/* var←c21320 */ , 67637762, (word) "IsVisible");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+104)/* var←c21288 */ , 1577731, (word) "ClipBoxToMask");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+216)/* var←c21736 */ , 67638274, (word) "DestructiveUnion");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+208)/* var←c21704 */ , 67638530, (word) "DestructiveIntersection")
   ;
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+200)/* var←c21672 */ , 68425218, (word) "DestructiveClip");
   (void) XR←ExportProcS(var←c24648, (word) (( (bPt) gf←c0339)+192)/* var←c21640 */ , 67639042, (word) "DestructiveDifference")
   ;
   }

static void ImagerManhattanImpl←P0(formal←c050, formal←c049)
   word formal←c050;
   word formal←c049;
   {
   register ptr gf←c24680 =  (ptr) &globalframe;
   /* ImagerManhattanImpl: */ 
SOURCE(151, 19108)
   /* moved to installation proc */ 
   /* moved to installation proc */ 
SOURCE(18099, 22)
   (* (( (ptr) gf←c24680)+10)/* availLimit←v3588 */  ) = 1000;
SOURCE(18123, 25)
   (* (( (ptr) gf←c24680)+11)/* scratchChunkSize←v3616 */  ) = 8;
   }

static word Validate←P60(polygon←v3796)
   word polygon←v3796;
   {
   register ptr gf←c24712 =  (ptr) &globalframe;
   word var←c3840;
   /* Validate: */ 
SOURCE(371, 729)
SOURCE(434, 632)
   if ((polygon←v3796 != 0)) {
SOURCE(456, 624)
      {
         word a←v9080;
         word amins←v9108;
         word aminf←v9136;
         word amaxs←v9164;
         word amaxf←v9192;
SOURCE(458, 20)
         a←v9080 = polygon←v3796;
SOURCE(480, 30)
         amins←v9108 = (*  (ptr) a←v9080 );
SOURCE(512, 30)
         aminf←v9136 = (* (( (ptr) a←v9080)+1) );
SOURCE(544, 30)
         amaxs←v9164 = (* (( (ptr) a←v9080)+2) );
SOURCE(576, 30)
         amaxf←v9192 = (* (( (ptr) a←v9080)+3) );
SOURCE(608, 458)
         lab←L100002: ;
SOURCE(608, 458)
         {
            word b←v9236;
SOURCE(611, 19)
            b←v9236 = (* (( (ptr) a←v9080)+4) );
SOURCE(632, 70)
            if (( (int)amins←v9108 >=  (int)amaxs←v9164) || ( (int)aminf←v9136 >=  (int)amaxf←v9192)) {
SOURCE(673, 29)
               (void) XR←RaiseError((word) (( (bPt) gf←c24712)+60)/* var←c21096 */ , 0);
               };
SOURCE(704, 362)
            if ((b←v9236 == 0)) {
SOURCE(720, 10)
               goto lab←L100001;
               }
            else {
SOURCE(730, 338)
               {
                  word bmins←v9280;
                  word bminf←v9308;
                  word bmaxs←v9336;
                  word bmaxf←v9364;
SOURCE(732, 30)
                  bmins←v9280 = (*  (ptr) b←v9236 );
SOURCE(764, 30)
                  bminf←v9308 = (* (( (ptr) b←v9236)+1) );
SOURCE(796, 30)
                  bmaxs←v9336 = (* (( (ptr) b←v9236)+2) );
SOURCE(828, 30)
                  bmaxf←v9364 = (* (( (ptr) b←v9236)+3) );
                  if (( (int)amaxs←v9164 <=  (int)bmins←v9280)) {
                     }
                  else {
                     if ( (  ( ( (int)amins←v9108 ==  (int)bmins←v9280) ? ( (int)amaxs←v9164 ==  (int)bmaxs←v9336) : 0 )  ? ( (int)amaxf←v9192 <=  (int)bminf←v9308) : 0 ) ) {
                        }
                     else {
SOURCE(970, 29)
                        (void) XR←RaiseError((word) (( (bPt) gf←c24712)+60)/* var←c21096 */ , 0);
                        };
                     };
SOURCE(1001, 5)
                  a←v9080 = b←v9236;
SOURCE(1008, 13)
                  amins←v9108 = bmins←v9280;
SOURCE(1023, 13)
                  aminf←v9136 = bminf←v9308;
SOURCE(1038, 13)
                  amaxs←v9164 = bmaxs←v9336;
SOURCE(1053, 13)
                  amaxf←v9192 = bmaxf←v9364;
                  };
               };
            };
         goto lab←L100002;
         lab←L100001: ;
         };
      };
SOURCE(1083, 17)
   return(polygon←v3796);
   }

static word CreateFromRuns←P120(runs←v3900)
   word runs←v3900;
   {
   W13 var←c24744;
   word polygon←v4208;
   /* declaration of var←c22376 skipped */ 
   /* declaration of var←c22408 skipped */ 
   word scratch←v9408;
   /* declaration of last←v9436 skipped */ 
   /* declaration of secondLastRowStart←v9464 skipped */ 
   /* declaration of lastRowStart←v9492 skipped */ 
   /* declaration of secondLastRowCount←v9520 skipped */ 
   /* declaration of lastRowCount←v9548 skipped */ 
   /* CreateFromRuns: */ 
SOURCE(1104, 2232)
   {
      word tmpAddr7;
      tmpAddr7 = (word) (( (ptr) &var←c24744)+4)/* var←c22376 */ ;
      (*  (ptr) tmpAddr7 ) = ( ((word)  (fPt) Repeat←P2364) );
      (* (( (ptr) tmpAddr7) + 1) ) = 1;
      };
   {
      word tmpAddr8;
      tmpAddr8 = (word) (( (ptr) &var←c24744)+6)/* var←c22408 */ ;
      (*  (ptr) tmpAddr8 ) = ( ((word)  (fPt) Run←P2304) );
      (* (( (ptr) tmpAddr8) + 1) ) = 1;
      };
SOURCE(1104, 2232)
   polygon←v4208 = 0;
SOURCE(1263, 9)
   scratch←v9408 = (word) GetScratch←P2040();
SOURCE(1303, 6)
   (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ) = scratch←v9408;
SOURCE(1335, 20)
   (* (( (ptr) &var←c24744)+9)/* secondLastRowStart←v9464 */  ) = 0;
SOURCE(1377, 14)
   (* (( (ptr) &var←c24744)+10)/* lastRowStart←v9492 */  ) = (* (( (ptr) &var←c24744)+8)/* last←v9436 */  );
SOURCE(1414, 32)
   (* (( (ptr) &var←c24744)+11)/* secondLastRowCount←v9520 */  ) =  (word) -1;
SOURCE(1448, 25)
   (* (( (ptr) &var←c24744)+12)/* lastRowCount←v9548 */  ) = 0;
SOURCE(2723, 81)
   (*  (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ) ) = 2147483648;
   (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+1) ) = 2147483648;
   (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+2) ) = 2147483648;
   (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+3) ) = 2147483648;
SOURCE(2806, 17)
   (void) ( *( (fPt) ((*  (ptr) runs←v3900 ))))((word) (( (bPt) &var←c24744)+24)/* var←c22408 */ , (word) (( (bPt) &var←c24744)+16)
      /* var←c22376 */ , runs←v3900);
SOURCE(2825, 233)
   if ( (  ( ( (int)(* (( (ptr) &var←c24744)+11)/* secondLastRowCount←v9520 */  ) ==  (int)(* (( (ptr) &var←c24744)+12)/* lastRowCount←v9548 */  )) ? ( (int)(* (
      ( (ptr) (* (( (ptr) &var←c24744)+9)/* secondLastRowStart←v9464 */  ))+2) ) ==  (int)(*  (ptr) (* (( (ptr) &var←c24744)+10)
   /* lastRowStart←v9492 */  ) )) : 0 )  ? (0 != (word) TryToMergeRows←P180((* (( (ptr) &var←c24744)+9)/* secondLastRowStart←v9464 */  ), (* (
         ( (ptr) &var←c24744)+12)/* lastRowCount←v9548 */  ))) : 0 ) ) {
SOURCE(2984, 25)
      (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ) = (* (( (ptr) &var←c24744)+9)/* secondLastRowStart←v9464 */  );
SOURCE(3011, 47)
      {
         register word noName←c22440 = 0;
         register word noName←c22472;
         noName←c22472 = ((* (( (ptr) &var←c24744)+12)/* lastRowCount←v9548 */  ) - 1);
         if (( (int)noName←c22440 >=  (int)noName←c22472)) {
            goto lab←L100003;
            };
         lab←L100006: ;
SOURCE(3042, 16)
         (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ) = (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+4) );
         noName←c22440 = (noName←c22440 + 1);
         if (( (int)noName←c22440 <  (int)noName←c22472)) {
            goto lab←L100006;
            };
         lab←L100003: ;
         };
      };
   if (( (int)(* (( (ptr) scratch←v9408)+3) ) >  (int)(* (( (ptr) scratch←v9408)+1) ))) {
SOURCE(3136, 17)
      polygon←v4208 = scratch←v9408;
SOURCE(3155, 19)
      scratch←v9408 = (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+4) );
SOURCE(3176, 15)
      (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+4) ) = 0;
      }
   else {
      if (((* (( (ptr) &var←c24744)+8)/* last←v9436 */  ) == scratch←v9408)) {
SOURCE(3216, 14)
         polygon←v4208 = 0;
         }
      else {
SOURCE(3246, 22)
         polygon←v4208 = (* (( (ptr) scratch←v9408)+4) );
SOURCE(3270, 24)
         (* (( (ptr) scratch←v9408)+4) ) = (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+4) );
SOURCE(3296, 15)
         (* (( (ptr) (* (( (ptr) &var←c24744)+8)/* last←v9436 */  ))+4) ) = 0;
         };
      };
SOURCE(3316, 20)
   (void) FreeScratch←P2100(scratch←v9408);
SOURCE(1104, 2232)
   return(polygon←v4208);
   }

static void Run←P2304(sMin←v10016, fMin←v10044, fSize←v10072, formal←c24776)
   word sMin←v10016;
   word fMin←v10044;
   word fSize←v10072;
   word formal←c24776;
   {
   word fMaxCurrent←v10160;
   formal←c24776 = (formal←c24776 - 24);
   /* Run: */ 
SOURCE(1475, 1048)
SOURCE(1522, 39)
   fMaxCurrent←v10160 = (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+3) );
SOURCE(1563, 960)
   if ( ( ( (int)(* (( (ptr) formal←c24776)+12) ) >  (int)0) ? ( (int)sMin←v10016 ==  (int)(*  (ptr) (* (( (ptr) formal←c24776)+8)
    ) )) : 0 ) ) {
SOURCE(1618, 46)
      if (( (int)((* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+2) ) - (*  (ptr) (* (( (ptr) formal←c24776)+8) ) )) !=  (int)1)) {
SOURCE(1664, 5)
         (void) XR←RaiseUnnamedError();
         };
SOURCE(1671, 272)
      {
         word var←c22504;
         var←c22504 = fMin←v10044;
         if (( (int)var←c22504 ==  (int)fMaxCurrent←v10160)) {
SOURCE(1706, 43)
            (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+3) ) = ((* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+3) ) + fSize←v10072);
            }
         else {
            if (( (int)var←c22504 >  (int)fMaxCurrent←v10160)) {
SOURCE(1771, 48)
               if (((* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+4) ) == 0)) {
SOURCE(1795, 24)
                  {
                     word var←c22536;
                     var←c22536 = (word) GetScratch←P2040();
                     (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+4) ) = var←c22536;
                     };
                  };
SOURCE(1821, 16)
               (* (( (ptr) formal←c24776)+8) ) = (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+4) );
SOURCE(1839, 71)
               (*  (ptr) (* (( (ptr) formal←c24776)+8) ) ) = sMin←v10016;
               (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+1) ) = fMin←v10044;
               (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+2) ) = (sMin←v10016 + 1);
               (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+3) ) = (fMin←v10044 + fSize←v10072);
SOURCE(1912, 31)
               (* (( (ptr) formal←c24776)+12) ) = ((* (( (ptr) formal←c24776)+12) ) + 1);
               }
            else {
SOURCE(1959, 5)
               (void) XR←RaiseUnnamedError();
               };
            };
         };
      }
   else {
SOURCE(1975, 315)
      if ( (  ( ( (int)(* (( (ptr) formal←c24776)+11) ) ==  (int)(* (( (ptr) formal←c24776)+12) )) ? ( (int)(* (( (ptr) (* (( (ptr) formal←c24776)+9)
          ))+2) ) ==  (int)(*  (ptr) (* (( (ptr) formal←c24776)+10) ) )) : 0 )  ? (0 != (word) TryToMergeRows←P180((* (( (ptr) formal←c24776)+9)
          ), (* (( (ptr) formal←c24776)+12) ))) : 0 ) ) {
SOURCE(2134, 19)
         (* (( (ptr) formal←c24776)+8) ) = (* (( (ptr) formal←c24776)+10) );
SOURCE(2155, 33)
         (* (( (ptr) formal←c24776)+10) ) = (* (( (ptr) formal←c24776)+9) );
SOURCE(2190, 23)
         (* (( (ptr) formal←c24776)+11) ) =  (word) -1;
         }
      else {
SOURCE(2224, 48)
         if (((* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+4) ) == 0)) {
SOURCE(2248, 24)
            {
               word var←c22568;
               var←c22568 = (word) GetScratch←P2040();
               (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+4) ) = var←c22568;
               };
            };
SOURCE(2274, 16)
         (* (( (ptr) formal←c24776)+8) ) = (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+4) );
         };
SOURCE(2295, 33)
      (* (( (ptr) formal←c24776)+9) ) = (* (( (ptr) formal←c24776)+10) );
SOURCE(2330, 33)
      (* (( (ptr) formal←c24776)+11) ) = (* (( (ptr) formal←c24776)+12) );
SOURCE(2365, 71)
      (*  (ptr) (* (( (ptr) formal←c24776)+8) ) ) = sMin←v10016;
      (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+1) ) = fMin←v10044;
      (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+2) ) = (sMin←v10016 + 1);
      (* (( (ptr) (* (( (ptr) formal←c24776)+8) ))+3) ) = (fMin←v10044 + fSize←v10072);
SOURCE(2438, 19)
      (* (( (ptr) formal←c24776)+10) ) = (* (( (ptr) formal←c24776)+8) );
SOURCE(2459, 16)
      (* (( (ptr) formal←c24776)+12) ) = 1;
SOURCE(2477, 46)
      if (( (int)(* (( (ptr) (* (( (ptr) formal←c24776)+9) ))+2) ) >  (int)sMin←v10016)) {
SOURCE(2523, 5)
         (void) XR←RaiseUnnamedError();
         };
      };
   }

static void Repeat←P2364(timesToRepeatScanline←v10132, formal←c24808)
   word timesToRepeatScanline←v10132;
   word formal←c24808;
   {
   word t←v10204;
   formal←c24808 = (formal←c24808 - 16);
   /* Repeat: */ 
SOURCE(2536, 173)
SOURCE(2581, 3)
   t←v10204 = (* (( (ptr) formal←c24808)+10) );
SOURCE(2615, 94)
   {
      register word noName←c22600 = 0;
      register word noName←c22632;
      noName←c22632 = (* (( (ptr) formal←c24808)+12) );
      if (( (int)noName←c22600 >=  (int)noName←c22632)) {
         goto lab←L100007;
         };
      lab←L100010: ;
SOURCE(2644, 53)
      (* (( (ptr) t←v10204)+2) ) = ((* (( (ptr) t←v10204)+2) ) + timesToRepeatScanline←v10132);
SOURCE(2699, 10)
      t←v10204 = (* (( (ptr) t←v10204)+4) );
      noName←c22600 = (noName←c22600 + 1);
      if (( (int)noName←c22600 <  (int)noName←c22632)) {
         goto lab←L100010;
         };
      lab←L100007: ;
      };
   }

static word TryToMergeRows←P180(secondLastRowStart←v4268, boxesPerRow←v4296)
   word secondLastRowStart←v4268;
   word boxesPerRow←v4296;
   {
   word success←v4424;
   word max←v10332;
   word s←v10360;
   word t←v10388;
   /* TryToMergeRows: */ 
SOURCE(3342, 589)
SOURCE(3463, 3)
   s←v10360 = secondLastRowStart←v4268;
SOURCE(3503, 3)
   t←v10388 = secondLastRowStart←v4268;
SOURCE(3543, 52)
   {
      register word i←v10600 = 0;
      register word noName←c22664;
      noName←c22664 = boxesPerRow←v4296;
      if (( (int)i←v10600 >=  (int)noName←c22664)) {
         goto lab←L100011;
         };
      lab←L100014: ;
SOURCE(3577, 18)
      t←v10388 = (* (( (ptr) t←v10388)+4) );
      i←v10600 = (i←v10600 + 1);
      if (( (int)i←v10600 <  (int)noName←c22664)) {
         goto lab←L100014;
         };
      lab←L100011: ;
      };
SOURCE(3597, 37)
   if (( (int)boxesPerRow←v4296 ==  (int)0)) {
SOURCE(3621, 13)
      return(1);
      };
SOURCE(3636, 143)
   {
      register word i←v10644 = 0;
      register word noName←c22696;
      noName←c22696 = boxesPerRow←v4296;
      if (( (int)i←v10644 >=  (int)noName←c22696)) {
         goto lab←L100015;
         };
      lab←L100018: ;
SOURCE(3670, 85)
      if (( (int)(* (( (ptr) s←v10360)+1) ) !=  (int)(* (( (ptr) t←v10388)+1) )) || ( (int)(* (( (ptr) s←v10360)+3) ) !=  (int)(* (
         ( (ptr) t←v10388)+3) ))) {
SOURCE(3741, 14)
         return(0);
         };
SOURCE(3757, 10)
      s←v10360 = (* (( (ptr) s←v10360)+4) );
SOURCE(3769, 10)
      t←v10388 = (* (( (ptr) t←v10388)+4) );
      i←v10644 = (i←v10644 + 1);
      if (( (int)i←v10644 <  (int)noName←c22696)) {
         goto lab←L100018;
         };
      lab←L100015: ;
      };
SOURCE(3790, 5)
   t←v10388 = s←v10360;
SOURCE(3797, 22)
   s←v10360 = secondLastRowStart←v4268;
SOURCE(3821, 19)
   max←v10332 = (* (( (ptr) t←v10388)+2) );
SOURCE(3842, 65)
   {
      register word i←v10688 = 0;
      register word noName←c22728;
      noName←c22728 = boxesPerRow←v4296;
      if (( (int)i←v10688 >=  (int)noName←c22728)) {
         goto lab←L100019;
         };
      lab←L100022: ;
SOURCE(3876, 19)
      (* (( (ptr) s←v10360)+2) ) = max←v10332;
SOURCE(3897, 10)
      s←v10360 = (* (( (ptr) s←v10360)+4) );
      i←v10688 = (i←v10688 + 1);
      if (( (int)i←v10688 <  (int)noName←c22728)) {
         goto lab←L100022;
         };
      lab←L100019: ;
      };
SOURCE(3918, 13)
   return(1);
   }

static void Destroy←P240(rectangleList←v4484)
   word rectangleList←v4484;
   {
   /* Destroy: */ 
SOURCE(3937, 83)
SOURCE(3994, 26)
   (void) FreeScratch←P2100(rectangleList←v4484);
   }

static word Copy←P300(polygon←v4628)
   word polygon←v4628;
   {
   word copy←v4672;
   word scratch←v10732;
   word last←v10760;
   /* Copy: */ 
SOURCE(4026, 419)
SOURCE(4026, 419)
   copy←v4672 = 0;
SOURCE(4091, 9)
   scratch←v10732 = (word) GetScratch←P2040();
SOURCE(4131, 6)
   last←v10760 = scratch←v10732;
SOURCE(4163, 143)
   lab←L100025: ;
   if ((polygon←v4628 != 0)) {
      }
   else {
      goto lab←L100023;
      };
SOURCE(4186, 49)
   if (((* (( (ptr) last←v10760)+4) ) == 0)) {
SOURCE(4211, 24)
      (* (( (ptr) last←v10760)+4) ) = (word) GetScratch←P2040();
      };
SOURCE(4238, 16)
   last←v10760 = (* (( (ptr) last←v10760)+4) );
SOURCE(4256, 26)
   (*  (W4Pt) last←v10760 ) = (*  (W4Pt) polygon←v4628 );
SOURCE(4284, 22)
   polygon←v4628 = (* (( (ptr) polygon←v4628)+4) );
   goto lab←L100025;
   lab←L100023: ;
SOURCE(4317, 103)
   if ((last←v10760 == scratch←v10732)) {
SOURCE(4340, 16)
      copy←v4672 = 0;
      }
   else {
SOURCE(4358, 19)
      copy←v4672 = (* (( (ptr) scratch←v10732)+4) );
SOURCE(4379, 24)
      (* (( (ptr) scratch←v10732)+4) ) = (* (( (ptr) last←v10760)+4) );
SOURCE(4405, 15)
      (* (( (ptr) last←v10760)+4) ) = 0;
      };
SOURCE(4425, 20)
   (void) FreeScratch←P2100(scratch←v10732);
SOURCE(4026, 419)
   return(copy←v4672);
   }

static void Advance←P420(r←v5132)
   word r←v5132;
   {
   word next←v10972;
   /* Advance: */ 
SOURCE(4923, 573)
SOURCE(4981, 33)
   next←v10972 = (* (( (ptr) (* (( (ptr) r←v5132)+6) ))+4) );
SOURCE(5016, 289)
   if ((next←v10972 == 0) || ( (int)(*  (ptr) next←v10972 ) !=  (int)(*  (ptr) (* (( (ptr) r←v5132)+5) ) ))) {
SOURCE(5084, 221)
      if (((* (( (ptr) r←v5132)+3) ) > 1)) {
SOURCE(5112, 33)
         (* (( (ptr) r←v5132)+3) ) = ((* (( (ptr) r←v5132)+3) ) - 1);
SOURCE(5147, 13)
         (*  (ptr) r←v5132 ) = ((*  (ptr) r←v5132 ) + 1);
SOURCE(5162, 19)
         next←v10972 = (* (( (ptr) r←v5132)+5) );
         }
      else {
SOURCE(5190, 115)
         if ((next←v10972 != 0)) {
SOURCE(5211, 19)
            (* (( (ptr) r←v5132)+5) ) = next←v10972;
SOURCE(5232, 49)
            (* (( (ptr) r←v5132)+3) ) = ((* (( (ptr) next←v10972)+2) ) - (*  (ptr) next←v10972 ));
SOURCE(5283, 22)
            (*  (ptr) r←v5132 ) = (*  (ptr) next←v10972 );
            };
         };
      };
SOURCE(5313, 183)
   if ((next←v10972 == 0)) {
SOURCE(5332, 51)
      XR←FillWords(&(* (W6Pt) ((( (ptr) r←v5132)+1))), 6, 0);
      (*  (ptr) r←v5132 ) = 2147483647;
      (* (( (ptr) r←v5132)+4) ) = 1;
      }
   else {
SOURCE(5385, 25)
      (* (( (ptr) r←v5132)+1) ) = (* (( (ptr) next←v10972)+1) );
SOURCE(5412, 25)
      (* (( (ptr) r←v5132)+2) ) = (* (( (ptr) next←v10972)+3) );
SOURCE(5439, 19)
      (* (( (ptr) r←v5132)+6) ) = next←v10972;
SOURCE(5460, 36)
      if (((* (( (ptr) r←v5132)+3) ) == 0)) {
SOURCE(5486, 10)
         (void) Advance←P420(r←v5132);
         };
      };
   }

static void SkipTo←P480(r←v5204, s←v5232)
   word r←v5204;
   word s←v5232;
   {
   /* SkipTo: */ 
SOURCE(5505, 285)
SOURCE(5574, 216)
   lab←L100028: ;
   if (( (int)(*  (ptr) r←v5204 ) <  (int)s←v5232)) {
      }
   else {
      goto lab←L100026;
      };
SOURCE(5591, 199)
   if ( ( ((* (( (ptr) r←v5204)+5) ) == (* (( (ptr) r←v5204)+6) )) ? ((* (( (ptr) r←v5204)+3) ) > 1) : 0 ) ) {
SOURCE(5649, 124)
      {
         word delta←v11016;
SOURCE(5651, 53)
         {
            word idx9;
            word x10;
            word x11;
            delta←v11016 = (x10 = ((
                  idx9 = (* (( (ptr) r←v5204)+3) ),
                  SGNCK(idx9)
                  ) - 1),
               x11 = (s←v5232 - (*  (ptr) r←v5204 )),
               MIN((int)(word), x10, x11));
            };
SOURCE(5706, 17)
         (*  (ptr) r←v5204 ) = ((*  (ptr) r←v5204 ) + delta←v11016);
SOURCE(5725, 46)
         {
            word idx12;
            (* (( (ptr) r←v5204)+3) ) = ((
               idx12 = (* (( (ptr) r←v5204)+3) ),
               SGNCK(idx12)
               ) - delta←v11016);
            };
         };
      }
   else {
SOURCE(5780, 10)
      (void) Advance←P420(r←v5204);
      };
   goto lab←L100028;
   lab←L100026: ;
   }

static void TestReader←P540(polygon←v5304)
   word polygon←v5304;
   {
   W13 var←c24840;
   register ptr gf←c24872 =  (ptr) &globalframe;
   /* declaration of var←c22760 skipped */ 
   /* declaration of reader←v11060 skipped */ 
   /* TestReader: */ 
SOURCE(5805, 365)
   {
      word tmpAddr13;
      tmpAddr13 = (word) (( (ptr) &var←c24840)+4)/* var←c22760 */ ;
      (*  (ptr) tmpAddr13 ) = ( ((word)  (fPt) Run←P2616) );
      (* (( (ptr) tmpAddr13) + 1) ) = 1;
      };
SOURCE(5845, 35)
SOURCE(4643, 276)
   if ((polygon←v5304 == 0)) {
SOURCE(4665, 55)
      (*  (W7Pt) (( (ptr) &var←c24840)+6)/* reader←v11060 */  ) = (*  (W7Pt) (( (ptr) gf←c24872)+86)/* var←c22280 */  );
      }
   else {
SOURCE(4720, 199)
      (* (( (ptr) &var←c24840)+6) ) = (*  (ptr) polygon←v5304 );
      (* (( (ptr) &var←c24840)+7) ) = (* (( (ptr) polygon←v5304)+1) );
      (* (( (ptr) &var←c24840)+8) ) = (* (( (ptr) polygon←v5304)+3) );
      (* (( (ptr) &var←c24840)+9) ) = ((* (( (ptr) polygon←v5304)+2) ) - (*  (ptr) polygon←v5304 ));
      (* (( (ptr) &var←c24840)+10) ) = 0;
      (* (( (ptr) &var←c24840)+11) ) = polygon←v5304;
      (* (( (ptr) &var←c24840)+12) ) = polygon←v5304;
      };
SOURCE(6121, 23)
   (void) Map←P1620(polygon←v5304, (word) (( (bPt) &var←c24840)+16)/* var←c22760 */ , 1);
SOURCE(6146, 24)
   if ((0 == (* (( (ptr) &var←c24840)+10) ))) {
SOURCE(6170, 5)
      (void) XR←RaiseUnnamedError();
      };
   }

static void Run←P2616(box←v11164, formal←c24904)
   W4 box←v11164;
   word formal←c24904;
   {
   formal←c24904 = (formal←c24904 - 16);
   /* Run: */ 
SOURCE(5882, 233)
SOURCE(5910, 20)
   if ((0 != (* (( (ptr) formal←c24904)+10) ))) {
SOURCE(5930, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(5937, 29)
   if (( (int)box←v11164.f0 !=  (int)(* (( (ptr) formal←c24904)+6) ))) {
SOURCE(5966, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(5973, 32)
   if (( (int)(box←v11164.f2 - box←v11164.f0) !=  (int)1)) {
SOURCE(6005, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(6012, 32)
   if (( (int)box←v11164.f1 !=  (int)(* (( (ptr) formal←c24904)+7) ))) {
SOURCE(6044, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(6051, 32)
   if (( (int)box←v11164.f3 !=  (int)(* (( (ptr) formal←c24904)+8) ))) {
SOURCE(6083, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(6098, 17)
SOURCE(6099, 16)
   (void) Advance←P420((word) ((( (bPt) formal←c24904)+24)));
   }

static word Union←P600(formal←c0377, formal←c0378)
   word formal←c0377;
   word formal←c0378;
   {
   W8 var←c24936;
   /* declaration of a←v5364 skipped */ 
   /* declaration of b←v5392 skipped */ 
   word var←c5436;
   /* declaration of var←c22856 skipped */ 
   var←c24936.f4/* a←v5364 */  = formal←c0377;
   var←c24936.f5/* b←v5392 */  = formal←c0378;
   /* Union: */ 
SOURCE(6181, 1196)
   {
      word tmpAddr14;
      tmpAddr14 = (word) (( (ptr) &var←c24936)+6)/* var←c22856 */ ;
      (*  (ptr) tmpAddr14 ) = ( ((word)  (fPt) Runs←P2676) );
      (* (( (ptr) tmpAddr14) + 1) ) = 1;
      };
SOURCE(7349, 28)
   return((word) CreateFromRuns←P120((word) ((( (bPt) &var←c24936)+24)/* var←c22856 */ )));
   }

static void Runs←P2676(run←v11268, repeat←v11296, formal←c25000)
   word run←v11268;
   word repeat←v11296;
   word formal←c25000;
   {
   register ptr gf←c24968 =  (ptr) &globalframe;
   W7 aReader←v11500;
   W7 bReader←v11528;
   formal←c25000 = (formal←c25000 - 24);
   /* Runs: */ 
SOURCE(6238, 1094)
SOURCE(6347, 30)
   {
      word polygon←v20824;
      polygon←v20824 = (* (( (ptr) formal←c25000)+4) );
SOURCE(4643, 276)
      if ((polygon←v20824 == 0)) {
SOURCE(4665, 55)
         aReader←v11500 = (*  (W7Pt) (( (ptr) gf←c24968)+86)/* var←c22280 */  );
         }
      else {
SOURCE(4720, 199)
         aReader←v11500.f0 = (*  (ptr) polygon←v20824 );
         aReader←v11500.f1 = (* (( (ptr) polygon←v20824)+1) );
         aReader←v11500.f2 = (* (( (ptr) polygon←v20824)+3) );
         aReader←v11500.f3 = ((* (( (ptr) polygon←v20824)+2) ) - (*  (ptr) polygon←v20824 ));
         aReader←v11500.f4 = 0;
         aReader←v11500.f5 = polygon←v20824;
         aReader←v11500.f6 = polygon←v20824;
         };
      };
SOURCE(6379, 30)
   {
      word polygon←v20776;
      polygon←v20776 = (* (( (ptr) formal←c25000)+5) );
SOURCE(4643, 276)
      if ((polygon←v20776 == 0)) {
SOURCE(4665, 55)
         bReader←v11528 = (*  (W7Pt) (( (ptr) gf←c24968)+86)/* var←c22280 */  );
         }
      else {
SOURCE(4720, 199)
         bReader←v11528.f0 = (*  (ptr) polygon←v20776 );
         bReader←v11528.f1 = (* (( (ptr) polygon←v20776)+1) );
         bReader←v11528.f2 = (* (( (ptr) polygon←v20776)+3) );
         bReader←v11528.f3 = ((* (( (ptr) polygon←v20776)+2) ) - (*  (ptr) polygon←v20776 ));
         bReader←v11528.f4 = 0;
         bReader←v11528.f5 = polygon←v20776;
         bReader←v11528.f6 = polygon←v20776;
         };
      };
SOURCE(6411, 921)
   lab←L100034: ;
   if ((0 == aReader←v11500.f4) || (0 == bReader←v11528.f4)) {
      }
   else {
      goto lab←L100032;
      };
   {
      word as←v11572;
      word bs←v11600;
      word s←v11628;
      word duplicates←v11656;
      word somethingInScanline←v11684 = 0;
SOURCE(6450, 23)
      as←v11572 = aReader←v11500.f0;
SOURCE(6475, 23)
      bs←v11600 = bReader←v11528.f0;
SOURCE(6500, 24)
      s←v11628 = (MIN((int)(word), as←v11572, bs←v11600));
SOURCE(6526, 63)
      {
         word x15;
         word x16;
         duplicates←v11656 = (x15 = aReader←v11500.f3,
            x16 = bReader←v11528.f3,
            MIN( (unsigned) , x15, x16));
         };
SOURCE(6629, 532)
      lab←L100037: ;
      if (( (int)s←v11628 ==  (int)aReader←v11500.f0) || ( (int)s←v11628 ==  (int)bReader←v11528.f0)) {
         }
      else {
         goto lab←L100035;
         };
      {
         word fStart←v11728 = 2147483647;
         word fEnd←v11756;
SOURCE(6717, 44)
         if (( (int)s←v11628 ==  (int)aReader←v11500.f0)) {
SOURCE(6740, 21)
            fStart←v11728 = aReader←v11500.f1;
            };
SOURCE(6764, 57)
         if (( (int)s←v11628 ==  (int)bReader←v11528.f0)) {
SOURCE(6787, 34)
            {
               word x17;
               fStart←v11728 = (x17 = bReader←v11528.f1,
                  MIN((int)(word), fStart←v11728, x17));
               };
            };
SOURCE(6824, 13)
         fEnd←v11756 = fStart←v11728;
SOURCE(6839, 211)
         lab←L100040: ;
         if ( ( ( (int)s←v11628 ==  (int)aReader←v11500.f0) ? ( (int)aReader←v11500.f1 <=  (int)fEnd←v11756) : 0 ) ) {
SOURCE(6903, 30)
            {
               word x18;
               fEnd←v11756 = (x18 = aReader←v11500.f2,
                  MAX((int)(word), fEnd←v11756, x18));
               };
SOURCE(6935, 17)
            (void) Advance←P420((word) (&aReader←v11500));
            }
         else {
            if ( ( ( (int)s←v11628 ==  (int)bReader←v11528.f0) ? ( (int)bReader←v11528.f1 <=  (int)fEnd←v11756) : 0 ) ) {
SOURCE(7001, 30)
               {
                  word x19;
                  fEnd←v11756 = (x19 = bReader←v11528.f2,
                     MAX((int)(word), fEnd←v11756, x19));
                  };
SOURCE(7033, 17)
               (void) Advance←P420((word) (&bReader←v11528));
               }
            else {
SOURCE(7066, 4)
               goto lab←L100039;
               };
            };
         goto lab←L100040;
         lab←L100039: ;
SOURCE(7081, 80)
         if (( (int)fEnd←v11756 >  (int)fStart←v11728)) {
SOURCE(7104, 29)
            (void) ( *( (fPt) ((*  (ptr) run←v11268 ))))(s←v11628, fStart←v11728, SGNCK((fEnd←v11756 - fStart←v11728)), run←v11268);
SOURCE(7135, 26)
            somethingInScanline←v11684 = 1;
            };
         };
      goto lab←L100037;
      lab←L100035: ;
SOURCE(7173, 159)
      if ( (  ( ( (int)as←v11572 ==  (int)s←v11628) ? ( (int)bs←v11600 ==  (int)s←v11628) : 0 )  ? (duplicates←v11656 > 1) : 0 ) ) {
SOURCE(7220, 48)
         if ((0 != somethingInScanline←v11684)) {
SOURCE(7248, 20)
            (void) ( *( (fPt) ((*  (ptr) repeat←v11296 ))))(SGNCK((duplicates←v11656 - 1)), repeat←v11296);
            };
SOURCE(7270, 30)
         (void) SkipTo←P480((word) &aReader←v11500, (s←v11628 + duplicates←v11656));
SOURCE(7302, 30)
         (void) SkipTo←P480((word) &bReader←v11528, (s←v11628 + duplicates←v11656));
         };
      };
   goto lab←L100034;
   lab←L100032: ;
   }

static word Intersection←P660(formal←c0379, formal←c0380)
   word formal←c0379;
   word formal←c0380;
   {
   W8 var←c25032;
   /* declaration of a←v5496 skipped */ 
   /* declaration of b←v5524 skipped */ 
   word var←c5568;
   /* declaration of var←c23048 skipped */ 
   var←c25032.f4/* a←v5496 */  = formal←c0379;
   var←c25032.f5/* b←v5524 */  = formal←c0380;
   /* Intersection: */ 
SOURCE(7383, 1072)
   {
      word tmpAddr20;
      tmpAddr20 = (word) (( (ptr) &var←c25032)+6)/* var←c23048 */ ;
      (*  (ptr) tmpAddr20 ) = ( ((word)  (fPt) Runs←P2832) );
      (* (( (ptr) tmpAddr20) + 1) ) = 1;
      };
SOURCE(8427, 28)
   return((word) CreateFromRuns←P120((word) ((( (bPt) &var←c25032)+24)/* var←c23048 */ )));
   }

static void Runs←P2832(run←v11876, repeat←v11904, formal←c25096)
   word run←v11876;
   word repeat←v11904;
   word formal←c25096;
   {
   register ptr gf←c25064 =  (ptr) &globalframe;
   W7 aReader←v12108;
   W7 bReader←v12136;
   formal←c25096 = (formal←c25096 - 24);
   /* Runs: */ 
SOURCE(7447, 963)
SOURCE(7556, 30)
   {
      word polygon←v20728;
      polygon←v20728 = (* (( (ptr) formal←c25096)+4) );
SOURCE(4643, 276)
      if ((polygon←v20728 == 0)) {
SOURCE(4665, 55)
         aReader←v12108 = (*  (W7Pt) (( (ptr) gf←c25064)+86)/* var←c22280 */  );
         }
      else {
SOURCE(4720, 199)
         aReader←v12108.f0 = (*  (ptr) polygon←v20728 );
         aReader←v12108.f1 = (* (( (ptr) polygon←v20728)+1) );
         aReader←v12108.f2 = (* (( (ptr) polygon←v20728)+3) );
         aReader←v12108.f3 = ((* (( (ptr) polygon←v20728)+2) ) - (*  (ptr) polygon←v20728 ));
         aReader←v12108.f4 = 0;
         aReader←v12108.f5 = polygon←v20728;
         aReader←v12108.f6 = polygon←v20728;
         };
      };
SOURCE(7588, 30)
   {
      word polygon←v20680;
      polygon←v20680 = (* (( (ptr) formal←c25096)+5) );
SOURCE(4643, 276)
      if ((polygon←v20680 == 0)) {
SOURCE(4665, 55)
         bReader←v12136 = (*  (W7Pt) (( (ptr) gf←c25064)+86)/* var←c22280 */  );
         }
      else {
SOURCE(4720, 199)
         bReader←v12136.f0 = (*  (ptr) polygon←v20680 );
         bReader←v12136.f1 = (* (( (ptr) polygon←v20680)+1) );
         bReader←v12136.f2 = (* (( (ptr) polygon←v20680)+3) );
         bReader←v12136.f3 = ((* (( (ptr) polygon←v20680)+2) ) - (*  (ptr) polygon←v20680 ));
         bReader←v12136.f4 = 0;
         bReader←v12136.f5 = polygon←v20680;
         bReader←v12136.f6 = polygon←v20680;
         };
      };
SOURCE(7620, 790)
   lab←L100045: ;
SOURCE(7620, 790)
   {
      word duplicates←v12180;
      word s←v12208;
      word somethingInScanline←v12236 = 0;
SOURCE(7690, 57)
      if (( (int)aReader←v12108.f0 <  (int)bReader←v12136.f0)) {
SOURCE(7720, 27)
         (void) SkipTo←P480((word) &aReader←v12108, bReader←v12136.f0);
         };
SOURCE(7749, 21)
      if ((0 != aReader←v12108.f4)) {
SOURCE(7770, 4)
         goto lab←L100044;
         };
SOURCE(7776, 57)
      if (( (int)aReader←v12108.f0 >  (int)bReader←v12136.f0)) {
SOURCE(7806, 27)
         (void) SkipTo←P480((word) &bReader←v12136, aReader←v12108.f0);
         };
SOURCE(7835, 21)
      if ((0 != bReader←v12136.f4)) {
SOURCE(7856, 4)
         goto lab←L100044;
         };
SOURCE(7862, 13)
      s←v12208 = aReader←v12108.f0;
SOURCE(7877, 62)
      {
         word x21;
         word x22;
         word idx23;
         duplicates←v12180 = (
            idx23 = (word) ((x21 = aReader←v12108.f3,
               x22 = bReader←v12136.f3,
               MIN( (unsigned) , x21, x22)) - 1),
            SGNCK(idx23)
            );
         };
SOURCE(7941, 304)
      lab←L100048: ;
      if ( ( ( (int)s←v12208 ==  (int)aReader←v12108.f0) ? ( (int)s←v12208 ==  (int)bReader←v12136.f0) : 0 ) ) {
         }
      else {
         goto lab←L100046;
         };
      {
         word fMin←v12280;
         word fMax←v12308;
SOURCE(7982, 47)
         {
            word x24;
            word x25;
            fMin←v12280 = (x24 = aReader←v12108.f1,
               x25 = bReader←v12136.f1,
               MAX((int)(word), x24, x25));
            };
SOURCE(8031, 47)
         {
            word x26;
            word x27;
            fMax←v12308 = (x26 = aReader←v12108.f2,
               x27 = bReader←v12136.f2,
               MIN((int)(word), x26, x27));
            };
SOURCE(8080, 74)
         if (( (int)fMin←v12280 <  (int)fMax←v12308)) {
SOURCE(8101, 25)
            (void) ( *( (fPt) ((*  (ptr) run←v11876 ))))(s←v12208, fMin←v12280, SGNCK((fMax←v12308 - fMin←v12280)), run←v11876);
SOURCE(8128, 26)
            somethingInScanline←v12236 = 1;
            };
SOURCE(8157, 88)
         {
            word var←c23240;
            var←c23240 = fMax←v12308;
            if (( (int)var←c23240 ==  (int)aReader←v12108.f2)) {
SOURCE(8191, 17)
               (void) Advance←P420((word) (&aReader←v12108));
               }
            else {
               if (( (int)var←c23240 ==  (int)bReader←v12136.f2)) {
SOURCE(8228, 17)
                  (void) Advance←P420((word) (&bReader←v12136));
                  }
               else {
SOURCE(8259, 5)
                  (void) XR←RaiseUnnamedError();
                  };
               };
            };
         };
      goto lab←L100048;
      lab←L100046: ;
SOURCE(8275, 135)
      if ( ( (0 != somethingInScanline←v12236) ? (duplicates←v12180 > 0) : 0 ) ) {
SOURCE(8324, 18)
         (void) ( *( (fPt) ((*  (ptr) repeat←v11904 ))))(duplicates←v12180, repeat←v11904);
SOURCE(8344, 32)
         (void) SkipTo←P480((word) &aReader←v12108, ((s←v12208 + duplicates←v12180) + 1));
SOURCE(8378, 32)
         (void) SkipTo←P480((word) &bReader←v12136, ((s←v12208 + duplicates←v12180) + 1));
         };
      };
   goto lab←L100045;
   lab←L100044: ;
   }

static word Invert←P720(b←v5628, formal←c0381)
   word b←v5628;
   W4 formal←c0381;
   {
   W11 var←c25128;
   /* declaration of universe←v5656 skipped */ 
   word inverse←v5700;
   /* declaration of var←c23272 skipped */ 
   word c←v12352;
   /* declaration of last←v12380 skipped */ 
   W4 bb←v12408;
   word sMin←v12436;
   word fMin←v12464;
   word sMax←v12492;
   word fMax←v12520;
   word s←v12576;
   word f←v12604;
   (*  (W4Pt) (( (ptr) &var←c25128)+4)/* universe←v5656 */  ) = formal←c0381;
   /* Invert: */ 
SOURCE(8461, 1154)
   {
      word tmpAddr28;
      tmpAddr28 = (word) (( (ptr) &var←c25128)+8)/* var←c23272 */ ;
      (*  (ptr) tmpAddr28 ) = ( ((word)  (fPt) Emit←P2988) );
      (* (( (ptr) tmpAddr28) + 1) ) = 1;
      };
SOURCE(8461, 1154)
   inverse←v5700 = 0;
SOURCE(8536, 3)
   c←v12352 = (word) GetScratch←P2040();
SOURCE(8570, 6)
   (* (( (ptr) &var←c25128)+10)/* last←v12380 */  ) = c←v12352;
SOURCE(8596, 27)
   (void) BoundingBox←P1380((word) &bb←v12408, b←v5628);
SOURCE(8625, 45)
   {
      word x29;
      word x30;
      sMin←v12436 = (x29 = (* (( (ptr) &var←c25128)+4) ),
         x30 = bb←v12408.f0,
         MIN((int)(word), x29, x30));
      };
SOURCE(8672, 45)
   {
      word x31;
      word x32;
      fMin←v12464 = (x31 = (* (( (ptr) &var←c25128)+5) ),
         x32 = bb←v12408.f1,
         MIN((int)(word), x31, x32));
      };
SOURCE(8719, 45)
   {
      word x33;
      word x34;
      sMax←v12492 = (x33 = (* (( (ptr) &var←c25128)+6) ),
         x34 = bb←v12408.f2,
         MAX((int)(word), x33, x34));
      };
SOURCE(8766, 45)
   {
      word x35;
      word x36;
      fMax←v12520 = (x35 = (* (( (ptr) &var←c25128)+7) ),
         x36 = bb←v12408.f3,
         MAX((int)(word), x35, x36));
      };
SOURCE(9113, 17)
   s←v12576 = sMin←v12436;
SOURCE(9132, 17)
   f←v12604 = fMax←v12520;
SOURCE(9151, 292)
   {
      register word p←v12960;
      p←v12960 = b←v5628;
      lab←L100052: ;
      if ((p←v12960 != 0)) {
         }
      else {
         goto lab←L100049;
         };
      {
         W4 r←v13088;
SOURCE(9200, 19)
         r←v13088 = (*  (W4Pt) p←v12960 );
SOURCE(9221, 134)
         if (( (int)r←v13088.f0 >  (int)sMin←v12436) || (p←v12960 == b←v5628)) {
SOURCE(9253, 22)
            (void) Emit←P2988(sMin←v12436, f←v12604, s←v12576, fMax←v12520, (word) (( (bPt) &var←c25128)+32)/* var←c23272 */ );
SOURCE(9277, 8)
            f←v12604 = fMin←v12464;
SOURCE(9287, 8)
            sMin←v12436 = s←v12576;
SOURCE(9297, 11)
            s←v12576 = r←v13088.f0;
SOURCE(9310, 22)
            (void) Emit←P2988(sMin←v12436, f←v12604, s←v12576, fMax←v12520, (word) (( (bPt) &var←c25128)+32)/* var←c23272 */ );
SOURCE(9334, 8)
            sMin←v12436 = s←v12576;
SOURCE(9344, 11)
            s←v12576 = r←v13088.f2;
            };
SOURCE(9360, 38)
         if (( (int)sMin←v12436 !=  (int)r←v13088.f0) || ( (int)s←v12576 !=  (int)r←v13088.f2)) {
SOURCE(9398, 5)
            (void) XR←RaiseUnnamedError();
            };
SOURCE(9405, 25)
         (void) Emit←P2988(sMin←v12436, f←v12604, s←v12576, r←v13088.f1, (word) (( (bPt) &var←c25128)+32)/* var←c23272 */ );
SOURCE(9432, 11)
         f←v12604 = r←v13088.f3;
         };
      p←v12960 = (* (( (ptr) p←v12960)+4) );
      goto lab←L100052;
      lab←L100049: ;
      };
SOURCE(9454, 22)
   (void) Emit←P2988(sMin←v12436, f←v12604, s←v12576, fMax←v12520, (word) (( (bPt) &var←c25128)+32)/* var←c23272 */ );
SOURCE(9478, 25)
   (void) Emit←P2988(s←v12576, fMin←v12464, sMax←v12492, fMax←v12520, (word) (( (bPt) &var←c25128)+32)/* var←c23272 */ );
SOURCE(9505, 91)
   if ((c←v12352 == (* (( (ptr) &var←c25128)+10)/* last←v12380 */  ))) {
SOURCE(9522, 19)
      inverse←v5700 = 0;
      }
   else {
SOURCE(9543, 16)
      inverse←v5700 = (* (( (ptr) c←v12352)+4) );
SOURCE(9561, 18)
      (* (( (ptr) c←v12352)+4) ) = (* (( (ptr) (* (( (ptr) &var←c25128)+10)/* last←v12380 */  ))+4) );
SOURCE(9581, 15)
      (* (( (ptr) (* (( (ptr) &var←c25128)+10)/* last←v12380 */  ))+4) ) = 0;
      };
SOURCE(9601, 14)
   (void) FreeScratch←P2100(c←v12352);
SOURCE(8461, 1154)
   return(inverse←v5700);
   }

static void Emit←P2988(s0←v12848, f0←v12876, s1←v12904, f1←v12932, formal←c25160)
   word s0←v12848;
   word f0←v12876;
   word s1←v12904;
   word f1←v12932;
   word formal←c25160;
   {
   formal←c25160 = (formal←c25160 - 32);
   /* Emit: */ 
SOURCE(8813, 292)
SOURCE(8854, 28)
   {
      word x37;
      s0←v12848 = (x37 = (* (( (ptr) formal←c25160)+4) ),
         MAX((int)(word), s0←v12848, x37));
      };
SOURCE(8884, 28)
   {
      word x38;
      s1←v12904 = (x38 = (* (( (ptr) formal←c25160)+6) ),
         MIN((int)(word), s1←v12904, x38));
      };
SOURCE(8914, 28)
   {
      word x39;
      f0←v12876 = (x39 = (* (( (ptr) formal←c25160)+5) ),
         MAX((int)(word), f0←v12876, x39));
      };
SOURCE(8944, 28)
   {
      word x40;
      f1←v12932 = (x40 = (* (( (ptr) formal←c25160)+7) ),
         MIN((int)(word), f1←v12932, x40));
      };
SOURCE(8974, 131)
   if ( ( ( (int)s0←v12848 <  (int)s1←v12904) ? ( (int)f0←v12876 <  (int)f1←v12932) : 0 ) ) {
SOURCE(9004, 48)
      if (((* (( (ptr) (* (( (ptr) formal←c25160)+10) ))+4) ) == 0)) {
SOURCE(9028, 24)
         {
            word var←c23304;
            var←c23304 = (word) GetScratch←P2040();
            (* (( (ptr) (* (( (ptr) formal←c25160)+10) ))+4) ) = var←c23304;
            };
         };
SOURCE(9054, 16)
      (* (( (ptr) formal←c25160)+10) ) = (* (( (ptr) (* (( (ptr) formal←c25160)+10) ))+4) );
SOURCE(9072, 33)
      (*  (ptr) (* (( (ptr) formal←c25160)+10) ) ) = s0←v12848;
      (* (( (ptr) (* (( (ptr) formal←c25160)+10) ))+1) ) = f0←v12876;
      (* (( (ptr) (* (( (ptr) formal←c25160)+10) ))+2) ) = s1←v12904;
      (* (( (ptr) (* (( (ptr) formal←c25160)+10) ))+3) ) = f1←v12932;
      };
   }

static word Difference←P780(a←v5760, b←v5788)
   word a←v5760;
   word b←v5788;
   {
   word diff←v5832;
   W4 bb←v13132;
   word bInverse←v13160;
   /* Difference: */ 
SOURCE(9621, 248)
SOURCE(9621, 248)
   diff←v5832 = 0;
SOURCE(9689, 27)
   (void) BoundingBox←P1380((word) &bb←v13132, a←v5760);
SOURCE(9718, 33)
   bInverse←v13160 = (word) Invert←P720(b←v5788, bb←v13132);
SOURCE(9753, 116)
   if ( ( (a←v5760 != 0) ? ((* (( (ptr) a←v5760)+4) ) == 0) : 0 ) ) {
SOURCE(9788, 16)
      diff←v5832 = bInverse←v13160;
      }
   else {
SOURCE(9813, 32)
      diff←v5832 = (word) Intersection←P660(a←v5760, bInverse←v13160);
SOURCE(9847, 22)
      (void) FreeScratch←P2100(bInverse←v13160);
      };
SOURCE(9621, 248)
   return(diff←v5832);
   }

static void Shift←P840(polygon←v5892, sShift←v5920, fShift←v5948)
   word polygon←v5892;
   word sShift←v5920;
   word fShift←v5948;
   {
   W2 shift←v13204;
   /* Shift: */ 
SOURCE(9876, 272)
SOURCE(9943, 38)
   shift←v13204.f0 = sShift←v5920;
   shift←v13204.f1 = fShift←v5948;
SOURCE(9983, 165)
   lab←L100055: ;
   if ((polygon←v5892 != 0)) {
      }
   else {
      goto lab←L100053;
      };
SOURCE(10006, 58)
   {
      W2 var←c23368;
      W2 v1←v21048;
      v1←v21048 = (*  (W2Pt) polygon←v5892 );
      var←c23368.f0 = (v1←v21048.f0 + shift←v13204.f0);
      var←c23368.f1 = (v1←v21048.f1 + shift←v13204.f1);
      (*  (W2Pt) polygon←v5892 ) = var←c23368;
      };
SOURCE(10066, 58)
   {
      W2 var←c23432;
      W2 v1←v21000;
      v1←v21000 = (*  (W2Pt) (( (ptr) polygon←v5892)+2) );
      var←c23432.f0 = (v1←v21000.f0 + shift←v13204.f0);
      var←c23432.f1 = (v1←v21000.f1 + shift←v13204.f1);
      (*  (W2Pt) (( (ptr) polygon←v5892)+2) ) = var←c23432;
      };
SOURCE(10126, 22)
   polygon←v5892 = (* (( (ptr) polygon←v5892)+4) );
   goto lab←L100055;
   lab←L100053: ;
   }

static word FullyDestructiveUnion←P900(a←v6008, b←v6036)
   word a←v6008;
   word b←v6036;
   {
   word u←v6080;
   /* FullyDestructiveUnion: */ 
SOURCE(10163, 116)
SOURCE(10163, 116)
   u←v6080 = 0;
SOURCE(10232, 15)
   u←v6080 = (word) Union←P600(a←v6008, b←v6036);
SOURCE(10249, 14)
   (void) FreeScratch←P2100(a←v6008);
SOURCE(10265, 14)
   (void) FreeScratch←P2100(b←v6036);
SOURCE(10163, 116)
   return(u←v6080);
   }

static word DestructiveUnion←P960(a←v6140, b←v6168)
   word a←v6140;
   word b←v6168;
   {
   word u←v6212;
   /* DestructiveUnion: */ 
SOURCE(10285, 102)
SOURCE(10285, 102)
   u←v6212 = 0;
SOURCE(10356, 15)
   u←v6212 = (word) Union←P600(a←v6140, b←v6168);
SOURCE(10373, 14)
   (void) FreeScratch←P2100(a←v6140);
SOURCE(10285, 102)
   return(u←v6212);
   }

static word DestructiveIntersection←P1020(a←v6272, b←v6300)
   word a←v6272;
   word b←v6300;
   {
   word i←v6344;
   /* DestructiveIntersection: */ 
SOURCE(10393, 228)
SOURCE(10393, 228)
   i←v6344 = 0;
SOURCE(10477, 39)
   if ((a←v6272 == 0) || (b←v6300 == 0)) {
SOURCE(10504, 12)
      return(0);
      };
SOURCE(10518, 103)
   if (((* (( (ptr) b←v6300)+4) ) == 0)) {
SOURCE(10541, 32)
      i←v6344 = (word) DestructiveClip←P1080(a←v6272, (*  (W4Pt) b←v6300 ));
      }
   else {
SOURCE(10582, 22)
      i←v6344 = (word) Intersection←P660(a←v6272, b←v6300);
SOURCE(10606, 15)
      (void) FreeScratch←P2100(a←v6272);
      };
SOURCE(10393, 228)
   return(i←v6344);
   }

static word DestructiveClip←P1080(a←v6404, b←v6432)
   word a←v6404;
   W4 b←v6432;
   {
   word i←v6476;
   word last←v13248 = 0;
   word junk←v13276 = 0;
   /* DestructiveClip: */ 
SOURCE(10628, 589)
SOURCE(10628, 589)
   i←v6476 = 0;
SOURCE(10754, 396)
   lab←L100060: ;
   if ((a←v6404 != 0)) {
      }
   else {
      goto lab←L100058;
      };
   {
      word p←v13320;
      word sMin←v13348;
      word fMin←v13376;
      word sMax←v13404;
      word fMax←v13432;
SOURCE(10771, 14)
      p←v13320 = a←v6404;
SOURCE(10787, 43)
      {
         word x41;
         word x42;
         sMin←v13348 = (x41 = (*  (ptr) p←v13320 ),
            x42 = b←v6432.f0,
            MAX((int)(word), x41, x42));
         };
SOURCE(10832, 43)
      {
         word x43;
         word x44;
         fMin←v13376 = (x43 = (* (( (ptr) p←v13320)+1) ),
            x44 = b←v6432.f1,
            MAX((int)(word), x43, x44));
         };
SOURCE(10877, 43)
      {
         word x45;
         word x46;
         sMax←v13404 = (x45 = (* (( (ptr) p←v13320)+2) ),
            x46 = b←v6432.f2,
            MIN((int)(word), x45, x46));
         };
SOURCE(10922, 43)
      {
         word x47;
         word x48;
         fMax←v13432 = (x47 = (* (( (ptr) p←v13320)+3) ),
            x48 = b←v6432.f3,
            MIN((int)(word), x47, x48));
         };
SOURCE(10967, 10)
      a←v6404 = (* (( (ptr) a←v6404)+4) );
SOURCE(10979, 171)
      if (( (int)sMax←v13404 <=  (int)sMin←v13348) || ( (int)fMax←v13432 <=  (int)fMin←v13376)) {
SOURCE(11017, 13)
         (* (( (ptr) p←v13320)+4) ) = junk←v13276;
SOURCE(11032, 8)
         junk←v13276 = p←v13320;
         }
      else {
SOURCE(11049, 38)
         (*  (ptr) p←v13320 ) = sMin←v13348;
         (* (( (ptr) p←v13320)+1) ) = fMin←v13376;
         (* (( (ptr) p←v13320)+2) ) = sMax←v13404;
         (* (( (ptr) p←v13320)+3) ) = fMax←v13432;
SOURCE(11089, 61)
         if ((last←v13248 == 0)) {
SOURCE(11108, 18)
            i←v6476 = p←v13320;
            last←v13248 = p←v13320;
            }
         else {
SOURCE(11127, 13)
            (* (( (ptr) last←v13248)+4) ) = p←v13320;
SOURCE(11142, 8)
            last←v13248 = p←v13320;
            };
         };
      };
   goto lab←L100060;
   lab←L100058: ;
SOURCE(11164, 34)
   if ((last←v13248 != 0)) {
SOURCE(11183, 15)
      (* (( (ptr) last←v13248)+4) ) = 0;
      };
SOURCE(11200, 17)
   (void) FreeScratch←P2100(junk←v13276);
SOURCE(10628, 589)
   return(i←v6476);
   }

static word DestructiveDifference←P1140(a←v6536, b←v6564)
   word a←v6536;
   word b←v6564;
   {
   word d←v6608;
   /* DestructiveDifference: */ 
SOURCE(11223, 112)
SOURCE(11223, 112)
   d←v6608 = 0;
SOURCE(11299, 20)
   d←v6608 = (word) Difference←P780(a←v6536, b←v6564);
SOURCE(11321, 14)
   (void) FreeScratch←P2100(a←v6536);
SOURCE(11223, 112)
   return(d←v6608);
   }

static word SplitOffSecondHalf←P1200(a←v6668)
   word a←v6668;
   {
   word r←v6796;
   word b←v13476;
   word n←v13504 = 0;
   /* SplitOffSecondHalf: */ 
SOURCE(11341, 268)
SOURCE(11341, 268)
   r←v6796 = 0;
SOURCE(11418, 3)
   b←v13476 = a←v6668;
SOURCE(11453, 93)
   lab←L100063: ;
   if ((a←v6668 != 0)) {
      }
   else {
      goto lab←L100061;
      };
SOURCE(11468, 10)
   a←v6668 = (* (( (ptr) a←v6668)+4) );
SOURCE(11480, 9)
   n←v13504 = (n←v13504 + 1);
SOURCE(11491, 10)
   b←v13476 = (* (( (ptr) b←v13476)+4) );
SOURCE(11503, 16)
   if ((a←v6668 == 0)) {
SOURCE(11519, 4)
      goto lab←L100062;
      };
SOURCE(11525, 10)
   a←v6668 = (* (( (ptr) a←v6668)+4) );
SOURCE(11537, 9)
   n←v13504 = (n←v13504 + 1);
   goto lab←L100063;
   lab←L100061: ;
   lab←L100062: ;
SOURCE(11557, 52)
   if (( (int)n←v13504 <  (int)8)) {
SOURCE(11571, 13)
      r←v6796 = 0;
      }
   else {
SOURCE(11585, 10)
      r←v6796 = (* (( (ptr) b←v13476)+4) );
SOURCE(11597, 12)
      (* (( (ptr) b←v13476)+4) ) = 0;
      };
SOURCE(11341, 268)
   return(r←v6796);
   }

static word Canonicalize←P1260(rectangleList←v6940)
   word rectangleList←v6940;
   {
   word var←c7068;
   word b←v13632;
   word a←v13660;
   /* Canonicalize: */ 
SOURCE(11616, 418)
SOURCE(11696, 3)
   b←v13632 = (word) SplitOffSecondHalf←P1200(rectangleList←v6940);
SOURCE(11751, 3)
   a←v13660 = rectangleList←v6940;
SOURCE(11786, 248)
   if ((b←v13632 == 0)) {
SOURCE(11804, 137)
      lab←L100066: ;
      if ((a←v13660 != 0)) {
         }
      else {
         goto lab←L100064;
         };
      {
         word a1←v13872;
         word var←c23528;
         W4 box←v20872;
SOURCE(11821, 4)
         a1←v13872 = a←v13660;
SOURCE(11845, 11)
         a←v13660 = (* (( (ptr) a1←v13872)+4) );
SOURCE(11858, 13)
         (* (( (ptr) a1←v13872)+4) ) = 0;
SOURCE(11873, 68)
         box←v20872 = (*  (W4Pt) a1←v13872 );
         if (( (int)box←v20872.f0 <  (int)box←v20872.f2)) {
            var←c23528 =  (unsigned) ( (int)box←v20872.f1 <  (int)box←v20872.f3);
            }
         else {
            var←c23528 =  (unsigned) 0;
            };
         if ((0 != var←c23528)) {
SOURCE(11909, 32)
            b←v13632 = (word) FullyDestructiveUnion←P900(b←v13632, a1←v13872);
            };
         };
      goto lab←L100066;
      lab←L100064: ;
SOURCE(11952, 11)
      return(b←v13632);
      }
   else {
SOURCE(11970, 64)
      {
         word var←c23592;
         word var←c23624;
         var←c23592 = (word) Canonicalize←P1260(a←v13660);
         var←c23624 = (word) Canonicalize←P1260(b←v13632);
         return((word) FullyDestructiveUnion←P900(var←c23592, var←c23624));
         };
      };
   }

static word CreateFromBoxes←P1320(boxes←v7128)
   word boxes←v7128;
   {
   W9 var←c25192;
   word var←c7172;
   /* declaration of var←c23656 skipped */ 
   word head←v14000;
   /* declaration of last←v14028 skipped */ 
   /* declaration of new←v14056 skipped */ 
   /* CreateFromBoxes: */ 
SOURCE(12040, 548)
   {
      word tmpAddr49;
      tmpAddr49 = (word) (( (ptr) &var←c25192)+4)/* var←c23656 */ ;
      (*  (ptr) tmpAddr49 ) = ( ((word)  (fPt) AddBox←P3240) );
      (* (( (ptr) tmpAddr49) + 1) ) = 1;
      };
SOURCE(12116, 6)
   head←v14000 = (word) GetScratch←P2040();
SOURCE(12153, 6)
   (* (( (ptr) &var←c25192)+6)/* last←v14028 */  ) = head←v14000;
SOURCE(12182, 5)
   (* (( (ptr) &var←c25192)+7)/* new←v14056 */  ) = 0;
SOURCE(12365, 13)
   (void) ( *( (fPt) ((*  (ptr) boxes←v7128 ))))((word) ((( (bPt) &var←c25192)+16)/* var←c23656 */ ), boxes←v7128);
SOURCE(12380, 79)
   {
      word t←v14440;
SOURCE(12381, 3)
      t←v14440 = (* (( (ptr) (* (( (ptr) &var←c25192)+6)/* last←v14028 */  ))+4) );
SOURCE(12412, 15)
      (* (( (ptr) (* (( (ptr) &var←c25192)+6)/* last←v14028 */  ))+4) ) = 0;
SOURCE(12429, 15)
      (* (( (ptr) &var←c25192)+7)/* new←v14056 */  ) = (* (( (ptr) head←v14000)+4) );
SOURCE(12446, 13)
      (* (( (ptr) head←v14000)+4) ) = t←v14440;
      };
SOURCE(12462, 17)
   (void) FreeScratch←P2100(head←v14000);
SOURCE(12481, 17)
   (* (( (ptr) &var←c25192)+6)/* last←v14028 */  ) = 0;
   head←v14000 = 0;
SOURCE(12500, 50)
SOURCE(12500, 50)
   {
      /* declaration of var←c01 skipped */ 
      {
         word var←c02;
         var←c02 = (word) XR←Enable(( ((word)  (fPt) NoName←Q5592) ), ( ((word)  (fPt) NoName←Q5652) ), (word) &var←c25192);
         if ((var←c02 == 2)) {
            goto lab←L100069;
            };
         };
      return((* (( (ptr) &var←c25192)+8)/* var←c01 */  ));
      };
   lab←L100069: ;
SOURCE(12562, 26)
   return((word) Canonicalize←P1260((* ((( (ptr) &var←c25192)+7)/* new←v14056 */ ) )));
   }

static word NoName←Q5592(formal←c0351)
   word formal←c0351;
   {
SOURCE(12500, 50)
   (* (( (ptr) formal←c0351)+8) ) = (word) Validate←P60((* ((( (ptr) formal←c0351)+7)) ));
   return(0);
   }

static void AddBox←P3240(box←v14412, formal←c25224)
   W4 box←v14412;
   word formal←c25224;
   {
   formal←c25224 = (formal←c25224 - 16);
   /* AddBox: */ 
SOURCE(12209, 148)
SOURCE(12240, 117)
   if ( ( ( (int)box←v14412.f0 <  (int)box←v14412.f2) ? ( (int)box←v14412.f1 <  (int)box←v14412.f3) : 0 ) ) {
SOURCE(12273, 48)
      if (((* (( (ptr) (* (( (ptr) formal←c25224)+6) ))+4) ) == 0)) {
SOURCE(12297, 24)
         {
            word var←c23752;
            var←c23752 = (word) GetScratch←P2040();
            (* (( (ptr) (* (( (ptr) formal←c25224)+6) ))+4) ) = var←c23752;
            };
         };
SOURCE(12323, 16)
      (* (( (ptr) formal←c25224)+6) ) = (* (( (ptr) (* (( (ptr) formal←c25224)+6) ))+4) );
SOURCE(12341, 16)
      (*  (W4Pt) (* (( (ptr) formal←c25224)+6) ) ) = box←v14412;
      };
   }

static void BoundingBox←P1380(formal←c0242, polygon←v7232)
   word formal←c0242;
   word polygon←v7232;
   {
   register ptr gf←c25256 =  (ptr) &globalframe;
   W4 var←c7276;
   /* BoundingBox: */ 
SOURCE(12594, 715)
SOURCE(12659, 598)
   if ((polygon←v7232 != 0)) {
SOURCE(12681, 578)
      {
         word bmins←v14568;
         word bminf←v14596;
         word bmaxs←v14624;
         word bmaxf←v14652;
SOURCE(12683, 36)
         bmins←v14568 = (*  (ptr) polygon←v7232 );
SOURCE(12721, 36)
         bminf←v14596 = (* (( (ptr) polygon←v7232)+1) );
SOURCE(12759, 36)
         bmaxs←v14624 = (* (( (ptr) polygon←v7232)+2) );
SOURCE(12797, 36)
         bmaxf←v14652 = (* (( (ptr) polygon←v7232)+3) );
SOURCE(12835, 348)
         {
            register word each←v14696;
            each←v14696 = (* (( (ptr) polygon←v7232)+4) );
            lab←L100076: ;
            if ((each←v14696 != 0)) {
               }
            else {
               goto lab←L100073;
               };
            {
               word emins←v14740;
               word eminf←v14768;
               word emaxs←v14796;
               word emaxf←v14824;
SOURCE(12897, 33)
               emins←v14740 = (*  (ptr) each←v14696 );
SOURCE(12932, 33)
               eminf←v14768 = (* (( (ptr) each←v14696)+1) );
SOURCE(12967, 33)
               emaxs←v14796 = (* (( (ptr) each←v14696)+2) );
SOURCE(13002, 33)
               emaxf←v14824 = (* (( (ptr) each←v14696)+3) );
SOURCE(13037, 35)
               if (( (int)emins←v14740 <  (int)bmins←v14568)) {
SOURCE(13059, 13)
                  bmins←v14568 = emins←v14740;
                  };
SOURCE(13074, 35)
               if (( (int)eminf←v14768 <  (int)bminf←v14596)) {
SOURCE(13096, 13)
                  bminf←v14596 = eminf←v14768;
                  };
SOURCE(13111, 35)
               if (( (int)emaxs←v14796 >  (int)bmaxs←v14624)) {
SOURCE(13133, 13)
                  bmaxs←v14624 = emaxs←v14796;
                  };
SOURCE(13148, 35)
               if (( (int)emaxf←v14824 >  (int)bmaxf←v14652)) {
SOURCE(13170, 13)
                  bmaxf←v14652 = emaxf←v14824;
                  };
               };
            each←v14696 = (* (( (ptr) each←v14696)+4) );
            goto lab←L100076;
            lab←L100073: ;
            };
SOURCE(13194, 63)
         var←c7276.f0 = bmins←v14568;
         var←c7276.f1 = bminf←v14596;
         var←c7276.f2 = bmaxs←v14624;
         var←c7276.f3 = bmaxf←v14652;
         goto lab←L100072;
         };
      };
SOURCE(13262, 47)
   var←c7276 = (*  (W4Pt) (( (ptr) gf←c25256)+93)/* var←c22344 */  );
   /* removed tail goto */ 
   lab←L100072: ;
   (*  (W4Pt) formal←c0242 ) = var←c7276;
   return;
   }

static word CountBoxes←P1440(polygon←v7336)
   word polygon←v7336;
   {
   word boxes←v7380;
   /* CountBoxes: */ 
SOURCE(13315, 136)
SOURCE(13315, 136)
   boxes←v7380 = 0;
SOURCE(13387, 64)
   lab←L100079: ;
   if ((polygon←v7336 != 0)) {
      }
   else {
      goto lab←L100077;
      };
SOURCE(13410, 17)
   boxes←v7380 = (boxes←v7380 + 1);
SOURCE(13429, 22)
   polygon←v7336 = (* (( (ptr) polygon←v7336)+4) );
   goto lab←L100079;
   lab←L100077: ;
SOURCE(13315, 136)
   return(boxes←v7380);
   }

static word CountRuns←P1500(polygon←v7440)
   word polygon←v7440;
   {
   word runs←v7484;
   /* CountRuns: */ 
SOURCE(13466, 175)
SOURCE(13466, 175)
   runs←v7484 = 0;
SOURCE(13536, 105)
   lab←L100082: ;
   if ((polygon←v7440 != 0)) {
      }
   else {
      goto lab←L100080;
      };
SOURCE(13559, 58)
   {
      word idx50;
      runs←v7484 = (runs←v7484 + (
         idx50 = (word) ((* (( (ptr) polygon←v7440)+2) ) - (*  (ptr) polygon←v7440 )),
         SGNCK(idx50)
         ));
      };
SOURCE(13619, 22)
   polygon←v7440 = (* (( (ptr) polygon←v7440)+4) );
   goto lab←L100082;
   lab←L100080: ;
SOURCE(13466, 175)
   return(runs←v7484);
   }

static word TestCreate←P1560(formal←c0382)
   word formal←c0382;
   {
   W7 var←c25288;
   /* declaration of polygon←v7544 skipped */ 
   word var←c7588;
   /* declaration of var←c23848 skipped */ 
   var←c25288.f4/* polygon←v7544 */  = formal←c0382;
   /* TestCreate: */ 
SOURCE(13656, 347)
   {
      word tmpAddr51;
      tmpAddr51 = (word) (( (ptr) &var←c25288)+5)/* var←c23848 */ ;
      (*  (ptr) tmpAddr51 ) = ( ((word)  (fPt) Runs←P3492) );
      (* (( (ptr) tmpAddr51) + 1) ) = 1;
      };
SOURCE(13973, 30)
   return((word) CreateFromRuns←P120((word) ((( (bPt) &var←c25288)+20)/* var←c23848 */ )));
   }

static void Runs←P3492(formal←c0383, repeat←v14972, formal←c25352)
   word formal←c0383;
   word repeat←v14972;
   word formal←c25352;
   {
   W7 var←c25320;
   /* declaration of run←v14944 skipped */ 
   /* declaration of var←c23912 skipped */ 
   formal←c25352 = (formal←c25352 - 20);
   var←c25320.f4/* run←v14944 */  = formal←c0383;
   var←c25320.f0 = formal←c25352;
   /* Runs: */ 
SOURCE(13714, 254)
   {
      word tmpAddr52;
      tmpAddr52 = (word) (( (ptr) &var←c25320)+5)/* var←c23912 */ ;
      (*  (ptr) tmpAddr52 ) = ( ((word)  (fPt) boxAction←P3552) );
      (* (( (ptr) tmpAddr52) + 1) ) = 1;
      };
SOURCE(13913, 55)
   (void) Map←P1620((* (( (ptr) formal←c25352)+4) ), (word) (( (bPt) &var←c25320)+20)/* var←c23912 */ , 1);
   }

static void boxAction←P3552(box←v20472, formal←c25384)
   W4 box←v20472;
   word formal←c25384;
   {
   formal←c25384 = (formal←c25384 - 20);
   /* boxAction: */ 
SOURCE(13816, 94)
SOURCE(13844, 66)
   {
      word pd53;
      word idx54;
      pd53 = (* (( (ptr) formal←c25384)+4) );
      (void) ( *( (fPt) ((*  (ptr) pd53 ))))(box←v20472.f0, box←v20472.f1, (
            idx54 = (word) (box←v20472.f3 - box←v20472.f1),
            SGNCK(idx54)
            ), pd53);
      };
   }

static void Map←P1620(polygon←v7648, boxAction←v7676, runs←v7704)
   word polygon←v7648;
   word boxAction←v7676;
   word runs←v7704;
   {
   /* Map: */ 
SOURCE(14007, 604)
SOURCE(14092, 519)
   if ((0 != runs←v7704)) {
SOURCE(14107, 397)
      lab←L100085: ;
      if ((polygon←v7648 != 0)) {
         }
      else {
         goto lab←L100083;
         };
      {
         word sMinRow←v15220;
         word sMaxRow←v15248;
SOURCE(14130, 38)
         sMinRow←v15220 = (*  (ptr) polygon←v7648 );
SOURCE(14170, 38)
         sMaxRow←v15248 = (* (( (ptr) polygon←v7648)+2) );
SOURCE(14210, 194)
         {
            register word s←v15292;
            s←v15292 = sMinRow←v15220;
            if (( (int)s←v15292 >=  (int)sMaxRow←v15248)) {
               goto lab←L100086;
               };
            lab←L100089: ;
SOURCE(14250, 154)
            {
               register word t←v15336;
               t←v15336 = polygon←v7648;
               lab←L100093: ;
               if ( ( (t←v15336 != 0) ? ( (int)(*  (ptr) t←v15336 ) ==  (int)sMinRow←v15220) : 0 ) ) {
                  }
               else {
                  goto lab←L100090;
                  };
SOURCE(14329, 75)
               {
                  W4 var←c23944;
                  var←c23944.f0 = s←v15292;
                  var←c23944.f1 = (* (( (ptr) t←v15336)+1) );
                  var←c23944.f2 = (s←v15292 + 1);
                  var←c23944.f3 = (* (( (ptr) t←v15336)+3) );
                  (void) ( *( (fPt) ((*  (ptr) boxAction←v7676 ))))(var←c23944, boxAction←v7676);
                  };
               t←v15336 = (* (( (ptr) t←v15336)+4) );
               goto lab←L100093;
               lab←L100090: ;
               };
            s←v15292 = (s←v15292 + 1);
            if (( (int)s←v15292 <  (int)sMaxRow←v15248)) {
               goto lab←L100089;
               };
            lab←L100086: ;
            };
SOURCE(14424, 80)
         lab←L100096: ;
         if ( ( (polygon←v7648 != 0) ? ( (int)(*  (ptr) polygon←v7648 ) ==  (int)sMinRow←v15220) : 0 ) ) {
            }
         else {
            goto lab←L100094;
            };
SOURCE(14482, 22)
         polygon←v7648 = (* (( (ptr) polygon←v7648)+4) );
         goto lab←L100096;
         lab←L100094: ;
         };
      goto lab←L100085;
      lab←L100083: ;
      }
   else {
SOURCE(14533, 78)
      {
         register word each←v15380;
         each←v15380 = polygon←v7648;
         lab←L100100: ;
         if ((each←v15380 != 0)) {
            }
         else {
            goto lab←L100097;
            };
SOURCE(14590, 21)
         (void) ( *( (fPt) ((*  (ptr) boxAction←v7676 ))))((*  (W4Pt) (each←v15380) ), boxAction←v7676);
         each←v15380 = (* (( (ptr) each←v15380)+4) );
         goto lab←L100100;
         lab←L100097: ;
         };
      };
   }

static void Clip←P1680(polygon←v7764, box←v7792, boxAction←v7820, runs←v7848)
   word polygon←v7764;
   W4 box←v7792;
   word boxAction←v7820;
   word runs←v7848;
   {
   /* Clip: */ 
SOURCE(14629, 1057)
SOURCE(14720, 966)
   if ((0 != runs←v7848)) {
SOURCE(14733, 676)
      {
         word row←v15424;
SOURCE(14735, 22)
         row←v15424 = polygon←v7764;
SOURCE(14759, 639)
         lab←L100103: ;
         if ((row←v15424 != 0)) {
            }
         else {
            goto lab←L100101;
            };
         {
            word smin←v15468;
            word smax←v15496;
SOURCE(14776, 31)
            smin←v15468 = (*  (ptr) row←v15424 );
SOURCE(14809, 31)
            smax←v15496 = (* (( (ptr) row←v15424)+2) );
SOURCE(14842, 470)
            if (( (int)smax←v15496 <=  (int)box←v7792.f0)) {
               }
            else {
SOURCE(14876, 436)
               if (( (int)smin←v15468 >=  (int)box←v7792.f2)) {
SOURCE(14900, 10)
                  goto lab←L100102;
                  }
               else {
SOURCE(14910, 402)
                  {
                     register word s←v15540;
                     register word noName←c23976;
                     {
                        word x55;
                        s←v15540 = (x55 = box←v7792.f0,
                           MAX((int)(word), smin←v15468, x55));
                        };
                     {
                        word x56;
                        noName←c23976 = (x56 = box←v7792.f2,
                           MIN((int)(word), smax←v15496, x56));
                        };
                     if (( (int)s←v15540 >=  (int)noName←c23976)) {
                        goto lab←L100104;
                        };
                     lab←L100107: ;
                     {
                        W4 run←v15584;
SOURCE(14976, 54)
                        run←v15584.f0 = s←v15540;
                        run←v15584.f1 = 0;
                        run←v15584.f2 = (s←v15540 + 1);
                        run←v15584.f3 = 0;
SOURCE(15032, 280)
                        {
                           register word t←v15628;
                           t←v15628 = row←v15424;
                           lab←L100111: ;
                           if ( ( (t←v15628 != 0) ? ( (int)(*  (ptr) t←v15628 ) ==  (int)smin←v15468) : 0 ) ) {
/*1*/   }
                           else {
/*1*/   goto lab←L100108;
/*1*/   };
                           {
/*1*/   word fmin←v15672;
/*1*/   word fmax←v15700;
SOURCE(15098, 29)
/*1*/   fmin←v15672 = (* (( (ptr) t←v15628)+1) );
SOURCE(15129, 29)
/*1*/   fmax←v15700 = (* (( (ptr) t←v15628)+3) );
SOURCE(15160, 152)
/*1*/   if (( (int)fmax←v15700 <=  (int)box←v7792.f1)) {
/*1*/      }
/*1*/   else {
SOURCE(15194, 118)
/*1*/      if (( (int)fmin←v15672 >=  (int)box←v7792.f3)) {
SOURCE(15218, 10)
/*1*/         goto lab←L100109;
/*1*/         }
/*1*/      else {
SOURCE(15230, 32)
/*1*/         {
/*1*/            word x57;
/*1*/            run←v15584.f1 = (x57 = box←v7792.f1,
/*1*/               MAX((int)(word), fmin←v15672, x57));
/*1*/            };
SOURCE(15264, 32)
/*1*/         {
/*1*/            word x58;
/*1*/            run←v15584.f3 = (x58 = box←v7792.f3,
/*1*/               MIN((int)(word), fmax←v15700, x58));
/*1*/            };
SOURCE(15298, 14)
/*1*/         (void) ( *( (fPt) ((*  (ptr) boxAction←v7820 ))))(run←v15584, boxAction←v7820);
/*1*/         };
/*1*/      };
/*1*/   };
                           t←v15628 = (* (( (ptr) t←v15628)+4) );
                           goto lab←L100111;
                           lab←L100108: ;
                           lab←L100109: ;
                           };
                        };
                     s←v15540 = (s←v15540 + 1);
                     if (( (int)s←v15540 <  (int)noName←c23976)) {
                        goto lab←L100107;
                        };
                     lab←L100104: ;
                     };
                  };
               };
SOURCE(15335, 63)
            lab←L100114: ;
            if ( ( (row←v15424 != 0) ? ( (int)(*  (ptr) row←v15424 ) ==  (int)smin←v15468) : 0 ) ) {
               }
            else {
               goto lab←L100112;
               };
SOURCE(15376, 22)
            row←v15424 = (* (( (ptr) row←v15424)+4) );
            goto lab←L100114;
            lab←L100112: ;
            };
         goto lab←L100103;
         lab←L100101: ;
         lab←L100102: ;
         };
      }
   else {
SOURCE(15418, 268)
      {
         register word each←v15744;
         each←v15744 = polygon←v7764;
         lab←L100118: ;
         if ((each←v15744 != 0)) {
            }
         else {
            goto lab←L100115;
            };
SOURCE(15475, 211)
         if (( (int)(* (( (ptr) each←v15744)+2) ) <=  (int)box←v7792.f0)) {
            }
         else {
SOURCE(15521, 165)
            if (( (int)(*  (ptr) each←v15744 ) >=  (int)box←v7792.f2)) {
SOURCE(15557, 10)
               goto lab←L100116;
               }
            else {
SOURCE(15567, 121)
               {
                  W4 clippedBox←v15788;
SOURCE(15569, 56)
                  {
                     W4 box1←v20920;
                     box1←v20920 = (*  (W4Pt) each←v15744 );
                     {
                        W2 v1←v19412;
                        W2 v2←v19444;
                        v1←v19412 = (*  (W2Pt) &box←v7792 );
                        v2←v19444 = (*  (W2Pt) &box1←v20920 );
                        if (( (int)v2←v19444.f0 >=  (int)v1←v19412.f0)) {
                           clippedBox←v15788.f0 = v2←v19444.f0;
                           }
                        else {
                           clippedBox←v15788.f0 = v1←v19412.f0;
                           };
                        if (( (int)v2←v19444.f1 >=  (int)v1←v19412.f1)) {
                           clippedBox←v15788.f1 = v2←v19444.f1;
                           }
                        else {
                           clippedBox←v15788.f1 = v1←v19412.f1;
                           };
                        };
                     {
                        W2 v1←v19788;
                        W2 v2←v19820;
                        v1←v19788 = (*  (W2Pt) (( (ptr) &box1←v20920)+2) );
                        v2←v19820 = (*  (W2Pt) (( (ptr) &box←v7792)+2) );
                        if (( (int)v1←v19788.f0 <=  (int)v2←v19820.f0)) {
                           clippedBox←v15788.f2 = v1←v19788.f0;
                           }
                        else {
                           clippedBox←v15788.f2 = v2←v19820.f0;
                           };
                        if (( (int)v1←v19788.f1 <=  (int)v2←v19820.f1)) {
                           clippedBox←v15788.f3 = v1←v19788.f1;
                           }
                        else {
                           clippedBox←v15788.f3 = v2←v19820.f1;
                           };
                        };
                     };
SOURCE(15627, 59)
                  if ( ( ( (int)clippedBox←v15788.f0 <  (int)clippedBox←v15788.f2) ? ( (int)clippedBox←v15788.f1 <  (int)clippedBox←v15788.f3) : 0 ) ) {
SOURCE(15665, 21)
                     (void) ( *( (fPt) ((*  (ptr) boxAction←v7820 ))))(clippedBox←v15788, boxAction←v7820);
                     };
                  };
               };
            };
         each←v15744 = (* (( (ptr) each←v15744)+4) );
         goto lab←L100118;
         lab←L100115: ;
         lab←L100116: ;
         };
      };
   }

static word IsVisible←P1740(mask←v7908, clipper←v7936)
   word mask←v7908;
   word clipper←v7936;
   {
   word visibility←v7980;
   /* IsVisible: */ 
SOURCE(15707, 821)
SOURCE(15792, 54)
   if ((mask←v7908 == 0) || (clipper←v7936 == 0)) {
SOURCE(15828, 18)
      return(2);
      };
SOURCE(15848, 680)
   if ( ( ((* (( (ptr) mask←v7908)+4) ) == 0) ? ((* (( (ptr) clipper←v7936)+4) ) == 0) : 0 ) ) {
SOURCE(15895, 413)
      {
         word sMin←v15832;
         word sMax←v15860;
         word fMin←v15888;
         word fMax←v15916;
         W4 var←c24232;
SOURCE(15897, 58)
         {
            word x59;
            word x60;
            sMin←v15832 = (x59 = (*  (ptr) mask←v7908 ),
               x60 = (*  (ptr) clipper←v7936 ),
               MAX((int)(word), x59, x60));
            };
SOURCE(15957, 58)
         {
            word x61;
            word x62;
            sMax←v15860 = (x61 = (* (( (ptr) mask←v7908)+2) ),
               x62 = (* (( (ptr) clipper←v7936)+2) ),
               MIN((int)(word), x61, x62));
            };
SOURCE(16017, 58)
         {
            word x63;
            word x64;
            fMin←v15888 = (x63 = (* (( (ptr) mask←v7908)+1) ),
               x64 = (* (( (ptr) clipper←v7936)+1) ),
               MAX((int)(word), x63, x64));
            };
SOURCE(16077, 58)
         {
            word x65;
            word x66;
            fMax←v15916 = (x65 = (* (( (ptr) mask←v7908)+3) ),
               x66 = (* (( (ptr) clipper←v7936)+3) ),
               MIN((int)(word), x65, x66));
            };
SOURCE(16137, 55)
         if (( (int)sMax←v15860 <=  (int)sMin←v15832) || ( (int)fMax←v15916 <=  (int)fMin←v15888)) {
SOURCE(16174, 18)
            return(2);
            };
SOURCE(16194, 88)
         var←c24232.f0 = sMin←v15832;
         var←c24232.f1 = fMin←v15888;
         var←c24232.f2 = sMax←v15860;
         var←c24232.f3 = fMax←v15916;
         if (XR←EqualWords(mask←v7908, &(var←c24232
            ), 4)) {
SOURCE(16266, 16)
            return(0);
            };
SOURCE(16284, 22)
         return(1);
         };
      }
   else {
SOURCE(16315, 215)
      {
         word intersection←v15960;
SOURCE(16317, 51)
         intersection←v15960 = (word) Intersection←P660(mask←v7908, clipper←v7936);
SOURCE(16370, 115)
         if ((intersection←v15960 == 0)) {
            visibility←v7980 = 2;
            }
         else {
            if ((0 != (word) Equal←P1860(intersection←v15960, mask←v7908))) {
               visibility←v7980 = 0;
               }
            else {
               visibility←v7980 = 1;
               };
            };
SOURCE(16487, 21)
         (void) Destroy←P240(intersection←v15960);
SOURCE(16510, 18)
         intersection←v15960 = 0;
         };
      };
SOURCE(15707, 821)
   return(visibility←v7980);
   }

static void ClipBoxToMask←P1800(box←v8040, mask←v8068, action←v8096)
   W4 box←v8040;
   word mask←v8068;
   word action←v8096;
   {
   word bmins←v16004;
   word bminf←v16032;
   word bmaxs←v16060;
   word bmaxf←v16088;
   /* ClipBoxToMask: */ 
SOURCE(16537, 672)
SOURCE(16620, 26)
   bmins←v16004 = box←v8040.f0;
SOURCE(16648, 26)
   bminf←v16032 = box←v8040.f1;
SOURCE(16676, 26)
   bmaxs←v16060 = box←v8040.f2;
SOURCE(16704, 26)
   bmaxf←v16088 = box←v8040.f3;
SOURCE(16732, 477)
   if ( ( ( (int)bmins←v16004 <  (int)bmaxs←v16060) ? ( (int)bminf←v16032 <  (int)bmaxf←v16088) : 0 ) ) {
SOURCE(16772, 437)
      {
         register word list←v16132;
         list←v16132 = mask←v8068;
         lab←L100125: ;
         if ((list←v16132 != 0)) {
            }
         else {
            goto lab←L100122;
            };
         {
            word mins←v16260;
            word maxs←v16288;
SOURCE(16833, 32)
            mins←v16260 = (*  (ptr) list←v16132 );
SOURCE(16867, 32)
            maxs←v16288 = (* (( (ptr) list←v16132)+2) );
SOURCE(16901, 33)
            if (( (int)bmins←v16004 >  (int)mins←v16260)) {
SOURCE(16922, 12)
               mins←v16260 = bmins←v16004;
               };
SOURCE(16936, 33)
            if (( (int)bmaxs←v16060 <  (int)maxs←v16288)) {
SOURCE(16957, 12)
               maxs←v16288 = bmaxs←v16060;
               };
SOURCE(16971, 238)
            if (( (int)mins←v16260 <  (int)maxs←v16288)) {
SOURCE(16991, 220)
               {
                  word minf←v16332;
                  word maxf←v16360;
SOURCE(16993, 32)
                  minf←v16332 = (* (( (ptr) list←v16132)+1) );
SOURCE(17027, 32)
                  maxf←v16360 = (* (( (ptr) list←v16132)+3) );
SOURCE(17061, 33)
                  if (( (int)bminf←v16032 >  (int)minf←v16332)) {
SOURCE(17082, 12)
                     minf←v16332 = bminf←v16032;
                     };
SOURCE(17096, 33)
                  if (( (int)bmaxf←v16088 <  (int)maxf←v16360)) {
SOURCE(17117, 12)
                     maxf←v16360 = bmaxf←v16088;
                     };
SOURCE(17131, 78)
                  if (( (int)minf←v16332 <  (int)maxf←v16360)) {
SOURCE(17151, 58)
                     {
                        W4 var←c24264;
                        var←c24264.f0 = mins←v16260;
                        var←c24264.f1 = minf←v16332;
                        var←c24264.f2 = maxs←v16288;
                        var←c24264.f3 = maxf←v16360;
                        (void) ( *( (fPt) ((*  (ptr) action←v8096 ))))(var←c24264, action←v8096);
                        };
                     };
                  };
               };
            };
         list←v16132 = (* (( (ptr) list←v16132)+4) );
         goto lab←L100125;
         lab←L100122: ;
         };
      };
   }

static word Equal←P1860(a←v8216, b←v8244)
   word a←v8216;
   word b←v8244;
   {
   word var←c8288;
   /* Equal: */ 
SOURCE(17227, 179)
SOURCE(17284, 97)
   lab←L100128: ;
   if ( (  ( (a←v8216 != 0) ? (b←v8244 != 0) : 0 )  ? (a←v8216 != b←v8244) : 0 ) ) {
      }
   else {
      goto lab←L100126;
      };
SOURCE(17317, 40)
   if ( ! XR←EqualWords(a←v8216, b←v8244, 4)) {
SOURCE(17343, 14)
      return(0);
      };
SOURCE(17359, 10)
   a←v8216 = (* (( (ptr) a←v8216)+4) );
SOURCE(17371, 10)
   b←v8244 = (* (( (ptr) b←v8244)+4) );
   goto lab←L100128;
   lab←L100126: ;
SOURCE(17392, 14)
   return( (unsigned) (a←v8216 == b←v8244));
   }

static word FromList←P1920(numbers←v8348)
   word numbers←v8348;
   {
   register ptr gf←c25416 =  (ptr) &globalframe;
   word new←v8492;
   word scratch←v16404;
   word last←v16432;
   /* FromList: */ 
SOURCE(17412, 623)
SOURCE(17412, 623)
   new←v8492 = 0;
SOURCE(17484, 9)
   scratch←v16404 = (word) GetScratch←P2040();
SOURCE(17524, 6)
   last←v16432 = scratch←v16404;
SOURCE(17556, 363)
   lab←L100131: ;
   if ((numbers←v8348 != 0)) {
      }
   else {
      goto lab←L100129;
      };
   {
      word sMin←v16644;
      word fMin←v16672;
      word sMax←v16700;
      word fMax←v16728;
SOURCE(17579, 37)
      sMin←v16644 = XR←Narrow((*  (ptr) numbers←v8348 ), (* (( (ptr) gf←c25416)+13) ));
SOURCE(17618, 42)
      fMin←v16672 = XR←Narrow((*  (ptr) (* (( (ptr) numbers←v8348)+1) ) ), (* (( (ptr) gf←c25416)+13) ));
SOURCE(17662, 47)
      sMax←v16700 = XR←Narrow((*  (ptr) (* (( (ptr) (* (( (ptr) numbers←v8348)+1) ))+1) ) ), (* (( (ptr) gf←c25416)+13) ));
SOURCE(17711, 52)
      fMax←v16728 = XR←Narrow((*  (ptr) (* (( (ptr) (* (( (ptr) (* (( (ptr) numbers←v8348)+1) ))+1) ))+1) ) ), (* (( (ptr) gf←c25416)+13)
          ));
SOURCE(17765, 49)
      if (((* (( (ptr) last←v16432)+4) ) == 0)) {
SOURCE(17790, 24)
         (* (( (ptr) last←v16432)+4) ) = (word) GetScratch←P2040();
         };
SOURCE(17817, 16)
      last←v16432 = (* (( (ptr) last←v16432)+4) );
SOURCE(17835, 45)
      (* (( (ptr) last←v16432)+1) ) = (*  (ptr) fMin←v16672 );
      (* (( (ptr) last←v16432)+2) ) = (*  (ptr) sMax←v16700 );
      (* (( (ptr) last←v16432)+3) ) = (*  (ptr) fMax←v16728 );
      (*  (ptr) last←v16432 ) = (*  (ptr) sMin←v16644 );
SOURCE(17882, 37)
      numbers←v8348 = (* (( (ptr) (* (( (ptr) (* (( (ptr) (* (( (ptr) numbers←v8348)+1) ))+1) ))+1) ))+1) );
      };
   goto lab←L100131;
   lab←L100129: ;
SOURCE(17930, 105)
   if ((last←v16432 == scratch←v16404)) {
SOURCE(17955, 10)
      new←v8492 = 0;
      }
   else {
SOURCE(17974, 18)
      new←v8492 = (* (( (ptr) scratch←v16404)+4) );
SOURCE(17994, 24)
      (* (( (ptr) scratch←v16404)+4) ) = (* (( (ptr) last←v16432)+4) );
SOURCE(18020, 15)
      (* (( (ptr) last←v16432)+4) ) = 0;
      };
SOURCE(17412, 623)
   return(new←v8492);
   }

static word CreateFromBox←P1980(box←v8720)
   W4 box←v8720;
   {
   register ptr gf←c25448 =  (ptr) &globalframe;
   word polygon←v8764;
   /* CreateFromBox: */ 
SOURCE(18151, 282)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c25448)+16)/* LOCK←v2496 */ ));
SOURCE(18151, 282)
   polygon←v8764 = 0;
SOURCE(18229, 40)
   if (( (int)box←v8720.f0 >=  (int)box←v8720.f2) || ( (int)box←v8720.f1 >=  (int)box←v8720.f3)) {
SOURCE(18257, 12)
      (void) (XR←MonitorExit((word) (( (bPt) gf←c25448)+16)/* LOCK←v2496 */ ));
      return(0);
      };
SOURCE(18271, 41)
   if (( (int)(* (( (ptr) gf←c25448)+9)/* availCount←v3560 */  ) ==  (int)0)) {
SOURCE(18294, 18)
      {
         word var←c24392;
         {
            word var←c24424;
            word var←c24456;
            var←c24424 = XR←NewObject(20, (* (( (ptr) gf←c25448)+14) ));
            var←c24456 = var←c24424;
            (*  (W4Pt) var←c24456 ) = box←v8720;
            var←c24392 = var←c24424;
            };
         (void) (XR←MonitorExit((word) (( (bPt) gf←c25448)+16)/* LOCK←v2496 */ ));
         return(var←c24392);
         };
      };
SOURCE(18314, 21)
   polygon←v8764 = (* (( (ptr) gf←c25448)+8)/* globalAvail←v3532 */  );
SOURCE(18337, 19)
   (*  (W4Pt) polygon←v8764 ) = box←v8720;
SOURCE(18358, 26)
   (* (( (ptr) gf←c25448)+8)/* globalAvail←v3532 */  ) = (* (( (ptr) polygon←v8764)+4) );
SOURCE(18386, 18)
   (* (( (ptr) polygon←v8764)+4) ) = 0;
SOURCE(18406, 27)
   (* (( (ptr) gf←c25448)+9)/* availCount←v3560 */  ) = ((* (( (ptr) gf←c25448)+9)/* availCount←v3560 */  ) - 1);
SOURCE(18151, 282)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c25448)+16)/* LOCK←v2496 */ ));
   return(polygon←v8764);
   }

static word GetScratch←P2040()
   {
   register ptr gf←c25480 =  (ptr) &globalframe;
   word scratch←v8824;
   word t←v16848 = 0;
   /* GetScratch: */ 
SOURCE(18439, 391)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c25480)+16)/* LOCK←v2496 */ ));
SOURCE(18439, 391)
   scratch←v8824 = 0;
SOURCE(18553, 106)
   lab←L100134: ;
   if (( (int)(* (( (ptr) gf←c25480)+9)/* availCount←v3560 */  ) <  (int)(* (( (ptr) gf←c25480)+11)/* scratchChunkSize←v3616 */  ))) {
      }
   else {
      goto lab←L100132;
      };
SOURCE(18592, 38)
   {
      word var←c24488;
      var←c24488 = XR←NewObject(20, (* (( (ptr) gf←c25480)+14) ));
      (* (( (ptr) var←c24488)+4) ) = (* (( (ptr) gf←c25480)+8)/* globalAvail←v3532 */  );
      (* (( (ptr) gf←c25480)+8)/* globalAvail←v3532 */  ) = var←c24488;
      };
SOURCE(18632, 27)
   (* (( (ptr) gf←c25480)+9)/* availCount←v3560 */  ) = ((* (( (ptr) gf←c25480)+9)/* availCount←v3560 */  ) + 1);
   goto lab←L100134;
   lab←L100132: ;
SOURCE(18670, 25)
   {
      word var←c24520;
      var←c24520 = (* (( (ptr) gf←c25480)+8)/* globalAvail←v3532 */  );
      t←v16848 = var←c24520;
      scratch←v8824 = var←c24520;
      };
SOURCE(18697, 53)
   {
      register word noName←c24552 = 0;
      register word noName←c24584;
      noName←c24584 = ((* (( (ptr) gf←c25480)+11)/* scratchChunkSize←v3616 */  ) - 1);
      if (( (int)noName←c24552 >=  (int)noName←c24584)) {
         goto lab←L100135;
         };
      lab←L100138: ;
SOURCE(18732, 18)
      t←v16848 = (* (( (ptr) t←v16848)+4) );
      noName←c24552 = (noName←c24552 + 1);
      if (( (int)noName←c24552 <  (int)noName←c24584)) {
         goto lab←L100138;
         };
      lab←L100135: ;
      };
SOURCE(18752, 20)
   (* (( (ptr) gf←c25480)+8)/* globalAvail←v3532 */  ) = (* (( (ptr) t←v16848)+4) );
SOURCE(18774, 42)
   (* (( (ptr) gf←c25480)+9)/* availCount←v3560 */  ) = ((* (( (ptr) gf←c25480)+9)/* availCount←v3560 */  ) - (* (( (ptr) gf←c25480)+11)
   /* scratchChunkSize←v3616 */  ));
SOURCE(18818, 12)
   (* (( (ptr) t←v16848)+4) ) = 0;
SOURCE(18439, 391)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c25480)+16)/* LOCK←v2496 */ ));
   return(scratch←v8824);
   }

static void FreeScratch←P2100(scratch←v8968)
   word scratch←v8968;
   {
   register ptr gf←c25512 =  (ptr) &globalframe;
   word limit←v16976;
   /* FreeScratch: */ 
SOURCE(18836, 423)
   (void) (XR←MonitorEntry((word) (( (bPt) gf←c25512)+16)/* LOCK←v2496 */ ));
SOURCE(18890, 31)
   {
      word x67;
      limit←v16976 = (x67 = (* (( (ptr) gf←c25512)+10)/* availLimit←v3588 */  ),
         MAX((int)(word), x67, 0));
      };
SOURCE(18923, 197)
   if ((scratch←v8968 != 0)) {
SOURCE(18945, 177)
      {
         word t←v17020;
SOURCE(18947, 3)
         t←v17020 = scratch←v8968;
SOURCE(18976, 61)
         lab←L100141: ;
         if (((* (( (ptr) t←v17020)+4) ) != 0)) {
            }
         else {
            goto lab←L100139;
            };
SOURCE(18998, 10)
         t←v17020 = (* (( (ptr) t←v17020)+4) );
SOURCE(19010, 27)
         (* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) = ((* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) + 1);
         goto lab←L100141;
         lab←L100139: ;
SOURCE(19048, 27)
         (* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) = ((* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) + 1);
SOURCE(19077, 20)
         (* (( (ptr) t←v17020)+4) ) = (* (( (ptr) gf←c25512)+8)/* globalAvail←v3532 */  );
SOURCE(19099, 21)
         (* (( (ptr) gf←c25512)+8)/* globalAvail←v3532 */  ) = scratch←v8968;
         };
      };
SOURCE(19125, 134)
   lab←L100144: ;
   if (( (int)(* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) >  (int)limit←v16976)) {
      }
   else {
      goto lab←L100142;
      };
   {
      word t←v17148;
SOURCE(19153, 3)
      t←v17148 = (* (( (ptr) gf←c25512)+8)/* globalAvail←v3532 */  );
SOURCE(19186, 30)
      (* (( (ptr) gf←c25512)+8)/* globalAvail←v3532 */  ) = (* (( (ptr) (* (( (ptr) gf←c25512)+8)/* globalAvail←v3532 */  ))+4)
       );
SOURCE(19218, 12)
      (* (( (ptr) t←v17148)+4) ) = 0;
SOURCE(19232, 27)
      (* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) = ((* (( (ptr) gf←c25512)+9)/* availCount←v3560 */  ) - 1);
      };
   goto lab←L100144;
   lab←L100142: ;
SOURCE(18836, 423)
   (void) (XR←MonitorExit((word) (( (bPt) gf←c25512)+16)/* LOCK←v2496 */ ));
   return;
   }

static void NoName←Q5652(formal←c0338, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c0338;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c0360 =  (ptr) &globalframe;
   if ((formal←c200001 == (word) (( (bPt) gf←c0360)+60)/* var←c21096 */ )) {
SOURCE(12550, 10)
      (*  (ptr) formal←c0338 ) = 2;
      (* (( (ptr) formal←c0338)+1) ) = 2;
      return;
      };
   (*  (ptr) formal←c0338 ) = 0;
   (* (( (ptr) formal←c0338)+1) ) = 0;
   return;
   }

/* file: ImagerManhattanImpl, module: ImagerManhattanImpl, compiled at: July 28, 1993 10:20:11 am PDT */ 
extern void XR←install←ImagerManhattanImpl() {
   NoName←Q5532();
   }
extern void XR←run←ImagerManhattanImpl() { XR←Start(&globalframe); }