/* 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 <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
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); }