/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: July 28, 1993 10:21:18 am PDT */ /* C2C version: April 20, 1993 (sun4) */ /* ref-counting: off */ /* file: ImagerPenImpl, module: ImagerPenImpl */ /* switches: bcfhklnouw */ #include #include static char versionStamp[] = "@(#)mob_version [1357448558,2214319797] ImagerPenImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); typedef struct {word f0, f1;} W2; typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {word f0, f1, f2, f3;} W4; typedef struct {W8 f; W4 r;} W12; typedef struct {word f0, f1, f2, f3, f4, f5;} W6; typedef W6 *W6Pt; typedef W2 *W2Pt; typedef struct {word f0, f1, f2;} W3; typedef struct {W8 f; W3 r;} W11; #define SOURCE(p, l) /* source p, l */ static float fc12 = 0.0; #define FMAX(x, y, tx, ty) ( (tx=((float) x)) >= (ty=((float) y)) ? tx : ty ) static float fc36 = 0.5; #define FABS(f, t) ( ((t=(f)) >= (float) 0.0) ? (t) : (- (t)) ) static float fc54 = 90.0; static float fc59 = 180.0; static float fc62 = -90.0; #define SGNCK(i) ((int) (word) (i) < 0 ? XR_RaiseArithmeticFault(): i ) #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR_RaiseBoundsFault()) : (idx) ) #define IABS(i) ( ((int)(word)(i) > 0) ? (i) : (word)(-(int)(word)(i)) ) static float fc114 = -99999.0; static float fc115 = 1.0; #define INEG(x) ( (word) ( - ((int) (word) (x)) ) ) static float fc120 = -1.0; #define MIN(cast, x, y) ( ( cast x) < ( cast y) ? (x) : (y) ) static void NoName_Q1956(); static void ImagerPenImpl_P0(); static word ScaleFactor_P60(); static word MakeTransformedCircle_P120(); static word MakeThickenedTransformedCircle_P180(); static word NoName_Q2016(); static word MakeEllipse_P300(); static word CheckCache_P360(); static void EnterCache_P420(); static word Round_P480(); static word MakeHalfEllipse_P540(); static word MoveToNextpqr_P1500(); static void RemoveLinepqAndAdjustq_P1560(); static word AllocNode_P600(); static void FreeNode_P660(); static void FreeVertexList_P720(); static word CountVertexList_P780(); static word PythAdd_P840(); static void CalculateGreek_P900(); static word IntegerDistanceToEllipseTowards_P960(); static void NoName_Q2076(); static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\166\022\273\153\300\125\117\023\206\100\164\000\000"}; static struct {unsigned f; char r[48];} string2 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\166\022\273\153\300\125\117\023\206\100\164\005\004\162\145\163\164\214\216\257\300\166\022\273\153\300\125\117\023\206\100\164\261\000\000\000"}; static struct {unsigned f; char r[4];} string3 = {131074, "\004\003\000"}; static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\120\351\005\156\300\203\373\326\265\101\050\000\000"}; static struct {unsigned f; char r[4];} string5 = {131074, "\003\006\000"}; static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\120\351\005\156\300\203\373\326\265\100\164\000\000"}; static struct {unsigned f; char r[4];} string7 = {196611, "\004e\000"}; static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\121\117\377\026\300\315\013\026\004\100\150\000\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\245\247\302\156\300\052\156\325\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\166\022\273\153\300\125\117\023\206\100\150\000\000"}; static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\130\073\236\351\300\154\373\320\354\100\150\000\000"}; static struct { word f0[18]; 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[4]; } globalframe = { {0}, (word) IntegerDistanceToEllipseTowards_P960, 0, (word) CalculateGreek_P900, 0, (word) PythAdd_P840, 0, (word) CountVertexList_P780, 0, (word) FreeVertexList_P720, 0, (word) FreeNode_P660, 0, (word) AllocNode_P600, 0, (word) MakeHalfEllipse_P540, 0, (word) Round_P480, 0, (word) EnterCache_P420, 0, (word) CheckCache_P360, 0, (word) MakeEllipse_P300, 0, (word) MakeThickenedTransformedCircle_P180, 0, (word) MakeTransformedCircle_P120, 0, (word) ScaleFactor_P60, 0, (word) ImagerPenImpl_P0, {0} }; static void NoName_Q1956() { register ptr gf_c0190 = (ptr) &globalframe; word var_c12856; (* (( (ptr) gf_c0190)+15) ) = (word) XR_GetTypeIndexS((word) (&string1)); (* (( (ptr) gf_c0190)+16) ) = (word) XR_GetTypeIndex((word) &string2, 0, (word) &string3); (* (( (ptr) gf_c0190)+17) ) = (word) XR_GetTypeIndex((word) &string4, 0, (word) &string5); (void) XR_DeclareGlobalFrame((word) "ImagerPenImpl", &globalframe, (word) XR_GetTypeIndex((word) &string6, 0, (word) &string7) , (word) (( (bPt) gf_c0190)+192)/* var_c11320 */ ); var_c12856 = (word) XR_ImportInterface((word) "ImagerTransformation", (word) XR_GetTypeIndexS((word) (&string8)), 55); (* (( (ptr) gf_c0190)+51)/* var_c11480 */ ) = var_c12856; (void) XR_ImportProcS(var_c12856, 262401); (void) XR_ImportProcS(var_c12856, 402927105); (void) XR_ImportProcS(var_c12856, 67899394); var_c12856 = (word) XR_ImportInterface((word) "RealFns", (word) XR_GetTypeIndexS((word) (&string9)), 36); (* (( (ptr) gf_c0190)+50)/* var_c11352 */ ) = var_c12856; (void) XR_ImportProcS(var_c12856, 67372801); (void) XR_ImportProcS(var_c12856, 67373313); (void) XR_ImportProcS(var_c12856, 67372289); var_c12856 = (word) XR_ExportInterface((word) "ImagerPen", (word) XR_GetTypeIndexS((word) (&string10)), 2); (* (( (ptr) gf_c0190)+52)/* var_c12888 */ ) = var_c12856; (void) XR_ExportProcS(var_c12856, (word) (( (bPt) gf_c0190)+176)/* var_c11256 */ , 68157443, (word) "MakeTransformedCircle") ; (void) XR_ExportProcS(var_c12856, (word) (( (bPt) gf_c0190)+160)/* var_c11192 */ , 67895555, (word) "MakeEllipse"); var_c12856 = (word) XR_ExportInterface((word) "ImagerPenExtras", (word) XR_GetTypeIndexS((word) (&string11)), 1); (* (( (ptr) gf_c0190)+52)/* var_c12888 */ ) = var_c12856; (void) XR_ExportProcS(var_c12856, (word) (( (bPt) gf_c0190)+168)/* var_c11224 */ , 68681732, (word) "MakeThickenedTransformedCircle") ; } static void ImagerPenImpl_P0(formal_c032, formal_c031) word formal_c032; word formal_c031; { register ptr gf_c12920 = (ptr) &globalframe; /* ImagerPenImpl: */ SOURCE(269, 8386) SOURCE(632, 36) (* (( (ptr) gf_c12920)+8)/* hairline_v2832 */ ) = (word) MakeEllipse_P300((* (ptr) &fc12 ), (* (ptr) &fc12 ), (* (ptr) &fc12 )) ; SOURCE(3178, 18) (* (( (ptr) gf_c12920)+9)/* cacheSize_v3000 */ ) = 5; } static word ScaleFactor_P60(a_v3568, b_v3596, strokeWidth_v3624, thickening_v3652, minThickness_v3680) word a_v3568; word b_v3596; word strokeWidth_v3624; word thickening_v3652; word minThickness_v3680; { register ptr gf_c12952 = (ptr) &globalframe; word var_c3724; word e_v6276; /* ScaleFactor: */ SOURCE(671, 1190) SOURCE(766, 33) { word pd13; word x14; word x15; word x16; word x17; float tf18; pd13 = (* (( (ptr) (* (( (ptr) gf_c12952)+50)/* var_c11352 */ ))+9) ); e_v6276 = (word) ( *( (fPt) ((* (ptr) pd13 ))))(( tf18 = (( x14 = a_v3568, *(float*)&x14 ) * ( x15 = a_v3568, *(float*)&x15 )) + (( x16 = b_v3596, *(float*)&x16 ) * ( x17 = b_v3596, *(float*)&x17 )), *(word*)&tf18 ), pd13); }; SOURCE(801, 36) { word x19; word x20; if ((( x19 = e_v6276, *(float*)&x19 ) == ( x20 = (* (ptr) &fc12 ), *(float*)&x20 ))) { SOURCE(817, 20) return(strokeWidth_v3624); }; }; SOURCE(892, 61) { word x21; float tf22; float tf23; word x24; word x25; float tf26; float tf27; float tf28; word x29; word x30; word x31; float tf32; tf26 = FMAX(( x21 = (* (ptr) &fc12 ), *(float*)&x21 ), (( x24 = minThickness_v3680, *(float*)&x24 ) / ( x25 = e_v6276, *(float*)&x25 )), tf22, tf23); return(( tf32 = FMAX(tf26, (( x29 = strokeWidth_v3624, *(float*)&x29 ) + (( x30 = thickening_v3652, *(float*)&x30 ) / ( x31 = e_v6276, *(float*)&x31 ))), tf27, tf28), *(word*)&tf32 )); }; } static word MakeTransformedCircle_P120(strokeWidth_v3784, m_v3812, thickening_v3840) word strokeWidth_v3784; word m_v3812; W2 thickening_v3840; { word var_c3884; /* MakeTransformedCircle: */ SOURCE(959, 902) SOURCE(1081, 780) { word var_c0206; { W2 var_c11416; var_c11416.f0 = (* (ptr) &fc12 ); var_c11416.f1 = (* (ptr) &fc12 ); var_c0206 = (word) MakeThickenedTransformedCircle_P180(strokeWidth_v3784, m_v3812, thickening_v3840, var_c11416); }; return(var_c0206); }; } static word MakeThickenedTransformedCircle_P180(strokeWidth_v3944, m_v3972, thickening_v4000, minThickness_v4028) word strokeWidth_v3944; word m_v3972; W2 thickening_v4000; W2 minThickness_v4028; { W12 var_c12984; register ptr gf_c13016 = (ptr) &globalframe; word var_c4072; /* MakeThickenedTransformedCircle: */ SOURCE(1207, 1075) SOURCE(1370, 912) { word x33; word x34; word x35; word x37; word x38; word x39; word x40; word x41; word x42; word x43; if ( ( ( ( ( (( x33 = strokeWidth_v3944, *(float*)&x33 ) == ( x34 = (* (ptr) &fc12 ), *(float*)&x34 )) ? (( x35 = thickening_v4000.f0, *(float*)&x35 ) < ( x37 = (* (ptr) &fc36 ), *(float*)&x37 )) : 0 ) ? (( x38 = thickening_v4000.f1, *(float*)&x38 ) < ( x39 = (* (ptr) &fc36 ), *(float*)&x39 )) : 0 ) ? (( x40 = minThickness_v4028.f0, *(float*)&x40 ) < ( x41 = (* (ptr) &fc36 ), *(float*)&x41 )) : 0 ) ? (( x42 = minThickness_v4028.f1, *(float*)&x42 ) < ( x43 = (* (ptr) &fc36 ), *(float*)&x43 )) : 0 ) ) { SOURCE(1494, 18) return((* (( (ptr) gf_c13016)+8)/* hairline_v2832 */ )); } else { SOURCE(1519, 765) { word sx_v6320; word sy_v6348; /* declaration of mm_v6376 skipped */ W6 f_v6404; word majorAxis_v6432; word minorAxis_v6460; word theta_v6488; SOURCE(1521, 75) sx_v6320 = (word) ScaleFactor_P60((* (ptr) m_v3972 ), (* (( (ptr) m_v3972)+1) ), strokeWidth_v3944, thickening_v4000.f0, minThickness_v4028.f0) ; SOURCE(1598, 75) sy_v6348 = (word) ScaleFactor_P60((* (( (ptr) m_v3972)+3) ), (* (( (ptr) m_v3972)+4) ), strokeWidth_v3944, thickening_v4000.f1, minThickness_v4028.f1) ; SOURCE(1675, 71) { W2 var_c11448; var_c11448.f0 = sx_v6320; var_c11448.f1 = sy_v6348; { word pd44; pd44 = (* (( (ptr) (* (( (ptr) gf_c13016)+51)/* var_c11480 */ ))+20) ); (* (( (ptr) &var_c12984)+4)/* mm_v6376 */ ) = (word) ( *( (fPt) ((* (ptr) pd44 ))))(m_v3972, var_c11448, pd44); }; }; SOURCE(1748, 106) { /* declaration of var_c01 skipped */ (* (( (ptr) &var_c12984)+5)/* var_c01 */ ) = (* (( (ptr) (* (( (ptr) gf_c13016)+51)/* var_c11480 */ ))+50) ); { /* declaration of var_c02 skipped */ { word var_c0207; var_c0207 = (word) &var_c12984; (void) (word) XR_Enable(( ((word) (fPt) NoName_Q2016) ), ( ((word) (fPt) NoName_Q2076) ), var_c0207); }; f_v6404 = (* (W6Pt) (( (ptr) &var_c12984)+6)/* var_c02 */ ); }; }; SOURCE(1863, 28) { float tf45; word x46; float tf47; majorAxis_v6432 = ( tf47 = FABS(( x46 = f_v6404.f1, *(float*)&x46 ), tf45), *(word*)&tf47 ); }; SOURCE(1893, 28) { float tf48; word x49; float tf50; minorAxis_v6460 = ( tf50 = FABS(( x49 = f_v6404.f2, *(float*)&x49 ), tf48), *(word*)&tf50 ); }; SOURCE(1923, 21) theta_v6488 = f_v6404.f3; SOURCE(1946, 111) { word x51; word x52; if ((( x51 = majorAxis_v6432, *(float*)&x51 ) < ( x52 = minorAxis_v6460, *(float*)&x52 ))) { SOURCE(1976, 83) { word t_v6532; SOURCE(1978, 19) t_v6532 = majorAxis_v6432; SOURCE(1999, 21) majorAxis_v6432 = minorAxis_v6460; SOURCE(2022, 13) minorAxis_v6460 = t_v6532; SOURCE(2037, 20) { word x53; word x55; *(float*)&theta_v6488 = ( x53 = theta_v6488, *(float*)&x53 ) + ( x55 = (* (ptr) &fc54 ), *(float*)&x55 ); }; }; }; }; SOURCE(2062, 51) lab_L100004: ; { word x56; word x57; if ((( x56 = theta_v6488, *(float*)&x56 ) > ( x57 = (* (ptr) &fc54 ), *(float*)&x57 ))) { } else { goto lab_L100002; }; }; SOURCE(2084, 29) { word x58; word x60; *(float*)&theta_v6488 = ( x58 = theta_v6488, *(float*)&x58 ) - ( x60 = (* (ptr) &fc59 ), *(float*)&x60 ); }; goto lab_L100004; lab_L100002: ; SOURCE(2115, 53) lab_L100007: ; { word x61; word x63; if ((( x61 = theta_v6488, *(float*)&x61 ) <= ( x63 = (* (ptr) &fc62 ), *(float*)&x63 ))) { } else { goto lab_L100005; }; }; SOURCE(2139, 29) { word x64; word x65; *(float*)&theta_v6488 = ( x64 = theta_v6488, *(float*)&x64 ) + ( x65 = (* (ptr) &fc59 ), *(float*)&x65 ); }; goto lab_L100007; lab_L100005: ; SOURCE(2170, 32) { word pd66; pd66 = (* (( (ptr) (* (( (ptr) gf_c13016)+51)/* var_c11480 */ ))+5) ); (void) ( *( (fPt) ((* (ptr) pd66 ))))((* ((( (ptr) &var_c12984)+4)/* mm_v6376 */ ) ), pd66); }; SOURCE(2204, 78) return((word) MakeEllipse_P300(majorAxis_v6432, minorAxis_v6460, theta_v6488)); }; }; }; } static word NoName_Q2016(formal_c0194) word formal_c0194; { SOURCE(1748, 106) { word pd67; pd67 = (* (( (ptr) formal_c0194)+5) ); (void) ( *( (fPt) ((* (ptr) pd67 ))))((word) (( (bPt) formal_c0194)+24), (* (( (ptr) formal_c0194)+4) ), pd67); }; return(0); } static word MakeEllipse_P300(majorAxis_v4236, minorAxis_v4264, theta_v4292) word majorAxis_v4236; word minorAxis_v4264; word theta_v4292; { register ptr gf_c13048 = (ptr) &globalframe; word p_v4336; /* MakeEllipse: */ SOURCE(2365, 805) SOURCE(2365, 805) p_v4336 = 0; SOURCE(2456, 714) { word tc68; if (((* (( (ptr) gf_c13048)+9)/* cacheSize_v3000 */ ) > 0)) { p_v4336 = (word) CheckCache_P360(majorAxis_v4236, minorAxis_v4264, theta_v4292); tc68 = (word) (p_v4336 != 0); } else { tc68 = (word) 0; }; if (tc68) { SOURCE(2532, 12) return(p_v4336); } else { SOURCE(2544, 628) { word v_v6576; word n_v6604; word i_v6632 = 0; SOURCE(2546, 60) v_v6576 = (word) MakeHalfEllipse_P540(majorAxis_v4236, minorAxis_v4264, theta_v4292); SOURCE(2608, 29) { word idx69; n_v6604 = ( idx69 = (word) ((word) CountVertexList_P780(v_v6576) - 1), SGNCK(idx69) ); }; SOURCE(2651, 20) { word var_c11544; word var_c11576; word var_c11608; { word idx70; var_c11544 = ( idx70 = (word) ((word) n_v6604 << 1), BCK(idx70, 33554431) ); }; var_c11576 = ((word) var_c11544 << 3); var_c11608 = XR_NewObject((24 + var_c11576), (* (( (ptr) gf_c13048)+15) )); (* (( (ptr) var_c11608)+5) ) = var_c11544; p_v4336 = var_c11608; }; SOURCE(2673, 23) (* (( (ptr) p_v4336)+2) ) = majorAxis_v4236; SOURCE(2698, 23) (* (( (ptr) p_v4336)+3) ) = minorAxis_v4264; SOURCE(2723, 15) (* (( (ptr) p_v4336)+4) ) = theta_v4292; SOURCE(2740, 102) { register word t_v6676; t_v6676 = v_v6576; lab_L100011: ; if (((* (( (ptr) t_v6676)+6) ) != 0)) { } else { goto lab_L100008; }; SOURCE(2790, 41) { word var_c11640; word var_c11704; word var_c11768; { word var_c11672; word real_v10792; real_v10792 = (* (ptr) t_v6676 ); SOURCE(2341, 20) { word x71; word x72; *(float*)&var_c11672 = ( x71 = (* (ptr) &fc36 ), *(float*)&x71 ) * ( x72 = real_v10792, *(float*)&x72 ); }; var_c11640 = var_c11672; }; { word var_c11736; word real_v10744; real_v10744 = (* (( (ptr) t_v6676)+1) ); SOURCE(2341, 20) { word x73; word x74; *(float*)&var_c11736 = ( x73 = (* (ptr) &fc36 ), *(float*)&x73 ) * ( x74 = real_v10744, *(float*)&x74 ); }; var_c11704 = var_c11736; }; { word limit75; var_c11768 = (word) (( (W2Pt) (( (bPt) p_v4336)+24))+( limit75 = (* (( (ptr) p_v4336)+5) ), BCK(i_v6632, limit75) )); }; (* (ptr) var_c11768 ) = var_c11640; (* (( (ptr) var_c11768)+1) ) = var_c11704; }; SOURCE(2833, 9) i_v6632 = (i_v6632 + 1); t_v6676 = (* (( (ptr) t_v6676)+6) ); goto lab_L100011; lab_L100008: ; }; SOURCE(2853, 104) { register word t_v6720; t_v6720 = v_v6576; lab_L100017: ; if (((* (( (ptr) t_v6720)+6) ) != 0)) { } else { goto lab_L100014; }; SOURCE(2903, 43) { word var_c11800; word var_c11864; word var_c11928; { word var_c11832; word real_v10696; real_v10696 = (* (ptr) t_v6720 ); SOURCE(2341, 20) { word x76; word x77; *(float*)&var_c11832 = ( x76 = (* (ptr) &fc36 ), *(float*)&x76 ) * ( x77 = real_v10696, *(float*)&x77 ); }; { word x78; *(float*)&var_c11800 = - ( x78 = var_c11832, *(float*)&x78 ); }; }; { word var_c11896; word real_v10648; real_v10648 = (* (( (ptr) t_v6720)+1) ); SOURCE(2341, 20) { word x79; word x80; *(float*)&var_c11896 = ( x79 = (* (ptr) &fc36 ), *(float*)&x79 ) * ( x80 = real_v10648, *(float*)&x80 ); }; { word x81; *(float*)&var_c11864 = - ( x81 = var_c11896, *(float*)&x81 ); }; }; { word limit82; var_c11928 = (word) (( (W2Pt) (( (bPt) p_v4336)+24))+( limit82 = (* (( (ptr) p_v4336)+5) ), BCK(i_v6632, limit82) )); }; (* (ptr) var_c11928 ) = var_c11800; (* (( (ptr) var_c11928)+1) ) = var_c11864; }; SOURCE(2948, 9) i_v6632 = (i_v6632 + 1); t_v6720 = (* (( (ptr) t_v6720)+6) ); goto lab_L100017; lab_L100014: ; }; SOURCE(2968, 113) { register word i_v6764 = 0; register word noName_c11960; noName_c11960 = (* (( (ptr) p_v4336)+5) ); if ((i_v6764 >= noName_c11960)) { goto lab_L100020; }; lab_L100023: ; SOURCE(2997, 41) { word x83; float tf84; float tf85; float tf86; word limit87; word x88; float tf89; (* (ptr) p_v4336 ) = ( tf89 = FMAX(( x83 = (* (ptr) p_v4336 ), *(float*)&x83 ), FABS(( /*1*/ x88 = (* (( (W2Pt) (( (ptr) p_v4336)+6))+( /*1*/ limit87 = (* (( (ptr) p_v4336)+5) ), /*1*/ BCK(i_v6764, limit87) /*1*/ )) ).f0, *(float*)&x88 /*1*/ ), tf86), tf84, tf85), *(word*)&tf89 ); }; SOURCE(3040, 41) { word x90; float tf91; float tf92; float tf93; word limit94; word x95; float tf96; (* (( (ptr) p_v4336)+1) ) = ( tf96 = FMAX(( x90 = (* (( (ptr) p_v4336)+1) ), *(float*)&x90 ), FABS(( /*1*/ x95 = (* (( (W2Pt) (( (ptr) p_v4336)+6))+( /*1*/ limit94 = (* (( (ptr) p_v4336)+5) ), /*1*/ BCK(i_v6764, limit94) /*1*/ )) ).f1, *(float*)&x95 /*1*/ ), tf93), tf91, tf92), *(word*)&tf96 ); }; i_v6764 = (i_v6764 + 1); if ((i_v6764 < noName_c11960)) { goto lab_L100023; }; lab_L100020: ; }; SOURCE(3092, 17) if ((i_v6632 != (* (( (ptr) p_v4336)+5) ))) { SOURCE(3109, 5) (void) XR_RaiseUnnamedError(); }; SOURCE(3116, 35) if (((* (( (ptr) gf_c13048)+9)/* cacheSize_v3000 */ ) > 0)) { SOURCE(3138, 13) (void) EnterCache_P420(p_v4336); }; SOURCE(3153, 17) (void) FreeVertexList_P720(v_v6576); }; }; }; SOURCE(2365, 805) return(p_v4336); } static word CheckCache_P360(majorAxis_v4480, minorAxis_v4508, theta_v4536) word majorAxis_v4480; word minorAxis_v4508; word theta_v4536; { register ptr gf_c13080 = (ptr) &globalframe; word var_c4580; word prev_v6808 = 0; /* CheckCache: */ SOURCE(3267, 470) (void) (XR_MonitorEntry((word) (( (bPt) gf_c13080)+16)/* LOCK_v2636 */ )); SOURCE(3378, 304) { register word c_v6936; c_v6936 = (* (( (ptr) gf_c13080)+10)/* cache_v3028 */ ); lab_L100027: ; if ((c_v6936 != 0)) { } else { goto lab_L100024; }; SOURCE(3430, 239) { word x97; word x98; word x99; word x100; word x101; word x102; word x103; word x104; if ( ( ( (( x97 = (* (( (ptr) (* (ptr) c_v6936 ))+2) ), *(float*)&x97 ) == ( x98 = majorAxis_v4480, *(float*)&x98 )) ? (( x99 = (* (( (ptr) (* (ptr) c_v6936 ))+3) ), *(float*)&x99 ) == ( x100 = minorAxis_v4508, *(float*)&x100 )) : 0 ) ? ( (( x101 = (* (( (ptr) (* (ptr) c_v6936 ))+4) ), *(float*)&x101 ) == ( x102 = theta_v4536, *(float*)&x102 )) ? 1 : (( x103 = majorAxis_v4480, *(float*)&x103 ) == ( x104 = minorAxis_v4508, *(float*)&x104 )) ) : 0 ) ) { SOURCE(3555, 66) if ((prev_v6808 != 0)) { SOURCE(3576, 18) (* (( (ptr) prev_v6808)+1) ) = (* (( (ptr) c_v6936)+1) ); SOURCE(3596, 14) (* (( (ptr) c_v6936)+1) ) = (* (( (ptr) gf_c13080)+10)/* cache_v3028 */ ); SOURCE(3612, 9) (* (( (ptr) gf_c13080)+10)/* cache_v3028 */ ) = c_v6936; }; SOURCE(3626, 25) (* (( (ptr) gf_c13080)+11)/* cacheHits_v3056 */ ) = ((* (( (ptr) gf_c13080)+11)/* cacheHits_v3056 */ ) + 1); SOURCE(3653, 16) { word var_c11992; var_c11992 = (* (ptr) c_v6936 ); (void) (XR_MonitorExit((word) (( (bPt) gf_c13080)+16)/* LOCK_v2636 */ )); return(var_c11992); }; }; }; SOURCE(3674, 8) prev_v6808 = c_v6936; c_v6936 = (* (( (ptr) c_v6936)+1) ); goto lab_L100027; lab_L100024: ; }; SOURCE(3693, 29) (* (( (ptr) gf_c13080)+12)/* cacheMisses_v3084 */ ) = ((* (( (ptr) gf_c13080)+12)/* cacheMisses_v3084 */ ) + 1); SOURCE(3724, 13) (void) (XR_MonitorExit((word) (( (bPt) gf_c13080)+16)/* LOCK_v2636 */ )); return(0); } static void EnterCache_P420(pen_v4640) word pen_v4640; { register ptr gf_c13112 = (ptr) &globalframe; word majorAxis_v7064; word minorAxis_v7092; word theta_v7120; word new_v7148 = 0; word prev_v7176 = 0; word i_v7204 = 2; /* EnterCache: */ SOURCE(3741, 431) (void) (XR_MonitorEntry((word) (( (bPt) gf_c13112)+16)/* LOCK_v2636 */ )); SOURCE(3779, 31) majorAxis_v7064 = (* (( (ptr) pen_v4640)+2) ); SOURCE(3812, 31) minorAxis_v7092 = (* (( (ptr) pen_v4640)+3) ); SOURCE(3845, 26) theta_v7120 = (* (( (ptr) pen_v4640)+4) ); SOURCE(3934, 198) { register word p_v7416; p_v7416 = (* (( (ptr) gf_c13112)+10)/* cache_v3028 */ ); lab_L100031: ; SOURCE(3972, 32) if ((p_v7416 == 0)) { SOURCE(3989, 15) { word var_c12024; word var_c12056; var_c12024 = XR_NewObject(8, (* (( (ptr) gf_c13112)+16) )); var_c12056 = var_c12024; (* (ptr) var_c12056 ) = pen_v4640; new_v7148 = var_c12024; }; SOURCE(4006, 4) goto lab_L100029; }; SOURCE(4013, 99) if ( ( (i_v7204 >= (* (( (ptr) gf_c13112)+9)/* cacheSize_v3000 */ )) ? ((* (( (ptr) p_v7416)+1) ) != 0) : 0 ) ) { SOURCE(4053, 12) new_v7148 = (* (( (ptr) p_v7416)+1) ); SOURCE(4067, 12) (* (( (ptr) p_v7416)+1) ) = 0; SOURCE(4081, 14) (* (( (ptr) new_v7148)+1) ) = 0; SOURCE(4097, 15) (* (ptr) new_v7148 ) = pen_v4640; SOURCE(4114, 4) goto lab_L100029; }; SOURCE(4123, 9) i_v7204 = (i_v7204 + 1); p_v7416 = (* (( (ptr) p_v7416)+1) ); goto lab_L100031; lab_L100029: ; }; SOURCE(4143, 16) (* (( (ptr) new_v7148)+1) ) = (* (( (ptr) gf_c13112)+10)/* cache_v3028 */ ); SOURCE(4161, 11) (* (( (ptr) gf_c13112)+10)/* cache_v3028 */ ) = new_v7148; SOURCE(3741, 431) (void) (XR_MonitorExit((word) (( (bPt) gf_c13112)+16)/* LOCK_v2636 */ )); return; } static word Round_P480(r_v4908) word r_v4908; { word var_c4952; /* Round: */ SOURCE(4338, 74) SOURCE(4378, 34) { word x105; word x106; float tf107; return((word) XR_REAL32_Floor(( tf107 = ( x105 = r_v4908, *(float*)&x105 ) + ( x106 = (* (ptr) &fc36 ), *(float*)&x106 ), *(word*)&tf107 ))); }; } static word MakeHalfEllipse_P540(semiMajorAxis_v5012, semiMinorAxis_v5040, theta_v5068) word semiMajorAxis_v5012; word semiMinorAxis_v5040; word theta_v5068; { W11 var_c13144; register ptr gf_c13176 = (ptr) &globalframe; word halfPen_v5112; /* declaration of var_c12120 skipped */ /* declaration of var_c12152 skipped */ word cos_v7572; word sin_v7600; /* declaration of p_v7628 skipped */ /* declaration of q_v7656 skipped */ /* declaration of r_v7684 skipped */ word s_v7712 = 0; /* MakeHalfEllipse: */ SOURCE(4418, 2473) { word tmpAddr108; tmpAddr108 = (word) (( (ptr) &var_c13144)+4)/* var_c12120 */ ; (* (ptr) tmpAddr108 ) = ( ((word) (fPt) RemoveLinepqAndAdjustq_P1560) ); (* (( (ptr) tmpAddr108) + 1) ) = 1; }; { word tmpAddr109; tmpAddr109 = (word) (( (ptr) &var_c13144)+6)/* var_c12152 */ ; (* (ptr) tmpAddr109 ) = ( ((word) (fPt) MoveToNextpqr_P1500) ); (* (( (ptr) tmpAddr109) + 1) ) = 1; }; SOURCE(4418, 2473) halfPen_v5112 = 0; SOURCE(4545, 33) { word pd110; pd110 = (* (( (ptr) (* (( (ptr) gf_c13176)+50)/* var_c11352 */ ))+13) ); cos_v7572 = (word) ( *( (fPt) ((* (ptr) pd110 ))))(theta_v5068, pd110); }; SOURCE(4580, 33) { word pd111; pd111 = (* (( (ptr) (* (( (ptr) gf_c13176)+50)/* var_c11352 */ ))+11) ); sin_v7600 = (word) ( *( (fPt) ((* (ptr) pd111 ))))(theta_v5068, pd111); }; SOURCE(4615, 22) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ) = 0; (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) = 0; (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ) = 0; SOURCE(4639, 732) { word alpha_v7756; word beta_v7784; word gamma_v7812; SOURCE(4670, 77) { W3 var_c12184; (void) CalculateGreek_P900((word) &var_c12184, semiMajorAxis_v5012, semiMinorAxis_v5040, cos_v7572, sin_v7600); gamma_v7812 = var_c12184.f2; beta_v7784 = var_c12184.f1; alpha_v7756 = var_c12184.f0; }; SOURCE(4749, 25) if (( (int)beta_v7784 == (int)0)) { SOURCE(4766, 8) beta_v7784 = 1; }; SOURCE(4776, 27) if (( (int)gamma_v7812 == (int)0)) { SOURCE(4794, 9) gamma_v7812 = 1; }; SOURCE(4805, 93) if (( (int)gamma_v7812 <= (int)IABS(alpha_v7756))) { SOURCE(4840, 58) if (( (int)alpha_v7756 > (int)0)) { SOURCE(4858, 23) alpha_v7756 = (gamma_v7812 - 1); } else { SOURCE(4881, 17) alpha_v7756 = (1 - gamma_v7812); }; }; SOURCE(4903, 118) { W2 var_c12216; { float tf112; var_c12216.f0 = ( tf112 = (float)(int)alpha_v7756, *(word*)&tf112 ); }; { float tf113; var_c12216.f1 = ( tf113 = (float)(int)beta_v7784, *(word*)&tf113 ); }; s_v7712 = (word) AllocNode_P600(var_c12216, (* (ptr) &fc114 ), (* (ptr) &fc115 ), 4294867297, (gamma_v7812 - alpha_v7756), 0) ; }; SOURCE(5023, 109) { W2 var_c12248; { float tf116; var_c12248.f0 = ( tf116 = (float)(int)gamma_v7812, *(word*)&tf116 ); }; { float tf117; var_c12248.f1 = ( tf117 = (float)(int)beta_v7784, *(word*)&tf117 ); }; (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ) = (word) AllocNode_P600(var_c12248, (* (ptr) &fc12 ), (* (ptr) &fc12 ), beta_v7784, (beta_v7784 + beta_v7784), s_v7712); }; SOURCE(5134, 114) { W2 var_c12280; { float tf118; var_c12280.f0 = ( tf118 = (float)(int)gamma_v7812, *(word*)&tf118 ); }; { float tf119; var_c12280.f1 = ( tf119 = (float)(int)INEG(beta_v7784), *(word*)&tf119 ); }; (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) = (word) AllocNode_P600(var_c12280, (* (ptr) &fc115 ), (* (ptr) &fc120 ), gamma_v7812, (gamma_v7812 + alpha_v7756), (* (( (ptr) &var_c13144)+10)/* r_v7684 */ )); }; SOURCE(5250, 119) { word var_c12312; { W2 var_c12344; { float tf121; var_c12344.f0 = ( tf121 = (float)(int)INEG(alpha_v7756), *(word*)&tf121 ); }; { float tf122; var_c12344.f1 = ( tf122 = (float)(int)INEG(beta_v7784), *(word*)&tf122 ); }; var_c12312 = (word) AllocNode_P600(var_c12344, (* (ptr) &fc12 ), (* (ptr) &fc114 ), beta_v7784, 4294867297, (* (( (ptr) &var_c13144)+9) /* q_v7656 */ )); }; (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ) = var_c12312; halfPen_v5112 = var_c12312; }; }; SOURCE(5376, 1363) SOURCE(6019, 705) lab_L100034: ; SOURCE(6019, 705) { word u_v8076; word v_v8104; word delta_v8132; SOURCE(6022, 29) { word x123; word x124; *(float*)&u_v8076 = ( x123 = (* (( (ptr) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ))+2) ), *(float*)&x123 ) + ( x124 = (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+2) ), *(float*)&x124 ); }; SOURCE(6053, 27) { word x125; word x126; *(float*)&v_v8104 = ( x125 = (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+3) ), *(float*)&x125 ) + ( x126 = (* (( (ptr) (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ))+3) ), *(float*)&x126 ); }; SOURCE(6082, 122) delta_v8132 = (((* (( (ptr) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ))+4) ) + (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+4) )) - (word) IntegerDistanceToEllipseTowards_P960(u_v8076, v_v8104, semiMajorAxis_v5012, semiMinorAxis_v5040, cos_v7572, sin_v7600) ); SOURCE(6206, 488) if (( (int)delta_v8132 > (int)0)) { SOURCE(6226, 32) { word x127; delta_v8132 = (x127 = (* (( (ptr) (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ))+5) ), MIN((int)(word), delta_v8132, x127)); }; SOURCE(6260, 417) if (( (int)delta_v8132 >= (int)(* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+5) ))) { SOURCE(6290, 34) (void) RemoveLinepqAndAdjustq_P1560(u_v8076, v_v8104, (word) (( (bPt) &var_c13144)+16)/* var_c12120 */ ); } else { SOURCE(6326, 196) { W2 var_c12376; { word x128; word x129; *(float*)&var_c12376.f0 = ( x128 = (* (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) ), *(float*)&x128 ) + ((float)(int)delta_v8132 * ( x129 = (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+3) ), *(float*)&x129 )); }; { word x130; word x131; *(float*)&var_c12376.f1 = ( x130 = (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+1) ), *(float*)&x130 ) - ((float)(int)delta_v8132 * ( x131 = (* (( (ptr) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ))+2) ), *(float*)&x131 )); }; s_v7712 = (word) AllocNode_P600(var_c12376, u_v8076, (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+3) ), (((* ( ( (ptr) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ))+4) ) + (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+4) )) - delta_v8132), ((* ( ( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+5) ) - delta_v8132), (* (( (ptr) &var_c13144)+9)/* q_v7656 */ )); }; SOURCE(6524, 10) (* (( (ptr) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ))+6) ) = s_v7712; SOURCE(6536, 71) { word var_c12408; word var_c12472; { word x132; word x133; *(float*)&var_c12408 = ( x132 = (* (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) ), *(float*)&x132 ) - ((float)(int)delta_v8132 * ( x133 = (* (( (ptr) (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ))+3) ), *(float*)&x133 )); }; { word x134; word x135; *(float*)&var_c12472 = ( x134 = (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+1) ), *(float*)&x134 ) + ((float)(int)delta_v8132 * ( x135 = (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+2) ), *(float*)&x135 )); }; (* (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) ) = var_c12408; (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+1) ) = var_c12472; }; SOURCE(6609, 11) (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+3) ) = v_v8104; SOURCE(6622, 20) (* (( (ptr) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ))+5) ) = delta_v8132; SOURCE(6644, 33) (* (( (ptr) (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ))+5) ) = ((* (( (ptr) (* (( (ptr) &var_c13144)+10)/* r_v7684 */ ))+5) ) - delta_v8132); }; } else { SOURCE(6689, 5) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ) = (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ); }; SOURCE(6696, 28) if ((0 == (word) MoveToNextpqr_P1500((word) ((( (bPt) &var_c13144)+24)/* var_c12152 */ )))) { SOURCE(6724, 4) goto lab_L100033; }; }; goto lab_L100034; lab_L100033: ; SOURCE(6750, 141) if (((* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) != 0)) { SOURCE(6768, 99) { word x136; word x137; if ((( x136 = (* (( (ptr) halfPen_v5112)+2) ), *(float*)&x136 ) == ( x137 = (* (ptr) &fc12 ), *(float*)&x137 ))) { SOURCE(6795, 11) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ) = halfPen_v5112; SOURCE(6808, 16) halfPen_v5112 = (* (( (ptr) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ))+6) ); SOURCE(6826, 11) (void) FreeNode_P660((* ((( (ptr) &var_c13144)+8)/* p_v7628 */ ) )); SOURCE(6839, 28) { word x138; *(float*)(* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) = - ( x138 = (* (ptr) halfPen_v5112 ), *(float*)&x138 ); }; }; }; SOURCE(6872, 5) (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ) = (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ); } else { SOURCE(6886, 5) (* (( (ptr) &var_c13144)+9)/* q_v7656 */ ) = (* (( (ptr) &var_c13144)+8)/* p_v7628 */ ); }; SOURCE(4418, 2473) return(halfPen_v5112); } static word MoveToNextpqr_P1500(formal_c13208) word formal_c13208; { word found_v7960; formal_c13208 = (formal_c13208 - 24); /* MoveToNextpqr: */ SOURCE(5382, 29) SOURCE(5428, 307) lab_L100037: ; SOURCE(5431, 10) (* (( (ptr) formal_c13208)+9) ) = (* (( (ptr) (* (( (ptr) formal_c13208)+8) ))+6) ); SOURCE(5443, 37) if (((* (( (ptr) formal_c13208)+9) ) == 0)) { SOURCE(5459, 21) return(0); }; SOURCE(5482, 253) if (( (int)(* (( (ptr) (* (( (ptr) formal_c13208)+9) ))+5) ) == (int)0)) { SOURCE(5509, 15) (* (( (ptr) (* (( (ptr) formal_c13208)+8) ))+6) ) = (* (( (ptr) (* (( (ptr) formal_c13208)+9) ))+6) ); SOURCE(5526, 27) (* (( (ptr) (* (( (ptr) formal_c13208)+8) ))+4) ) = (* (( (ptr) (* (( (ptr) formal_c13208)+9) ))+4) ); SOURCE(5555, 19) (* (( (ptr) (* (( (ptr) formal_c13208)+8) ))+2) ) = (* (( (ptr) (* (( (ptr) formal_c13208)+9) ))+2) ); SOURCE(5576, 11) (void) FreeNode_P660((* ((( (ptr) formal_c13208)+9)) )); } else { SOURCE(5598, 10) (* (( (ptr) formal_c13208)+10) ) = (* (( (ptr) (* (( (ptr) formal_c13208)+9) ))+6) ); SOURCE(5610, 37) if (((* (( (ptr) formal_c13208)+10) ) == 0)) { SOURCE(5626, 21) return(0); }; SOURCE(5649, 86) if (( (int)(* (( (ptr) (* (( (ptr) formal_c13208)+10) ))+5) ) == (int)0)) { SOURCE(5676, 10) (* (( (ptr) (* (( (ptr) formal_c13208)+8) ))+6) ) = (* (( (ptr) formal_c13208)+10) ); SOURCE(5688, 11) (void) FreeNode_P660((* ((( (ptr) formal_c13208)+9)) )); SOURCE(5701, 5) (* (( (ptr) formal_c13208)+8) ) = (* (( (ptr) formal_c13208)+10) ); } else { SOURCE(5715, 20) return(1); }; }; goto lab_L100037; } static void RemoveLinepqAndAdjustq_P1560(u_v8020, v_v8048, formal_c13240) word u_v8020; word v_v8048; word formal_c13240; { word delta_v8176; formal_c13240 = (formal_c13240 - 16); /* RemoveLinepqAndAdjustq: */ SOURCE(5752, 30) SOURCE(5798, 25) delta_v8176 = (* (( (ptr) (* (( (ptr) formal_c13240)+9) ))+5) ); SOURCE(5825, 52) (* (( (ptr) (* (( (ptr) formal_c13240)+8) ))+4) ) = (((* (( (ptr) (* (( (ptr) formal_c13240)+8) ))+4) ) + (* (( (ptr) (* ( ( (ptr) formal_c13240)+9) ))+4) )) - delta_v8176); SOURCE(5879, 12) (* (( (ptr) (* (( (ptr) formal_c13240)+8) ))+2) ) = u_v8020; SOURCE(5893, 11) (* (( (ptr) (* (( (ptr) formal_c13240)+9) ))+3) ) = v_v8048; SOURCE(5906, 71) { word var_c12504; word var_c12568; { word x139; word x140; *(float*)&var_c12504 = ( x139 = (* (ptr) (* (( (ptr) formal_c13240)+9) ) ), *(float*)&x139 ) - ((float)(int)delta_v8176 * ( x140 = (* (( (ptr) (* (( (ptr) formal_c13240)+10) ))+3) ), *(float*)&x140 )); }; { word x141; word x142; *(float*)&var_c12568 = ( x141 = (* (( (ptr) (* (( (ptr) formal_c13240)+9) ))+1) ), *(float*)&x141 ) + ((float)(int)delta_v8176 * ( x142 = (* (( (ptr) (* (( (ptr) formal_c13240)+9) ))+2) ), *(float*)&x142 )); }; (* (ptr) (* (( (ptr) formal_c13240)+9) ) ) = var_c12504; (* (( (ptr) (* (( (ptr) formal_c13240)+9) ))+1) ) = var_c12568; }; SOURCE(5979, 35) (* (( (ptr) (* (( (ptr) formal_c13240)+10) ))+5) ) = ((* (( (ptr) (* (( (ptr) formal_c13240)+10) ))+5) ) - delta_v8176); } static word AllocNode_P600(coord_v5184, rightU_v5212, leftV_v5240, rightClass_v5268, leftLength_v5296, link_v5324) W2 coord_v5184; word rightU_v5212; word leftV_v5240; word rightClass_v5268; word leftLength_v5296; word link_v5324; { register ptr gf_c13272 = (ptr) &globalframe; word var_c5380; word p_v8220; /* AllocNode: */ SOURCE(6935, 478) (void) (XR_MonitorEntry((word) (( (bPt) gf_c13272)+16)/* LOCK_v2636 */ )); SOURCE(7089, 28) p_v8220 = (* (( (ptr) gf_c13272)+13)/* freeNodes_v3280 */ ); SOURCE(7119, 282) if ((p_v8220 != 0)) { SOURCE(7137, 18) (* (( (ptr) gf_c13272)+13)/* freeNodes_v3280 */ ) = (* (( (ptr) p_v8220)+6) ); SOURCE(7157, 109) (* (W2Pt) p_v8220 ) = coord_v5184; (* (( (ptr) p_v8220)+2) ) = rightU_v5212; (* (( (ptr) p_v8220)+3) ) = leftV_v5240; (* (( (ptr) p_v8220)+4) ) = rightClass_v5268; (* (( (ptr) p_v8220)+5) ) = leftLength_v5296; (* (( (ptr) p_v8220)+6) ) = link_v5324; } else { SOURCE(7275, 126) { word var_c12600; var_c12600 = XR_NewObject(28, (* (( (ptr) gf_c13272)+17) )); (* (W2Pt) var_c12600 ) = coord_v5184; (* (( (ptr) var_c12600)+2) ) = rightU_v5212; (* (( (ptr) var_c12600)+3) ) = leftV_v5240; (* (( (ptr) var_c12600)+4) ) = rightClass_v5268; (* (( (ptr) var_c12600)+5) ) = leftLength_v5296; (* (( (ptr) var_c12600)+6) ) = link_v5324; p_v8220 = var_c12600; }; }; SOURCE(7403, 10) (void) (XR_MonitorExit((word) (( (bPt) gf_c13272)+16)/* LOCK_v2636 */ )); return(p_v8220); } static void FreeNode_P660(p_v5452) word p_v5452; { register ptr gf_c13304 = (ptr) &globalframe; /* FreeNode: */ SOURCE(7419, 95) (void) (XR_MonitorEntry((word) (( (bPt) gf_c13304)+16)/* LOCK_v2636 */ )); SOURCE(7463, 51) if ((p_v5452 != 0)) { SOURCE(7481, 18) (* (( (ptr) p_v5452)+6) ) = (* (( (ptr) gf_c13304)+13)/* freeNodes_v3280 */ ); SOURCE(7501, 13) (* (( (ptr) gf_c13304)+13)/* freeNodes_v3280 */ ) = p_v5452; }; SOURCE(7419, 95) (void) (XR_MonitorExit((word) (( (bPt) gf_c13304)+16)/* LOCK_v2636 */ )); return; } static void FreeVertexList_P720(p_v5524) word p_v5524; { register ptr gf_c13336 = (ptr) &globalframe; word lag_v8276; /* FreeVertexList: */ SOURCE(7523, 197) (void) (XR_MonitorEntry((word) (( (bPt) gf_c13336)+16)/* LOCK_v2636 */ )); SOURCE(7570, 19) lag_v8276 = p_v5524; SOURCE(7591, 129) if ((lag_v8276 != 0)) { SOURCE(7609, 111) lab_L100040: ; SOURCE(7609, 111) { word next_v8320; SOURCE(7612, 27) next_v8320 = (* (( (ptr) lag_v8276)+6) ); SOURCE(7641, 64) if ((next_v8320 == 0)) { SOURCE(7662, 20) (* (( (ptr) lag_v8276)+6) ) = (* (( (ptr) gf_c13336)+13)/* freeNodes_v3280 */ ); SOURCE(7684, 13) (* (( (ptr) gf_c13336)+13)/* freeNodes_v3280 */ ) = p_v5524; SOURCE(7699, 6) (void) (XR_MonitorExit((word) (( (bPt) gf_c13336)+16)/* LOCK_v2636 */ )); return; }; SOURCE(7710, 10) lag_v8276 = next_v8320; }; goto lab_L100040; }; SOURCE(7523, 197) (void) (XR_MonitorExit((word) (( (bPt) gf_c13336)+16)/* LOCK_v2636 */ )); return; } static word CountVertexList_P780(p_v5584) word p_v5584; { word n_v5628; /* CountVertexList: */ SOURCE(7735, 110) SOURCE(7735, 110) n_v5628 = 0; SOURCE(7798, 47) lab_L100043: ; if ((p_v5584 != 0)) { } else { goto lab_L100041; }; SOURCE(7815, 10) p_v5584 = (* (( (ptr) p_v5584)+6) ); SOURCE(7827, 18) n_v5628 = (n_v5628 + 1); goto lab_L100043; lab_L100041: ; SOURCE(7735, 110) return(n_v5628); } static word PythAdd_P840(a_v5688, b_v5716) word a_v5688; word b_v5716; { register ptr gf_c13368 = (ptr) &globalframe; word c_v5760; /* PythAdd: */ SOURCE(7849, 76) SOURCE(7898, 27) { word pd143; word x144; word x145; word x146; word x147; float tf148; pd143 = (* (( (ptr) (* (( (ptr) gf_c13368)+50)/* var_c11352 */ ))+9) ); c_v5760 = (word) ( *( (fPt) ((* (ptr) pd143 ))))(( tf148 = (( x144 = a_v5688, *(float*)&x144 ) * ( x145 = a_v5688, *(float*)&x145 )) + (( x146 = b_v5716, *(float*)&x146 ) * ( x147 = b_v5716, *(float*)&x147 )), *(word*)&tf148 ), pd143); }; SOURCE(7849, 76) return(c_v5760); } static void CalculateGreek_P900(formal_c0173, semiMajorAxis_v5820, semiMinorAxis_v5848, cos_v5876, sin_v5904) word formal_c0173; word semiMajorAxis_v5820; word semiMinorAxis_v5848; word cos_v5876; word sin_v5904; { word var_c5948; word var_c5976; word var_c6004; word a_v8364; word b_v8392; word g_v8420; /* CalculateGreek: */ SOURCE(7931, 442) SOURCE(8048, 282) { word x149; word x150; word x151; word x152; if ((( x149 = sin_v5904, *(float*)&x149 ) == ( x150 = (* (ptr) &fc12 ), *(float*)&x150 )) || (( x151 = semiMajorAxis_v5820, *(float*)&x151 ) == ( x152 = semiMinorAxis_v5848, *(float*)&x152 ))) { SOURCE(8101, 5) a_v8364 = (* (ptr) &fc12 ); SOURCE(8108, 17) b_v8392 = semiMinorAxis_v5848; SOURCE(8127, 17) g_v8420 = semiMajorAxis_v5820; } else { SOURCE(8153, 179) { word d_v8464; SOURCE(8155, 27) { word x153; word x154; *(float*)&d_v8464 = ( x153 = semiMinorAxis_v5848, *(float*)&x153 ) * ( x154 = cos_v5876, *(float*)&x154 ); }; SOURCE(8184, 21) { word x155; word x156; *(float*)&g_v8420 = ( x155 = semiMajorAxis_v5820, *(float*)&x155 ) * ( x156 = sin_v5904, *(float*)&x156 ); }; SOURCE(8207, 17) b_v8392 = (word) PythAdd_P840(g_v8420, d_v8464); SOURCE(8226, 53) { word x157; word x158; word x159; word x160; word x161; word x162; word x163; word x164; *(float*)&a_v8364 = ((( x157 = semiMajorAxis_v5820, *(float*)&x157 ) * (( x158 = g_v8420, *(float*)&x158 ) / ( x159 = b_v8392, *(float*)&x159 ))) * ( x160 = cos_v5876, *(float*)&x160 )) - ((( x161 = semiMinorAxis_v5848, *(float*)&x161 ) * (( x162 = d_v8464, *(float*)&x162 ) / ( x163 = b_v8392, *(float*)&x163 ))) * ( x164 = sin_v5904, *(float*)&x164 )); }; SOURCE(8281, 49) { word x165; word x166; float tf167; word x168; word x169; float tf170; g_v8420 = (word) PythAdd_P840(( tf167 = ( x165 = semiMajorAxis_v5820, *(float*)&x165 ) * ( x166 = cos_v5876, *(float*)&x166 ), *(word*)&tf167 ), ( tf170 = ( x168 = semiMinorAxis_v5848, *(float*)&x168 ) * ( x169 = sin_v5904, *(float*)&x169 ), *(word*)&tf170 )); }; }; }; }; SOURCE(8335, 38) { word var_c12728; word var_c12760; word var_c12792; var_c12728 = (word) Round_P480(a_v8364); var_c12760 = (word) Round_P480(b_v8392); var_c12792 = (word) Round_P480(g_v8420); var_c5948 = var_c12728; var_c5976 = var_c12760; var_c6004 = var_c12792; /* removed tail goto */ }; (* (ptr) formal_c0173 ) = var_c5948; (* (( (ptr) formal_c0173)+1) ) = var_c5976; (* (( (ptr) formal_c0173)+2) ) = var_c6004; return; } static word IntegerDistanceToEllipseTowards_P960(u_v6064, v_v6092, semiMajorAxis_v6120, semiMinorAxis_v6148, cos_v6176, sin_v6204) word u_v6064; word v_v6092; word semiMajorAxis_v6120; word semiMinorAxis_v6148; word cos_v6176; word sin_v6204; { word var_c6248; word alpha_v8508; word beta_v8536; word dReal_v8564; /* IntegerDistanceToEllipseTowards: */ SOURCE(8377, 278) SOURCE(8498, 29) { word x171; word x172; word x173; word x174; *(float*)&alpha_v8508 = (( x171 = u_v6064, *(float*)&x171 ) * ( x172 = cos_v6176, *(float*)&x172 )) + (( x173 = v_v6092, *(float*)&x173 ) * ( x174 = sin_v6204, *(float*)&x174 )); }; SOURCE(8529, 28) { word x175; word x176; word x177; word x178; *(float*)&beta_v8536 = (( x175 = v_v6092, *(float*)&x175 ) * ( x176 = cos_v6176, *(float*)&x176 )) - (( x177 = u_v6064, *(float*)&x177 ) * ( x178 = sin_v6204, *(float*)&x178 )); }; SOURCE(8559, 62) { word x179; word x180; float tf181; word x182; word x183; float tf184; dReal_v8564 = (word) PythAdd_P840(( tf181 = ( x179 = semiMajorAxis_v6120, *(float*)&x179 ) * ( x180 = alpha_v8508, *(float*)&x180 ), *(word*)&tf181 ), ( tf184 = ( x182 = semiMinorAxis_v6148, *(float*)&x182 ) * ( x183 = beta_v8536, *(float*)&x183 ), *(word*)&tf184 )); }; SOURCE(8623, 32) { word x185; float tf186; float tf187; word x188; float tf189; float tf190; float tf191; word x192; float tf193; tf189 = FMAX(( x185 = dReal_v8564, *(float*)&x185 ), ( x188 = u_v6064, *(float*)&x188 ), tf186, tf187); return((word) Round_P480(( tf193 = FMAX(tf189, ( x192 = v_v6092, *(float*)&x192 ), tf190, tf191), *(word*)&tf193 ))); }; } static void NoName_Q2076(formal_c0189, formal_c200000, formal_c200001, formal_c200002, formal_c200003) word formal_c0189; word formal_c200000; word formal_c200001; word formal_c200002; word formal_c200003; { register ptr gf_c0205 = (ptr) &globalframe; if ((formal_c200001 == (* (( (ptr) (* (( (ptr) gf_c0205)+51)/* var_c11480 */ ))+57) ))) { { word real_v10196; real_v10196 = (* (ptr) formal_c200003 ); SOURCE(1854, 7) (* (ptr) formal_c0189 ) = 1; (* (( (ptr) formal_c0189)+1) ) = 0; return; }; }; (* (ptr) formal_c0189 ) = 0; (* (( (ptr) formal_c0189)+1) ) = 0; return; } /* file: ImagerPenImpl, module: ImagerPenImpl, compiled at: July 28, 1993 10:21:17 am PDT */ extern void XR_install_ImagerPenImpl() { NoName_Q1956(); } extern void XR_run_ImagerPenImpl() { XR_Start(&globalframe); }