/* 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 #include 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); }