/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: February 5, 1993 1:53:39 pm PST */ /* C2C version: October 7, 1992 (native) */ /* ref-counting: off */ /* file: GGUtilityImplB, module: GGUtilityImplB */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [4218354260,1734199943] GGUtilityImplB"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef struct {word f0, f1;} W2; typedef W2 *W2Pt; typedef word (*fPt)(); typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {word f0, f1, f2, f3;} W4; typedef struct {W8 f; W4 r;} W12; typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7; typedef struct {word f0, f1, f2, f3, f4, f5;} W6; #define SOURCE(p, l) /* source p, l */ static float fc22 = 360.0; static float fc24 = 0.0; static void NoName←Q2052(); static void GGUtilityImplB←P0(); static word SlopeOfSegment←P60(); static word SlopeOfPoints←P120(); static word CounterClockwiseBetweenSegments←P180(); static word SmallestAngleOfPoints←P240(); static word LengthOfSegment←P300(); static word DistanceBetweenPoints←P360(); static word DistanceFromPointToSegment←P420(); static word DistanceFromPointToLine←P480(); static word Identity←P540(); static void Transform←P600(); static word RotateAboutPoint←P660(); static word ScaleAboutPoint←P720(); static word ScaleUnevenAboutPoint←P780(); static word SixPoints←P840(); static word FourPoints←P900(); static void StartSliceList←P960(); static void AddSlice←P1020(); static word AppendSliceList←P1080(); static word DeleteSliceFromList←P1140(); static void FindSliceAndNeighbors←P1200(); static word CopySliceList←P1260(); static word SortSliceList←P1320(); static void InnerSort←P1728(); static word SortSliceListByPriority←P1380(); static word CompareProc←P1884(); static word LengthSliceList←P1440(); static word SliceListMerge←P1500(); static void StartTrajList←P1560(); static void AddTraj←P1620(); static struct {unsigned f; char r[48];} string1 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\247\365\203\234\300\047\265\225\046\100\324\005\004\162\145\163\164\214\216\257\300\247\365\203\234\300\047\265\225\046\100\324\261\000\000\000"}; static struct {unsigned f; char r[4];} string2 = {131074, "\004\003\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\373\156\372\124\300\147\135\312\207\100\164\000\000"}; static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\121\216\014\136\300\111\163\224\167\100\150\000\000"}; static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\121\117\377\026\300\315\013\026\004\100\150\000\000"}; static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\103\306\166\071\300\047\126\012\237\100\150\000\000"}; static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\004\142\347\110\300\363\053\254\345\100\150\000\000"}; static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\057\254\335\010\300\373\153\244\175\100\150\000\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\104\154\010\164\300\126\073\363\036\100\150\000\000"}; static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\370\132\042\205\300\045\133\011\125\100\150\000\000"}; static struct { word f0[5]; word f5; word f6; word f7; word f8; word f9; word f10; word f11; word f12; word f13; word f14; word f15; word f16; word f17; word f18; word f19; word f20; word f21; word f22; word f23; word f24; word f25; word f26; word f27; word f28; word f29; word f30; word f31; word f32; word f33; word f34; word f35; word f36; word f37; word f38; word f39; word f40; word f41; word f42; word f43; word f44; word f45; word f46; word f47; word f48; word f49; word f50; word f51; word f52; word f53; word f54; word f55; word f56; word f57; word f58; word f59; word f60[6]; } globalframe = { {0}, (word) AddTraj←P1620, 0, (word) StartTrajList←P1560, 0, (word) SliceListMerge←P1500, 0, (word) LengthSliceList←P1440, 0, (word) SortSliceListByPriority←P1380, 0, (word) SortSliceList←P1320, 0, (word) CopySliceList←P1260, 0, (word) FindSliceAndNeighbors←P1200, 0, (word) DeleteSliceFromList←P1140, 0, (word) AppendSliceList←P1080, 0, (word) AddSlice←P1020, 0, (word) StartSliceList←P960, 0, (word) FourPoints←P900, 0, (word) SixPoints←P840, 0, (word) ScaleUnevenAboutPoint←P780, 0, (word) ScaleAboutPoint←P720, 0, (word) RotateAboutPoint←P660, 0, (word) Transform←P600, 0, (word) Identity←P540, 0, (word) DistanceFromPointToLine←P480, 0, (word) DistanceFromPointToSegment←P420, 0, (word) DistanceBetweenPoints←P360, 0, (word) LengthOfSegment←P300, 0, (word) SmallestAngleOfPoints←P240, 0, (word) CounterClockwiseBetweenSegments←P180, 0, (word) SlopeOfPoints←P120, 0, (word) SlopeOfSegment←P60, 0, (word) GGUtilityImplB←P0, {0} }; static void NoName←Q2052() { register ptr gf←c0220 = (ptr) &globalframe; word var←c19368; (* (( (ptr) gf←c0220)+4) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (void) XR←DeclareGlobalFrame((word) "GGUtilityImplB", &globalframe, (word) XR←GetTypeIndexS((word) (&string3)), (word) (( (bPt) gf←c0220)+236) /* var←c18024 */ ); var←c19368 = (word) XR←ImportInterface((word) "Angles2d", (word) XR←GetTypeIndexS((word) (&string4)), 11); (* (( (ptr) gf←c0220)+62)/* var←c18120 */ ) = var←c19368; (void) XR←ImportProcS(var←c19368, 67371009); (void) XR←ImportProcS(var←c19368, 67371265); var←c19368 = (word) XR←ImportInterface((word) "ImagerTransformation", (word) XR←GetTypeIndexS((word) (&string5)), 55); (* (( (ptr) gf←c0220)+64)/* var←c18280 */ ) = var←c19368; (void) XR←ImportProcS(var←c19368, 67898882); (void) XR←ImportProcS(var←c19368, 68681734); (void) XR←ImportProcS(var←c19368, 67899394); (void) XR←ImportProcS(var←c19368, 67636994); (void) XR←ImportProcS(var←c19368, 67899906); (void) XR←ImportProcS(var←c19368, 67637506); (void) XR←ImportProcS(var←c19368, 135013122); (void) XR←ImportProcS(var←c19368, 67634689); var←c19368 = (word) XR←ImportInterface((word) "Lines2d", (word) XR←GetTypeIndexS((word) (&string6)), 50); (* (( (ptr) gf←c0220)+63)/* var←c18216 */ ) = var←c19368; (void) XR←ImportProcS(var←c19368, 67904258); (void) XR←ImportProcS(var←c19368, 68158466); var←c19368 = (word) XR←ImportInterface((word) "Vectors2d", (word) XR←GetTypeIndexS((word) (&string7)), 21); (* (( (ptr) gf←c0220)+61)/* var←c18056 */ ) = var←c19368; (void) XR←ImportProcS(var←c19368, 68161282); (void) XR←ImportProcS(var←c19368, 68158722); (void) XR←ImportProcS(var←c19368, 68158210); (void) XR←ImportProcS(var←c19368, 67633665); (void) XR←ImportProcS(var←c19368, 135270914); var←c19368 = (word) XR←ExportInterface((word) "GGMeasure", (word) XR←GetTypeIndexS((word) (&string8)), 8); (* (( (ptr) gf←c0220)+65)/* var←c19400 */ ) = var←c19368; (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+228)/* var←c17992 */ , 67371009); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+220)/* var←c17960 */ , 68157698); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+212)/* var←c17928 */ , 67633666); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+204)/* var←c17896 */ , 68682499); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+196)/* var←c17864 */ , 67372033); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+188)/* var←c17832 */ , 68158722); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+180)/* var←c17800 */ , 67896834); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+172)/* var←c17768 */ , 68683523); var←c19368 = (word) XR←ExportInterface((word) "GGTransform", (word) XR←GetTypeIndexS((word) (&string9)), 7); (* (( (ptr) gf←c0220)+65)/* var←c19400 */ ) = var←c19368; (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+164)/* var←c17736 */ , 67108864); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+156)/* var←c17704 */ , 135004418); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+148)/* var←c17672 */ , 67895810); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+140)/* var←c17640 */ , 67896066); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+132)/* var←c17608 */ , 68158467); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+124)/* var←c17576 */ , 70255873); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+116)/* var←c17544 */ , 69207553); var←c19368 = (word) XR←ExportInterface((word) "GGUtility", (word) XR←GetTypeIndexS((word) (&string10)), 42); (* (( (ptr) gf←c0220)+65)/* var←c19400 */ ) = var←c19368; (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+108)/* var←c17512 */ , 134221824); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+100)/* var←c17480 */ , 135008515); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+92)/* var←c17448 */ , 67637762); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+84)/* var←c17416 */ , 67638018); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+76)/* var←c17384 */ , 268964866); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+68)/* var←c17352 */ , 67376385); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+60)/* var←c17320 */ , 67638786); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+52)/* var←c17288 */ , 67376897); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+28)/* var←c17192 */ , 134224896); (void) XR←ExportProcS(var←c19368, (word) (( (bPt) gf←c0220)+20)/* var←c17160 */ , 135011587); } static void GGUtilityImplB←P0(formal←c037, formal←c036) word formal←c037; word formal←c036; { /* GGUtilityImplB: */ } static word SlopeOfSegment←P60(seg←v3976) word seg←v3976; { register ptr gf←c19432 = (ptr) &globalframe; word degrees←v4020; W2 direction←v9296; /* SlopeOfSegment: */ SOURCE(581, 210) SOURCE(671, 54) { word pd11; pd11 = (* (( (ptr) (* (( (ptr) gf←c19432)+61)/* var←c18056 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd11 ))))((word) &direction←v9296, (* (W2Pt) (( (ptr) seg←v3976)+9) ), (* (W2Pt) (( (ptr) seg←v3976)+11) ), pd11); }; SOURCE(727, 64) { word var←c18088; { word pd12; pd12 = (* (( (ptr) (* (( (ptr) gf←c19432)+61)/* var←c18056 */ ))+6) ); var←c18088 = (word) ( *( (fPt) ((* (ptr) pd12 ))))(direction←v9296, pd12); }; { word pd13; pd13 = (* (( (ptr) (* (( (ptr) gf←c19432)+62)/* var←c18120 */ ))+5) ); degrees←v4020 = (word) ( *( (fPt) ((* (ptr) pd13 ))))(var←c18088, pd13); }; }; SOURCE(581, 210) return(degrees←v4020); } static word SlopeOfPoints←P120(p0←v4080, p1←v4108) W2 p0←v4080; W2 p1←v4108; { register ptr gf←c19464 = (ptr) &globalframe; word degrees←v4152; W2 direction←v9340; /* SlopeOfPoints: */ SOURCE(797, 202) SOURCE(887, 46) { word pd14; pd14 = (* (( (ptr) (* (( (ptr) gf←c19464)+61)/* var←c18056 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd14 ))))((word) &direction←v9340, p0←v4080, p1←v4108, pd14); }; SOURCE(935, 64) { word var←c18152; { word pd15; pd15 = (* (( (ptr) (* (( (ptr) gf←c19464)+61)/* var←c18056 */ ))+6) ); var←c18152 = (word) ( *( (fPt) ((* (ptr) pd15 ))))(direction←v9340, pd15); }; { word pd16; pd16 = (* (( (ptr) (* (( (ptr) gf←c19464)+62)/* var←c18120 */ ))+5) ); degrees←v4152 = (word) ( *( (fPt) ((* (ptr) pd16 ))))(var←c18152, pd16); }; }; SOURCE(797, 202) return(degrees←v4152); } static word CounterClockwiseBetweenSegments←P180(seg1←v4212, seg2←v4240) word seg1←v4212; word seg2←v4240; { register ptr gf←c19496 = (ptr) &globalframe; word degreesSeg1ToSeg2←v4284; W2 v1←v9384; W2 v2←v9412; /* CounterClockwiseBetweenSegments: */ SOURCE(1005, 360) SOURCE(1126, 49) { word pd17; pd17 = (* (( (ptr) (* (( (ptr) gf←c19496)+61)/* var←c18056 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd17 ))))((word) &v1←v9384, (* (W2Pt) (( (ptr) seg1←v4212)+9) ), (* (W2Pt) (( (ptr) seg1←v4212)+11) ), pd17); }; SOURCE(1177, 49) { word pd18; pd18 = (* (( (ptr) (* (( (ptr) gf←c19496)+61)/* var←c18056 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd18 ))))((word) &v2←v9412, (* (W2Pt) (( (ptr) seg2←v4240)+9) ), (* (W2Pt) (( (ptr) seg2←v4240)+11) ), pd18); }; SOURCE(1228, 80) { word var←c18184; { word pd19; pd19 = (* (( (ptr) (* (( (ptr) gf←c19496)+61)/* var←c18056 */ ))+7) ); var←c18184 = (word) ( *( (fPt) ((* (ptr) pd19 ))))(v1←v9384, v2←v9412, pd19); }; { word pd20; pd20 = (* (( (ptr) (* (( (ptr) gf←c19496)+62)/* var←c18120 */ ))+4) ); degreesSeg1ToSeg2←v4284 = (word) ( *( (fPt) ((* (ptr) pd20 ))))(var←c18184, pd20); }; }; SOURCE(1310, 55) { word x21; word x23; if ((( x21 = degreesSeg1ToSeg2←v4284, *(float*)&x21 ) == ( x23 = (* (ptr) &fc22 ), *(float*)&x23 ))) { SOURCE(1342, 23) degreesSeg1ToSeg2←v4284 = (* (ptr) &fc24 ); }; }; SOURCE(1005, 360) return(degreesSeg1ToSeg2←v4284); } static word SmallestAngleOfPoints←P240(a←v4344, b←v4372, c←v4400) W2 a←v4344; W2 b←v4372; W2 c←v4400; { register ptr gf←c19528 = (ptr) &globalframe; word degreesAngleABC←v4444; W2 v0←v9456; W2 v1←v9484; /* SmallestAngleOfPoints: */ SOURCE(1371, 258) SOURCE(1488, 37) { word pd25; pd25 = (* (( (ptr) (* (( (ptr) gf←c19528)+61)/* var←c18056 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd25 ))))((word) &v0←v9456, b←v4372, a←v4344, pd25); }; SOURCE(1527, 37) { word pd26; pd26 = (* (( (ptr) (* (( (ptr) gf←c19528)+61)/* var←c18056 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd26 ))))((word) &v1←v9484, b←v4372, c←v4400, pd26); }; SOURCE(1566, 63) { word pd27; pd27 = (* (( (ptr) (* (( (ptr) gf←c19528)+61)/* var←c18056 */ ))+9) ); degreesAngleABC←v4444 = (word) ( *( (fPt) ((* (ptr) pd27 ))))(v0←v9456, v1←v9484, pd27); }; SOURCE(1371, 258) return(degreesAngleABC←v4444); } static word LengthOfSegment←P300(seg←v4504) word seg←v4504; { register ptr gf←c19560 = (ptr) &globalframe; word lengthInPoints←v4548; /* LengthOfSegment: */ SOURCE(1635, 130) SOURCE(1714, 51) { word pd28; pd28 = (* (( (ptr) (* (( (ptr) gf←c19560)+61)/* var←c18056 */ ))+19) ); lengthInPoints←v4548 = (word) ( *( (fPt) ((* (ptr) pd28 ))))((* (W2Pt) (( (ptr) seg←v4504)+9) ), (* (W2Pt) (( (ptr) seg←v4504)+11) ), pd28); }; SOURCE(1635, 130) return(lengthInPoints←v4548); } static word DistanceBetweenPoints←P360(p0←v4608, p1←v4636) W2 p0←v4608; W2 p1←v4636; { register ptr gf←c19592 = (ptr) &globalframe; word lengthInPoints←v4680; /* DistanceBetweenPoints: */ SOURCE(1771, 129) SOURCE(1857, 43) { word pd29; pd29 = (* (( (ptr) (* (( (ptr) gf←c19592)+61)/* var←c18056 */ ))+19) ); lengthInPoints←v4680 = (word) ( *( (fPt) ((* (ptr) pd29 ))))(p0←v4608, p1←v4636, pd29); }; SOURCE(1771, 129) return(lengthInPoints←v4680); } static word DistanceFromPointToSegment←P420(p←v4740, seg←v4768) W2 p←v4740; word seg←v4768; { word distanceInPoints←v4812; /* DistanceFromPointToSegment: */ SOURCE(1906, 124) SOURCE(2008, 22) distanceInPoints←v4812 = (* (ptr) &fc24 ); SOURCE(1906, 124) return(distanceInPoints←v4812); } static word DistanceFromPointToLine←P480(p←v4872, p1←v4900, p2←v4928) W2 p←v4872; W2 p1←v4900; W2 p2←v4928; { register ptr gf←c19624 = (ptr) &globalframe; word distance←v4972; word line←v9528 = 0; /* DistanceFromPointToLine: */ SOURCE(2036, 183) SOURCE(2140, 37) { word pd30; pd30 = (* (( (ptr) (* (( (ptr) gf←c19624)+63)/* var←c18216 */ ))+8) ); line←v9528 = (word) ( *( (fPt) ((* (ptr) pd30 ))))(p1←v4900, p2←v4928, pd30); }; SOURCE(2179, 40) { word pd31; pd31 = (* (( (ptr) (* (( (ptr) gf←c19624)+63)/* var←c18216 */ ))+39) ); distance←v4972 = (word) ( *( (fPt) ((* (ptr) pd31 ))))(p←v4872, line←v9528, pd31); }; SOURCE(2036, 183) return(distance←v4972); } static word Identity←P540() { register ptr gf←c19656 = (ptr) &globalframe; word id←v5032; /* Identity: */ SOURCE(2225, 119) SOURCE(2225, 119) id←v5032 = 0; SOURCE(2301, 43) { W2 var←c18248; var←c18248.f0 = (* (ptr) &fc24 ); var←c18248.f1 = (* (ptr) &fc24 ); { word pd32; pd32 = (* (( (ptr) (* (( (ptr) gf←c19656)+64)/* var←c18280 */ ))+10) ); id←v5032 = (word) ( *( (fPt) ((* (ptr) pd32 ))))(var←c18248, pd32); }; }; SOURCE(2225, 119) return(id←v5032); } static void Transform←P600(formal←c085, m←v5092, p←v5120) word formal←c085; word m←v5092; W2 p←v5120; { register ptr gf←c19688 = (ptr) &globalframe; W2 var←c5164; /* Transform: */ SOURCE(2350, 139) SOURCE(2445, 44) { W2 var←c18344; { word pd33; pd33 = (* (( (ptr) (* (( (ptr) gf←c19688)+64)/* var←c18280 */ ))+39) ); (void) ( *( (fPt) ((* (ptr) pd33 ))))((word) &var←c18344, m←v5092, p←v5120, pd33); }; var←c5164 = var←c18344; /* removed tail goto */ }; (* (W2Pt) formal←c085 ) = var←c5164; return; } static word RotateAboutPoint←P660(origin←v5224, degrees←v5252) W2 origin←v5224; word degrees←v5252; { register ptr gf←c19720 = (ptr) &globalframe; word m←v5296; /* RotateAboutPoint: */ SOURCE(2495, 288) SOURCE(2495, 288) m←v5296 = 0; SOURCE(2609, 60) { W2 var←c18376; { word x34; *(float*)&var←c18376.f0 = - ( x34 = origin←v5224.f0, *(float*)&x34 ); }; { word x35; *(float*)&var←c18376.f1 = - ( x35 = origin←v5224.f1, *(float*)&x35 ); }; { word pd36; pd36 = (* (( (ptr) (* (( (ptr) gf←c19720)+64)/* var←c18280 */ ))+10) ); m←v5296 = (word) ( *( (fPt) ((* (ptr) pd36 ))))(var←c18376, pd36); }; }; SOURCE(2671, 47) { word pd37; pd37 = (* (( (ptr) (* (( (ptr) gf←c19720)+64)/* var←c18280 */ ))+21) ); m←v5296 = (word) ( *( (fPt) ((* (ptr) pd37 ))))(m←v5296, degrees←v5252, pd37); }; SOURCE(2720, 63) { W2 var←c18408; var←c18408.f0 = origin←v5224.f0; var←c18408.f1 = origin←v5224.f1; { word pd38; pd38 = (* (( (ptr) (* (( (ptr) gf←c19720)+64)/* var←c18280 */ ))+22) ); m←v5296 = (word) ( *( (fPt) ((* (ptr) pd38 ))))(m←v5296, var←c18408, pd38); }; }; SOURCE(2495, 288) return(m←v5296); } static word ScaleAboutPoint←P720(origin←v5356, scalar←v5384) W2 origin←v5356; word scalar←v5384; { register ptr gf←c19752 = (ptr) &globalframe; word m←v5428; /* ScaleAboutPoint: */ SOURCE(2789, 284) SOURCE(2789, 284) m←v5428 = 0; SOURCE(2901, 60) { W2 var←c18440; { word x39; *(float*)&var←c18440.f0 = - ( x39 = origin←v5356.f0, *(float*)&x39 ); }; { word x40; *(float*)&var←c18440.f1 = - ( x40 = origin←v5356.f1, *(float*)&x40 ); }; { word pd41; pd41 = (* (( (ptr) (* (( (ptr) gf←c19752)+64)/* var←c18280 */ ))+10) ); m←v5428 = (word) ( *( (fPt) ((* (ptr) pd41 ))))(var←c18440, pd41); }; }; SOURCE(2963, 45) { word pd42; pd42 = (* (( (ptr) (* (( (ptr) gf←c19752)+64)/* var←c18280 */ ))+19) ); m←v5428 = (word) ( *( (fPt) ((* (ptr) pd42 ))))(m←v5428, scalar←v5384, pd42); }; SOURCE(3010, 63) { W2 var←c18472; var←c18472.f0 = origin←v5356.f0; var←c18472.f1 = origin←v5356.f1; { word pd43; pd43 = (* (( (ptr) (* (( (ptr) gf←c19752)+64)/* var←c18280 */ ))+22) ); m←v5428 = (word) ( *( (fPt) ((* (ptr) pd43 ))))(m←v5428, var←c18472, pd43); }; }; SOURCE(2789, 284) return(m←v5428); } static word ScaleUnevenAboutPoint←P780(origin←v5488, scalarX←v5516, scalarY←v5544) W2 origin←v5488; word scalarX←v5516; word scalarY←v5544; { register ptr gf←c19784 = (ptr) &globalframe; word m←v5588; /* ScaleUnevenAboutPoint: */ SOURCE(3079, 319) SOURCE(3079, 319) m←v5588 = 0; SOURCE(3213, 60) { W2 var←c18504; { word x44; *(float*)&var←c18504.f0 = - ( x44 = origin←v5488.f0, *(float*)&x44 ); }; { word x45; *(float*)&var←c18504.f1 = - ( x45 = origin←v5488.f1, *(float*)&x45 ); }; { word pd46; pd46 = (* (( (ptr) (* (( (ptr) gf←c19784)+64)/* var←c18280 */ ))+10) ); m←v5588 = (word) ( *( (fPt) ((* (ptr) pd46 ))))(var←c18504, pd46); }; }; SOURCE(3275, 58) { W2 var←c18536; var←c18536.f0 = scalarX←v5516; var←c18536.f1 = scalarY←v5544; { word pd47; pd47 = (* (( (ptr) (* (( (ptr) gf←c19784)+64)/* var←c18280 */ ))+20) ); m←v5588 = (word) ( *( (fPt) ((* (ptr) pd47 ))))(m←v5588, var←c18536, pd47); }; }; SOURCE(3335, 63) { W2 var←c18568; var←c18568.f0 = origin←v5488.f0; var←c18568.f1 = origin←v5488.f1; { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf←c19784)+64)/* var←c18280 */ ))+22) ); m←v5588 = (word) ( *( (fPt) ((* (ptr) pd48 ))))(m←v5588, var←c18568, pd48); }; }; SOURCE(3079, 319) return(m←v5588); } static word SixPoints←P840(pts←v5648) W12 pts←v5648; { register ptr gf←c19816 = (ptr) &globalframe; word transform←v5728; W8 dpts←v9572; word a←v9600; word b←v9628; word d←v9656; word e←v9684; word del←v9712; word xform←v9740 = 0; /* SixPoints: */ SOURCE(3403, 976) SOURCE(3403, 976) transform←v5728 = 0; SOURCE(3613, 29) { word x49; word x50; *(float*)&dpts←v9572.f0 = ( x49 = (* (( (ptr) &pts←v5648)+2) ), *(float*)&x49 ) - ( x50 = (* (ptr) &pts←v5648 ), *(float*)&x50 ); }; SOURCE(3644, 29) { word x51; word x52; *(float*)&dpts←v9572.f1 = ( x51 = (* (( (ptr) &pts←v5648)+3) ), *(float*)&x51 ) - ( x52 = (* (( (ptr) &pts←v5648)+1) ), *(float*)&x52 ); }; SOURCE(3675, 29) { word x53; word x54; *(float*)&dpts←v9572.f2 = ( x53 = (* (( (ptr) &pts←v5648)+4) ), *(float*)&x53 ) - ( x54 = (* (ptr) &pts←v5648 ), *(float*)&x54 ); }; SOURCE(3706, 29) { word x55; word x56; *(float*)&dpts←v9572.f3 = ( x55 = (* (( (ptr) &pts←v5648)+5) ), *(float*)&x55 ) - ( x56 = (* (( (ptr) &pts←v5648)+1) ), *(float*)&x56 ); }; SOURCE(3738, 29) { word x57; word x58; *(float*)&dpts←v9572.f4 = ( x57 = (* (( (ptr) &pts←v5648)+8) ), *(float*)&x57 ) - ( x58 = (* (( (ptr) &pts←v5648)+6) ), *(float*)&x58 ); }; SOURCE(3769, 29) { word x59; word x60; *(float*)&dpts←v9572.f5 = ( x59 = (* (( (ptr) &pts←v5648)+9) ), *(float*)&x59 ) - ( x60 = (* (( (ptr) &pts←v5648)+7) ), *(float*)&x60 ); }; SOURCE(3800, 29) { word x61; word x62; *(float*)&dpts←v9572.f6 = ( x61 = (* (( (ptr) &pts←v5648)+10) ), *(float*)&x61 ) - ( x62 = (* (( (ptr) &pts←v5648)+6) ), *(float*)&x62 ); }; SOURCE(3831, 29) { word x63; word x64; *(float*)&dpts←v9572.f7 = ( x63 = (* (( (ptr) &pts←v5648)+11) ), *(float*)&x63 ) - ( x64 = (* (( (ptr) &pts←v5648)+7) ), *(float*)&x64 ); }; SOURCE(3862, 45) { word x65; word x66; word x67; word x68; *(float*)&del←v9712 = (( x65 = dpts←v9572.f0, *(float*)&x65 ) * ( x66 = dpts←v9572.f3, *(float*)&x66 )) - (( x67 = dpts←v9572.f2, *(float*)&x67 ) * ( x68 = dpts←v9572.f1, *(float*)&x68 )); }; SOURCE(3909, 14) { word x69; word x70; if ((( x69 = del←v9712, *(float*)&x69 ) == ( x70 = (* (ptr) &fc24 ), *(float*)&x70 ))) { SOURCE(3923, 5) (void) XR←RaiseUnnamedError(); }; }; SOURCE(3930, 49) { word x71; word x72; word x73; word x74; word x75; *(float*)&a←v9600 = ((( x71 = dpts←v9572.f4, *(float*)&x71 ) * ( x72 = dpts←v9572.f3, *(float*)&x72 )) - (( x73 = dpts←v9572.f6, *(float*)&x73 ) * ( x74 = dpts←v9572.f1, *(float*)&x74 ))) / ( x75 = del←v9712, *(float*)&x75 ); }; SOURCE(3981, 49) { word x76; word x77; word x78; word x79; word x80; *(float*)&b←v9628 = ((( x76 = dpts←v9572.f0, *(float*)&x76 ) * ( x77 = dpts←v9572.f6, *(float*)&x77 )) - (( x78 = dpts←v9572.f2, *(float*)&x78 ) * ( x79 = dpts←v9572.f4, *(float*)&x79 ))) / ( x80 = del←v9712, *(float*)&x80 ); }; SOURCE(4032, 49) { word x81; word x82; word x83; word x84; word x85; *(float*)&d←v9656 = ((( x81 = dpts←v9572.f5, *(float*)&x81 ) * ( x82 = dpts←v9572.f3, *(float*)&x82 )) - (( x83 = dpts←v9572.f7, *(float*)&x83 ) * ( x84 = dpts←v9572.f1, *(float*)&x84 ))) / ( x85 = del←v9712, *(float*)&x85 ); }; SOURCE(4083, 49) { word x86; word x87; word x88; word x89; word x90; *(float*)&e←v9684 = ((( x86 = dpts←v9572.f0, *(float*)&x86 ) * ( x87 = dpts←v9572.f7, *(float*)&x87 )) - (( x88 = dpts←v9572.f2, *(float*)&x88 ) * ( x89 = dpts←v9572.f5, *(float*)&x89 ))) / ( x90 = del←v9712, *(float*)&x90 ); }; SOURCE(4134, 71) { word pd91; pd91 = (* (( (ptr) (* (( (ptr) gf←c19816)+64)/* var←c18280 */ ))+4) ); xform←v9740 = (word) ( *( (fPt) ((* (ptr) pd91 ))))(a←v9600, b←v9628, (* (ptr) &fc24 ), d←v9656, e←v9684, (* (ptr) &fc24 ), pd91) ; }; SOURCE(4207, 77) { W2 var←c18600; var←c18600.f0 = (* (( (ptr) &pts←v5648)+6) ); var←c18600.f1 = (* (( (ptr) &pts←v5648)+7) ); { word pd92; pd92 = (* (( (ptr) (* (( (ptr) gf←c19816)+64)/* var←c18280 */ ))+22) ); xform←v9740 = (word) ( *( (fPt) ((* (ptr) pd92 ))))(xform←v9740, var←c18600, pd92); }; }; SOURCE(4286, 78) { W2 var←c18632; { word x93; *(float*)&var←c18632.f0 = - ( x93 = (* (ptr) &pts←v5648 ), *(float*)&x93 ); }; { word x94; *(float*)&var←c18632.f1 = - ( x94 = (* (( (ptr) &pts←v5648)+1) ), *(float*)&x94 ); }; { word pd95; pd95 = (* (( (ptr) (* (( (ptr) gf←c19816)+64)/* var←c18280 */ ))+18) ); xform←v9740 = (word) ( *( (fPt) ((* (ptr) pd95 ))))(xform←v9740, var←c18632, pd95); }; }; SOURCE(4366, 13) return(xform←v9740); } static word FourPoints←P900(pts←v5788) W8 pts←v5788; { register ptr gf←c19848 = (ptr) &globalframe; word transform←v5868; word xform←v9820 = 0; word a←v9848; word b←v9876; word d←v9904; word e←v9932; word x1←v9960; word x2←v9988; word y1←v10016; word y2←v10044; word del←v10072; /* FourPoints: */ SOURCE(4385, 645) SOURCE(4385, 645) transform←v5868 = 0; SOURCE(4556, 28) { word x96; word x97; *(float*)&x1←v9960 = ( x96 = pts←v5788.f2, *(float*)&x96 ) - ( x97 = pts←v5788.f0, *(float*)&x97 ); }; SOURCE(4586, 28) { word x98; word x99; *(float*)&x2←v9988 = ( x98 = pts←v5788.f6, *(float*)&x98 ) - ( x99 = pts←v5788.f4, *(float*)&x99 ); }; SOURCE(4616, 28) { word x100; word x101; *(float*)&y1←v10016 = ( x100 = pts←v5788.f3, *(float*)&x100 ) - ( x101 = pts←v5788.f1, *(float*)&x101 ); }; SOURCE(4646, 28) { word x102; word x103; *(float*)&y2←v10044 = ( x102 = pts←v5788.f7, *(float*)&x102 ) - ( x103 = pts←v5788.f5, *(float*)&x103 ); }; SOURCE(4676, 23) { word x104; word x105; word x106; word x107; *(float*)&del←v10072 = (( x104 = x1←v9960, *(float*)&x104 ) * ( x105 = x1←v9960, *(float*)&x105 )) + (( x106 = y1←v10016, *(float*)&x106 ) * ( x107 = y1←v10016, *(float*)&x107 )); }; SOURCE(4701, 14) { word x108; word x109; if ((( x108 = del←v10072, *(float*)&x108 ) == ( x109 = (* (ptr) &fc24 ), *(float*)&x109 ))) { SOURCE(4715, 5) (void) XR←RaiseUnnamedError(); }; }; SOURCE(4722, 21) { word x110; word x111; word x112; word x113; word x114; *(float*)&a←v9848 = ((( x110 = x1←v9960, *(float*)&x110 ) * ( x111 = x2←v9988, *(float*)&x111 )) + (( x112 = y1←v10016, *(float*)&x112 ) * ( x113 = y2←v10044, *(float*)&x113 ))) / ( x114 = del←v10072, *(float*)&x114 ); }; SOURCE(4745, 5) e←v9932 = a←v9848; SOURCE(4752, 21) { word x115; word x116; word x117; word x118; word x119; *(float*)&d←v9904 = ((( x115 = x1←v9960, *(float*)&x115 ) * ( x116 = y2←v10044, *(float*)&x116 )) - (( x117 = y1←v10016, *(float*)&x117 ) * ( x118 = x2←v9988, *(float*)&x118 ))) / ( x119 = del←v10072, *(float*)&x119 ); }; SOURCE(4775, 7) { word x120; *(float*)&b←v9876 = - ( x120 = d←v9904, *(float*)&x120 ); }; SOURCE(4784, 71) { word pd121; pd121 = (* (( (ptr) (* (( (ptr) gf←c19848)+64)/* var←c18280 */ ))+4) ); xform←v9820 = (word) ( *( (fPt) ((* (ptr) pd121 ))))(a←v9848, b←v9876, (* (ptr) &fc24 ), d←v9904, e←v9932, (* (ptr) &fc24 ), pd121) ; }; SOURCE(4857, 77) { W2 var←c18664; var←c18664.f0 = pts←v5788.f4; var←c18664.f1 = pts←v5788.f5; { word pd122; pd122 = (* (( (ptr) (* (( (ptr) gf←c19848)+64)/* var←c18280 */ ))+22) ); xform←v9820 = (word) ( *( (fPt) ((* (ptr) pd122 ))))(xform←v9820, var←c18664, pd122); }; }; SOURCE(4936, 78) { W2 var←c18696; { word x123; *(float*)&var←c18696.f0 = - ( x123 = pts←v5788.f0, *(float*)&x123 ); }; { word x124; *(float*)&var←c18696.f1 = - ( x124 = pts←v5788.f1, *(float*)&x124 ); }; { word pd125; pd125 = (* (( (ptr) (* (( (ptr) gf←c19848)+64)/* var←c18280 */ ))+18) ); xform←v9820 = (word) ( *( (fPt) ((* (ptr) pd125 ))))(xform←v9820, var←c18696, pd125); }; }; SOURCE(5016, 14) return(xform←v9820); } static void StartSliceList←P960(formal←c0130) word formal←c0130; { word entityList←v5928; word ptr←v5956; /* StartSliceList: */ SOURCE(5033, 98) SOURCE(5033, 98) entityList←v5928 = 0; SOURCE(5033, 98) ptr←v5956 = 0; SOURCE(5109, 22) entityList←v5928 = 0; ptr←v5956 = 0; /* removed tail goto */ (* (ptr) formal←c0130 ) = entityList←v5928; (* (( (ptr) formal←c0130)+1) ) = ptr←v5956; return; } static void AddSlice←P1020(formal←c0139, entity←v6100, entityList←v6128, ptr←v6156) word formal←c0139; word entity←v6100; word entityList←v6128; word ptr←v6156; { register ptr gf←c19880 = (ptr) &globalframe; word newList←v6284; word newPtr←v6312; /* AddSlice: */ SOURCE(5137, 295) SOURCE(5137, 295) newList←v6284 = 0; SOURCE(5137, 295) newPtr←v6312 = 0; SOURCE(5252, 180) if ((ptr←v6156 == 0)) { SOURCE(5272, 29) if ((entityList←v6128 != 0)) { SOURCE(5301, 5) (void) XR←RaiseUnnamedError(); }; SOURCE(5308, 36) { word var←c18728; { word var←c18760; var←c18760 = XR←NewObject(8, (* (( (ptr) gf←c19880)+4) )); (* (ptr) var←c18760 ) = entity←v6100; var←c18728 = var←c18760; }; newList←v6284 = var←c18728; newPtr←v6312 = var←c18728; }; SOURCE(5346, 6) goto lab←L100002; } else { SOURCE(5363, 20) newList←v6284 = entityList←v6128; SOURCE(5385, 28) { word var←c18792; var←c18792 = XR←NewObject(8, (* (( (ptr) gf←c19880)+4) )); (* (ptr) var←c18792 ) = entity←v6100; (* (( (ptr) ptr←v6156)+1) ) = var←c18792; }; SOURCE(5415, 17) newPtr←v6312 = (* (( (ptr) ptr←v6156)+1) ); }; /* removed tail goto */ lab←L100002: ; (* (ptr) formal←c0139 ) = newList←v6284; (* (( (ptr) formal←c0139)+1) ) = newPtr←v6312; return; } static word AppendSliceList←P1080(list1←v6456, list2←v6484) word list1←v6456; word list2←v6484; { register ptr gf←c19912 = (ptr) &globalframe; word result←v6612; word pos←v10116 = 0; word newCell←v10144 = 0; /* AppendSliceList: */ SOURCE(5441, 371) SOURCE(5441, 371) result←v6612 = 0; SOURCE(5580, 33) if ((list1←v6456 == 0)) { SOURCE(5600, 13) return(list2←v6484); }; SOURCE(5615, 31) { word var←c18824; var←c18824 = XR←NewObject(8, (* (( (ptr) gf←c19912)+4) )); (* (ptr) var←c18824 ) = (* (ptr) list1←v6456 ); result←v6612 = var←c18824; }; SOURCE(5648, 12) pos←v10116 = result←v6612; SOURCE(5662, 122) { register word l←v10356; l←v10356 = (* (( (ptr) list1←v6456)+1) ); lab←L100006: ; if ((l←v10356 != 0)) { } else { goto lab←L100003; }; SOURCE(5721, 28) { word var←c18856; var←c18856 = XR←NewObject(8, (* (( (ptr) gf←c19912)+4) )); (* (ptr) var←c18856 ) = (* (ptr) l←v10356 ); newCell←v10144 = var←c18856; }; SOURCE(5751, 18) (* (( (ptr) pos←v10116)+1) ) = newCell←v10144; SOURCE(5771, 13) pos←v10116 = newCell←v10144; l←v10356 = (* (( (ptr) l←v10356)+1) ); goto lab←L100006; lab←L100003: ; }; SOURCE(5795, 17) (* (( (ptr) pos←v10116)+1) ) = list2←v6484; SOURCE(5441, 371) return(result←v6612); } static word DeleteSliceFromList←P1140(slice←v6756, sliceList←v6784) word slice←v6756; word sliceList←v6784; { word smallerList←v6912; word beforeEnt←v10484 = 0; word ent←v10512 = 0; word afterEnt←v10540 = 0; word found←v10568 = 0; /* DeleteSliceFromList: */ SOURCE(5818, 395) SOURCE(5818, 395) smallerList←v6912 = 0; SOURCE(5995, 75) { W4 var←c18888; (void) FindSliceAndNeighbors←P1200((word) &var←c18888, slice←v6756, sliceList←v6784); found←v10568 = var←c18888.f3; afterEnt←v10540 = var←c18888.f2; ent←v10512 = var←c18888.f1; beforeEnt←v10484 = var←c18888.f0; }; SOURCE(6072, 35) if ((0 == found←v10568)) { SOURCE(6090, 17) return(sliceList←v6784); }; SOURCE(6109, 104) if ((beforeEnt←v10484 == 0)) { SOURCE(6133, 28) smallerList←v6912 = afterEnt←v10540; } else { SOURCE(6163, 25) (* (( (ptr) beforeEnt←v10484)+1) ) = afterEnt←v10540; SOURCE(6190, 23) smallerList←v6912 = sliceList←v6784; }; SOURCE(5818, 395) return(smallerList←v6912); } static void FindSliceAndNeighbors←P1200(formal←c0165, slice←v7056, sliceList←v7084) word formal←c0165; word slice←v7056; word sliceList←v7084; { word beforeEnt←v7212; word ent←v7240; word afterEnt←v7268; word found←v7296; word lastE←v10696 = 0; word eList←v10724; /* FindSliceAndNeighbors: */ SOURCE(6222, 427) SOURCE(6222, 427) beforeEnt←v7212 = 0; SOURCE(6222, 427) ent←v7240 = 0; SOURCE(6222, 427) afterEnt←v7268 = 0; SOURCE(6222, 427) found←v7296 = 0; SOURCE(6401, 7) eList←v10724 = sliceList←v7084; SOURCE(6435, 48) if ((eList←v10724 == 0)) { SOURCE(6455, 28) beforeEnt←v7212 = 0; ent←v7240 = 0; afterEnt←v7268 = 0; found←v7296 = 0; goto lab←L100007; }; SOURCE(6485, 164) lab←L100010: ; if ((eList←v10724 != 0)) { } else { goto lab←L100008; }; SOURCE(6506, 105) if (((* (ptr) eList←v10724 ) == slice←v7056)) { SOURCE(6536, 17) beforeEnt←v7212 = lastE←v10696; SOURCE(6555, 11) ent←v7240 = eList←v10724; SOURCE(6568, 21) afterEnt←v7268 = (* (( (ptr) eList←v10724)+1) ); SOURCE(6591, 12) found←v7296 = 1; SOURCE(6605, 6) goto lab←L100007; }; SOURCE(6616, 13) lastE←v10696 = eList←v10724; SOURCE(6631, 18) eList←v10724 = (* (( (ptr) eList←v10724)+1) ); goto lab←L100010; lab←L100008: ; /* removed tail goto */ lab←L100007: ; (* (ptr) formal←c0165 ) = beforeEnt←v7212; (* (( (ptr) formal←c0165)+1) ) = ent←v7240; (* (( (ptr) formal←c0165)+2) ) = afterEnt←v7268; (* (( (ptr) formal←c0165)+3) ) = found←v7296; return; } static word CopySliceList←P1260(sliceList←v7440) word sliceList←v7440; { register ptr gf←c19944 = (ptr) &globalframe; word copyList←v7568; word z←v10936 = 0; /* CopySliceList: */ SOURCE(6664, 297) SOURCE(6664, 297) copyList←v7568 = 0; SOURCE(6780, 35) if ((sliceList←v7440 == 0)) { SOURCE(6804, 11) return(0); }; SOURCE(6817, 37) { word var←c18920; var←c18920 = XR←NewObject(8, (* (( (ptr) gf←c19944)+4) )); (* (ptr) var←c18920 ) = (* (ptr) sliceList←v7440 ); copyList←v7568 = var←c18920; }; SOURCE(6856, 12) z←v10936 = copyList←v7568; SOURCE(6870, 91) lab←L100013: ; sliceList←v7440 = (* (( (ptr) sliceList←v7440)+1) ); if ((sliceList←v7440 != 0)) { } else { goto lab←L100011; }; SOURCE(6914, 35) { word var←c18952; var←c18952 = XR←NewObject(8, (* (( (ptr) gf←c19944)+4) )); (* (ptr) var←c18952 ) = (* (ptr) sliceList←v7440 ); (* (( (ptr) z←v10936)+1) ) = var←c18952; }; SOURCE(6951, 10) z←v10936 = (* (( (ptr) z←v10936)+1) ); goto lab←L100013; lab←L100011: ; SOURCE(6664, 297) return(copyList←v7568); } static word SortSliceList←P1320(list←v7712, formal←c0246) word list←v7712; word formal←c0246; { W7 var←c19976; /* declaration of compareProc←v7740 skipped */ word var←c7868; /* declaration of var←c18984 skipped */ var←c19976.f4/* compareProc←v7740 */ = formal←c0246; /* SortSliceList: */ SOURCE(7067, 956) { word tmpAddr126; tmpAddr126 = (word) (( (ptr) &var←c19976)+5)/* var←c18984 */ ; (* (ptr) tmpAddr126 ) = ( ((word) (fPt) InnerSort←P1728) ); (* (( (ptr) tmpAddr126) + 1) ) = 1; }; SOURCE(7938, 51) if ((list←v7712 == 0) || ((* (( (ptr) list←v7712)+1) ) == 0)) { SOURCE(7976, 13) return(list←v7712); }; SOURCE(7991, 32) { word var←c0241; W2 var←c0175; (void) InnerSort←P1728((word) &var←c0175, list←v7712, 32, (word) (( (bPt) &var←c19976)+20)/* var←c18984 */ ); var←c0241 = var←c0175.f0; return(var←c0241); }; } static void InnerSort←P1728(formal←c0186, head←v11140, max←v11168, formal←c20008) word formal←c0186; word head←v11140; word max←v11168; word formal←c20008; { word new←v11296; word next←v11324; word mid←v11436 = 0; formal←c20008 = (formal←c20008 - 20); /* InnerSort: */ SOURCE(7176, 748) SOURCE(7176, 748) new←v11296 = 0; SOURCE(7176, 748) next←v11324 = 0; SOURCE(7283, 10) new←v11296 = head←v11140; SOURCE(7295, 15) mid←v11436 = (* (( (ptr) head←v11140)+1) ); SOURCE(7312, 24) if ((mid←v11436 == 0)) { SOURCE(7330, 6) goto lab←L100014; }; SOURCE(7338, 15) next←v11324 = (* (( (ptr) mid←v11436)+1) ); SOURCE(7355, 91) { word pd127; pd127 = (* (( (ptr) formal←c20008)+4) ); if (((word) ( *( (fPt) ((* (ptr) pd127 ))))((* (ptr) new←v11296 ), (* (ptr) mid←v11436 ), pd127) == 2)) { SOURCE(7409, 14) (* (( (ptr) mid←v11436)+1) ) = new←v11296; SOURCE(7425, 9) new←v11296 = mid←v11436; SOURCE(7436, 10) mid←v11436 = head←v11140; }; }; SOURCE(7451, 14) (* (( (ptr) mid←v11436)+1) ) = 0; SOURCE(7467, 25) if ((next←v11324 == 0)) { SOURCE(7486, 6) goto lab←L100014; }; SOURCE(7495, 10) mid←v11436 = next←v11324; SOURCE(7507, 16) next←v11324 = (* (( (ptr) next←v11324)+1) ); SOURCE(7525, 182) if ((next←v11324 != 0)) { SOURCE(7544, 165) { word temp←v11564; SOURCE(7546, 6) temp←v11564 = next←v11324; SOURCE(7574, 16) next←v11324 = (* (( (ptr) temp←v11564)+1) ); SOURCE(7592, 15) (* (( (ptr) temp←v11564)+1) ) = 0; SOURCE(7609, 98) { word pd128; pd128 = (* (( (ptr) formal←c20008)+4) ); if (((word) ( *( (fPt) ((* (ptr) pd128 ))))((* (ptr) mid←v11436 ), (* (ptr) temp←v11564 ), pd128) == 2)) { SOURCE(7664, 14) (* (( (ptr) mid←v11436)+1) ) = 0; SOURCE(7680, 15) (* (( (ptr) temp←v11564)+1) ) = mid←v11436; SOURCE(7697, 10) mid←v11436 = temp←v11564; }; }; }; }; SOURCE(7713, 43) new←v11296 = (word) SliceListMerge←P1500(new←v11296, mid←v11436, (* (( (ptr) formal←c20008)+4) )); SOURCE(7758, 25) if ((next←v11324 == 0)) { SOURCE(7777, 6) goto lab←L100014; }; SOURCE(7786, 138) { register word depth←v11692 = 2; register word noName←c19048; noName←c19048 = max←v11168; if ((depth←v11692 >= noName←c19048)) { goto lab←L100015; }; lab←L100018: ; SOURCE(7816, 36) { W2 var←c19080; (void) InnerSort←P1728((word) &var←c19080, next←v11324, depth←v11692, (word) (( (bPt) formal←c20008)+20)); next←v11324 = var←c19080.f1; mid←v11436 = var←c19080.f0; }; SOURCE(7854, 43) new←v11296 = (word) SliceListMerge←P1500(new←v11296, mid←v11436, (* (( (ptr) formal←c20008)+4) )); SOURCE(7899, 25) if ((next←v11324 == 0)) { SOURCE(7918, 6) goto lab←L100014; }; depth←v11692 = (depth←v11692 + 1); if ((depth←v11692 < noName←c19048)) { goto lab←L100018; }; lab←L100015: ; }; /* removed tail goto */ lab←L100014: ; (* (ptr) formal←c0186 ) = new←v11296; (* (( (ptr) formal←c0186)+1) ) = next←v11324; return; } static word SortSliceListByPriority←P1380(list←v8012) word list←v8012; { W6 var←c20040; word var←c8140; /* declaration of var←c19112 skipped */ /* SortSliceListByPriority: */ SOURCE(8029, 304) { word tmpAddr129; tmpAddr129 = (word) (( (ptr) &var←c20040)+4)/* var←c19112 */ ; (* (ptr) tmpAddr129 ) = ( ((word) (fPt) CompareProc←P1884) ); (* (( (ptr) tmpAddr129) + 1) ) = 1; }; SOURCE(8293, 40) return((word) SortSliceList←P1320(list←v8012, (word) (( (bPt) &var←c20040)+16)/* var←c19112 */ )); } static word CompareProc←P1884(ref1←v16584, ref2←v16612, formal←c20072) word ref1←v16584; word ref2←v16612; word formal←c20072; { word var←c16656; word priority1←v11780; word priority2←v11808; formal←c20072 = (formal←c20072 - 16); /* CompareProc: */ SOURCE(8116, 172) SOURCE(8187, 25) priority1←v11780 = (* (( (ptr) ref1←v16584)+19) ); SOURCE(8214, 25) priority2←v11808 = (* (( (ptr) ref2←v16612)+19) ); SOURCE(8241, 47) if (( (int)priority1←v11780 == (int)priority2←v11808)) { return(1); } else { if (( (int)priority1←v11780 > (int)priority2←v11808)) { return(2); } else { return(0); }; }; } static word LengthSliceList←P1440(sliceList←v8284) word sliceList←v8284; { word count←v8412; /* LengthSliceList: */ SOURCE(8339, 169) SOURCE(8413, 9) count←v8412 = 0; SOURCE(8424, 84) { register word list←v11852; list←v11852 = sliceList←v8284; lab←L100022: ; if ((list←v11852 != 0)) { } else { goto lab←L100019; }; SOURCE(8491, 17) count←v8412 = (count←v8412 + 1); list←v11852 = (* (( (ptr) list←v11852)+1) ); goto lab←L100022; lab←L100019: ; }; SOURCE(8339, 169) return(count←v8412); } static word SliceListMerge←P1500(a←v8472, b←v8500, compare←v8528) word a←v8472; word b←v8500; word compare←v8528; { word c←v8656; word aPtr←v11980 = 0; word bPtr←v12008 = 0; word cPtr←v12036 = 0; /* SliceListMerge: */ SOURCE(8523, 584) SOURCE(8523, 584) c←v8656 = 0; SOURCE(8673, 8) aPtr←v11980 = a←v8472; SOURCE(8683, 8) bPtr←v12008 = b←v8500; SOURCE(8693, 414) lab←L100025: ; SOURCE(8696, 84) if ((aPtr←v11980 == 0)) { SOURCE(8717, 55) if ((c←v8656 == 0)) { SOURCE(8734, 15) c←v8656 = bPtr←v12008; cPtr←v12036 = bPtr←v12008; } else { SOURCE(8756, 16) (* (( (ptr) cPtr←v12036)+1) ) = bPtr←v12008; }; SOURCE(8774, 6) return(c←v8656); }; SOURCE(8785, 84) if ((bPtr←v12008 == 0)) { SOURCE(8806, 55) if ((c←v8656 == 0)) { SOURCE(8823, 15) c←v8656 = aPtr←v11980; cPtr←v12036 = aPtr←v11980; } else { SOURCE(8845, 16) (* (( (ptr) cPtr←v12036)+1) ) = aPtr←v11980; }; SOURCE(8863, 6) return(c←v8656); }; SOURCE(8874, 233) { word var←c19240; var←c19240 = (word) ( *( (fPt) ((* (ptr) compare←v8528 ))))((* (ptr) aPtr←v11980 ), (* (ptr) bPtr←v12008 ), compare←v8528) ; switch (var←c19240) { case 0: case 1: SOURCE(8935, 46) if ((c←v8656 == 0)) { SOURCE(8951, 14) c←v8656 = aPtr←v11980; } else { SOURCE(8965, 16) (* (( (ptr) cPtr←v12036)+1) ) = aPtr←v11980; }; SOURCE(8983, 11) cPtr←v12036 = aPtr←v11980; SOURCE(8996, 16) aPtr←v11980 = (* (( (ptr) aPtr←v11980)+1) ); break; case 2: SOURCE(9030, 46) if ((c←v8656 == 0)) { SOURCE(9046, 14) c←v8656 = bPtr←v12008; } else { SOURCE(9060, 16) (* (( (ptr) cPtr←v12036)+1) ) = bPtr←v12008; }; SOURCE(9078, 11) cPtr←v12036 = bPtr←v12008; SOURCE(9091, 16) bPtr←v12008 = (* (( (ptr) bPtr←v12008)+1) ); break; default: SOURCE(9124, 5) (void) XR←RaiseUnnamedError(); break; }; }; goto lab←L100025; } static void StartTrajList←P1560(formal←c0210) word formal←c0210; { word entityList←v8800; word ptr←v8828; /* StartTrajList: */ SOURCE(9144, 96) SOURCE(9144, 96) entityList←v8800 = 0; SOURCE(9144, 96) ptr←v8828 = 0; SOURCE(9218, 22) entityList←v8800 = 0; ptr←v8828 = 0; /* removed tail goto */ (* (ptr) formal←c0210 ) = entityList←v8800; (* (( (ptr) formal←c0210)+1) ) = ptr←v8828; return; } static void AddTraj←P1620(formal←c0219, entity←v8972, entityList←v9000, ptr←v9028) word formal←c0219; word entity←v8972; word entityList←v9000; word ptr←v9028; { register ptr gf←c20104 = (ptr) &globalframe; word newList←v9156; word newPtr←v9184; /* AddTraj: */ SOURCE(9246, 291) SOURCE(9246, 291) newList←v9156 = 0; SOURCE(9246, 291) newPtr←v9184 = 0; SOURCE(9357, 180) if ((ptr←v9028 == 0)) { SOURCE(9377, 29) if ((entityList←v9000 != 0)) { SOURCE(9406, 5) (void) XR←RaiseUnnamedError(); }; SOURCE(9413, 36) { word var←c19272; { word var←c19304; var←c19304 = XR←NewObject(8, (* (( (ptr) gf←c20104)+4) )); (* (ptr) var←c19304 ) = entity←v8972; var←c19272 = var←c19304; }; newList←v9156 = var←c19272; newPtr←v9184 = var←c19272; }; SOURCE(9451, 6) goto lab←L100027; } else { SOURCE(9468, 20) newList←v9156 = entityList←v9000; SOURCE(9490, 28) { word var←c19336; var←c19336 = XR←NewObject(8, (* (( (ptr) gf←c20104)+4) )); (* (ptr) var←c19336 ) = entity←v8972; (* (( (ptr) ptr←v9028)+1) ) = var←c19336; }; SOURCE(9520, 17) newPtr←v9184 = (* (( (ptr) ptr←v9028)+1) ); }; /* removed tail goto */ lab←L100027: ; (* (ptr) formal←c0219 ) = newList←v9156; (* (( (ptr) formal←c0219)+1) ) = newPtr←v9184; return; } /* file: GGUtilityImplB, module: GGUtilityImplB, compiled at: February 5, 1993 1:53:39 pm PST */ extern void XR←install←GGUtilityImplB() { NoName←Q2052(); } extern void XR←run←GGUtilityImplB() { XR←Start(&globalframe); }