/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */
/* time: July 28, 1993 10:14:14 am PDT */
/* C2C version: April 20, 1993 (sun4) */
/* ref-counting: off */
/* file: ImagerBoxImpl, module: ImagerBoxImpl */
/* switches: bcfhklnouw */
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [1502850608,1120977382] ImagerBoxImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef struct {word f0, f1, f2, f3;} W4;
typedef W4 *W4Pt;
typedef struct {word f0, f1;} W2;
#define SOURCE(p, l) /* source p, l */
#define FMAX(x, y, tx, ty) ( (tx=((float) x)) >= (ty=((float) y)) ? tx : ty )
#define FMIN(x, y, tx, ty) ( (tx=((float) x)) <= (ty=((float) y)) ? tx : ty )
static float fc71 = 0.0;
static void NoName←Q1368();
static void ImagerBoxImpl←P0();
static void BoxFromRectangle←P60();
static void RectangleFromBox←P120();
static void BoxFromExtents←P180();
static void ExtentsFromBox←P240();
static void IntersectBox←P300();
static void BoundingBox←P360();
static void BoundPoint←P420();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\131\223\256\060\300\102\320\301\346\100\150\000\000"};
static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\000\172\225\152\300\104\041\252\375\100\150\000\000"};
static struct {
word f0[4]; word f4; 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[2];
} globalframe = {
{0}, (word) BoundPoint←P420, 0, (word) BoundingBox←P360,
0, (word) IntersectBox←P300, 0, (word) ExtentsFromBox←P240,
0, (word) BoxFromExtents←P180, 0, (word) RectangleFromBox←P120,
0, (word) BoxFromRectangle←P60, 0, (word) ImagerBoxImpl←P0,
{0}
};
static void NoName←Q1368()
{
register ptr gf←c055 = (ptr) &globalframe;
word var←c5544;
(void) XR←DeclareGlobalFrame((word) "ImagerBoxImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string1)), (word) (( (bPt) gf←c055)+72)
/* var←c5384 */ );
var←c5544 = (word) XR←ExportInterface((word) "ImagerBox", (word) XR←GetTypeIndexS((word) (&string2)), 7);
(* (( (ptr) gf←c055)+20)/* var←c5512 */ ) = var←c5544;
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+64)/* var←c5352 */ , 269484033, (word) "BoxFromRectangle");
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+56)/* var←c5320 */ , 269484289, (word) "RectangleFromBox");
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+48)/* var←c5288 */ , 269484545, (word) "BoxFromExtents");
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+40)/* var←c5256 */ , 269484801, (word) "ExtentsFromBox");
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+32)/* var←c5224 */ , 270533634, (word) "IntersectBox");
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+24)/* var←c5192 */ , 270533890, (word) "BoundingBox");
(void) XR←ExportProcS(var←c5544, (word) (( (bPt) gf←c055)+16)/* var←c5160 */ , 270009858, (word) "BoundPoint");
}
static void ImagerBoxImpl←P0(formal←c012, formal←c011)
word formal←c012;
word formal←c011;
{
/* ImagerBoxImpl: */
}
static void BoxFromRectangle←P60(formal←c017, r←v2656)
word formal←c017;
W4 r←v2656;
{
W4 b←v2700;
/* BoxFromRectangle: */
SOURCE(131, 280)
SOURCE(365, 24)
b←v2700.f0 = r←v2656.f0;
b←v2700.f1 = r←v2656.f1;
b←v2700.f2 = r←v2656.f0;
b←v2700.f3 = r←v2656.f1;
SOURCE(391, 20)
{
word x←v5008;
word y←v5036;
{
word x3;
word x4;
*(float*)&x←v5008 = (
x3 = r←v2656.f0, *(float*)&x3
) + (
x4 = r←v2656.f2, *(float*)&x4
);
};
{
word x5;
word x6;
*(float*)&y←v5036 = (
x5 = r←v2656.f1, *(float*)&x5
) + (
x6 = r←v2656.f3, *(float*)&x6
);
};
SOURCE(230, 64)
{
word x7;
word x8;
if (((
x7 = x←v5008, *(float*)&x7
) > (
x8 = b←v2700.f2, *(float*)&x8
))) {
SOURCE(249, 16)
b←v2700.f2 = x←v5008;
}
else {
SOURCE(265, 29)
{
word x9;
word x10;
if (((
x9 = x←v5008, *(float*)&x9
) < (
x10 = b←v2700.f0, *(float*)&x10
))) {
SOURCE(284, 10)
b←v2700.f0 = x←v5008;
};
};
};
};
SOURCE(296, 64)
{
word x11;
word x12;
if (((
x11 = y←v5036, *(float*)&x11
) > (
x12 = b←v2700.f3, *(float*)&x12
))) {
SOURCE(315, 16)
b←v2700.f3 = y←v5036;
}
else {
SOURCE(331, 29)
{
word x13;
word x14;
if (((
x13 = y←v5036, *(float*)&x13
) < (
x14 = b←v2700.f1, *(float*)&x14
))) {
SOURCE(350, 10)
b←v2700.f1 = y←v5036;
};
};
};
};
};
/* removed tail goto */
(* (W4Pt) formal←c017 ) = b←v2700;
return;
}
static void RectangleFromBox←P120(formal←c022, b←v2760)
word formal←c022;
W4 b←v2760;
{
word var←c056;
word var←c057;
word var←c058;
word var←c059;
/* RectangleFromBox: */
SOURCE(417, 276)
/* Return var split */
SOURCE(480, 70)
{
word x15;
word x16;
if (((
x15 = b←v2760.f0, *(float*)&x15
) > (
x16 = b←v2760.f2, *(float*)&x16
))) {
SOURCE(504, 46)
{
word t←v3568;
SOURCE(505, 16)
t←v3568 = b←v2760.f0;
SOURCE(523, 15)
b←v2760.f0 = b←v2760.f2;
SOURCE(540, 10)
b←v2760.f2 = t←v3568;
};
};
};
SOURCE(553, 70)
{
word x17;
word x18;
if (((
x17 = b←v2760.f1, *(float*)&x17
) > (
x18 = b←v2760.f3, *(float*)&x18
))) {
SOURCE(577, 46)
{
word t←v3612;
SOURCE(578, 16)
t←v3612 = b←v2760.f1;
SOURCE(596, 15)
b←v2760.f1 = b←v2760.f3;
SOURCE(613, 10)
b←v2760.f3 = t←v3612;
};
};
};
SOURCE(626, 67)
var←c056 = b←v2760.f0;
var←c057 = b←v2760.f1;
{
word x19;
word x20;
*(float*)&var←c058 = (
x19 = b←v2760.f2, *(float*)&x19
) - (
x20 = b←v2760.f0, *(float*)&x20
);
};
{
word x21;
word x22;
*(float*)&var←c059 = (
x21 = b←v2760.f3, *(float*)&x21
) - (
x22 = b←v2760.f1, *(float*)&x22
);
};
/* removed tail goto */
(* (( (ptr) formal←c022)+3) ) = var←c059;
(* (( (ptr) formal←c022)+2) ) = var←c058;
(* (( (ptr) formal←c022)+1) ) = var←c057;
(* (ptr) formal←c022 ) = var←c056;
return;
}
static void BoxFromExtents←P180(formal←c027, e←v2864)
word formal←c027;
W4 e←v2864;
{
W4 b←v2908;
/* BoxFromExtents: */
SOURCE(699, 315)
SOURCE(929, 54)
b←v2908.f0 = e←v2864.f1;
b←v2908.f1 = e←v2864.f3;
b←v2908.f2 = e←v2864.f1;
b←v2908.f3 = e←v2864.f3;
SOURCE(985, 29)
{
word x←v5084;
word y←v5112;
{
word x23;
*(float*)&x←v5084 = - (
x23 = e←v2864.f0, *(float*)&x23
);
};
{
word x24;
*(float*)&y←v5112 = - (
x24 = e←v2864.f2, *(float*)&x24
);
};
SOURCE(794, 64)
{
word x25;
word x26;
if (((
x25 = x←v5084, *(float*)&x25
) > (
x26 = b←v2908.f2, *(float*)&x26
))) {
SOURCE(813, 16)
b←v2908.f2 = x←v5084;
}
else {
SOURCE(829, 29)
{
word x27;
word x28;
if (((
x27 = x←v5084, *(float*)&x27
) < (
x28 = b←v2908.f0, *(float*)&x28
))) {
SOURCE(848, 10)
b←v2908.f0 = x←v5084;
};
};
};
};
SOURCE(860, 64)
{
word x29;
word x30;
if (((
x29 = y←v5112, *(float*)&x29
) > (
x30 = b←v2908.f3, *(float*)&x30
))) {
SOURCE(879, 16)
b←v2908.f3 = y←v5112;
}
else {
SOURCE(895, 29)
{
word x31;
word x32;
if (((
x31 = y←v5112, *(float*)&x31
) < (
x32 = b←v2908.f1, *(float*)&x32
))) {
SOURCE(914, 10)
b←v2908.f1 = y←v5112;
};
};
};
};
};
/* removed tail goto */
(* (W4Pt) formal←c027 ) = b←v2908;
return;
}
static void ExtentsFromBox←P240(formal←c032, b←v2968)
word formal←c032;
W4 b←v2968;
{
word var←c060;
word var←c061;
word var←c062;
word var←c063;
/* ExtentsFromBox: */
SOURCE(1020, 290)
/* Return var split */
SOURCE(1079, 70)
{
word x33;
word x34;
if (((
x33 = b←v2968.f0, *(float*)&x33
) > (
x34 = b←v2968.f2, *(float*)&x34
))) {
SOURCE(1103, 46)
{
word t←v3788;
SOURCE(1104, 16)
t←v3788 = b←v2968.f0;
SOURCE(1122, 15)
b←v2968.f0 = b←v2968.f2;
SOURCE(1139, 10)
b←v2968.f2 = t←v3788;
};
};
};
SOURCE(1152, 70)
{
word x35;
word x36;
if (((
x35 = b←v2968.f1, *(float*)&x35
) > (
x36 = b←v2968.f3, *(float*)&x36
))) {
SOURCE(1176, 46)
{
word t←v3832;
SOURCE(1177, 16)
t←v3832 = b←v2968.f1;
SOURCE(1195, 15)
b←v2968.f1 = b←v2968.f3;
SOURCE(1212, 10)
b←v2968.f3 = t←v3832;
};
};
};
SOURCE(1225, 85)
{
word x37;
*(float*)&var←c060 = - (
x37 = b←v2968.f0, *(float*)&x37
);
};
var←c061 = b←v2968.f2;
{
word x38;
*(float*)&var←c062 = - (
x38 = b←v2968.f1, *(float*)&x38
);
};
var←c063 = b←v2968.f3;
/* removed tail goto */
(* (( (ptr) formal←c032)+3) ) = var←c063;
(* (( (ptr) formal←c032)+2) ) = var←c062;
(* (( (ptr) formal←c032)+1) ) = var←c061;
(* (ptr) formal←c032 ) = var←c060;
return;
}
static void IntersectBox←P300(formal←c040, a←v3072, b←v3100)
word formal←c040;
W4 a←v3072;
W4 b←v3100;
{
W4 c←v3144;
/* IntersectBox: */
SOURCE(1316, 527)
SOURCE(1380, 70)
{
word x39;
word x40;
if (((
x39 = a←v3072.f0, *(float*)&x39
) > (
x40 = a←v3072.f2, *(float*)&x40
))) {
SOURCE(1404, 46)
{
word t←v3876;
SOURCE(1405, 16)
t←v3876 = a←v3072.f0;
SOURCE(1423, 15)
a←v3072.f0 = a←v3072.f2;
SOURCE(1440, 10)
a←v3072.f2 = t←v3876;
};
};
};
SOURCE(1453, 70)
{
word x41;
word x42;
if (((
x41 = a←v3072.f1, *(float*)&x41
) > (
x42 = a←v3072.f3, *(float*)&x42
))) {
SOURCE(1477, 46)
{
word t←v3920;
SOURCE(1478, 16)
t←v3920 = a←v3072.f1;
SOURCE(1496, 15)
a←v3072.f1 = a←v3072.f3;
SOURCE(1513, 10)
a←v3072.f3 = t←v3920;
};
};
};
SOURCE(1526, 70)
{
word x43;
word x44;
if (((
x43 = b←v3100.f0, *(float*)&x43
) > (
x44 = b←v3100.f2, *(float*)&x44
))) {
SOURCE(1550, 46)
{
word t←v3964;
SOURCE(1551, 16)
t←v3964 = b←v3100.f0;
SOURCE(1569, 15)
b←v3100.f0 = b←v3100.f2;
SOURCE(1586, 10)
b←v3100.f2 = t←v3964;
};
};
};
SOURCE(1599, 70)
{
word x45;
word x46;
if (((
x45 = b←v3100.f1, *(float*)&x45
) > (
x46 = b←v3100.f3, *(float*)&x46
))) {
SOURCE(1623, 46)
{
word t←v4008;
SOURCE(1624, 16)
t←v4008 = b←v3100.f1;
SOURCE(1642, 15)
b←v3100.f1 = b←v3100.f3;
SOURCE(1659, 10)
b←v3100.f3 = t←v4008;
};
};
};
SOURCE(1672, 112)
{
word x47;
float tf48;
float tf49;
word x50;
float tf51;
c←v3144.f0 = (
tf51 = FMAX((
x47 = a←v3072.f0, *(float*)&x47
), (
x50 = b←v3100.f0, *(float*)&x50
), tf48, tf49), *(word*)&tf51
);
};
{
word x52;
float tf53;
float tf54;
word x55;
float tf56;
c←v3144.f1 = (
tf56 = FMAX((
x52 = a←v3072.f1, *(float*)&x52
), (
x55 = b←v3100.f1, *(float*)&x55
), tf53, tf54), *(word*)&tf56
);
};
{
word x57;
float tf58;
float tf59;
word x60;
float tf61;
c←v3144.f2 = (
tf61 = FMIN((
x57 = a←v3072.f2, *(float*)&x57
), (
x60 = b←v3100.f2, *(float*)&x60
), tf58, tf59), *(word*)&tf61
);
};
{
word x62;
float tf63;
float tf64;
word x65;
float tf66;
c←v3144.f3 = (
tf66 = FMIN((
x62 = a←v3072.f3, *(float*)&x62
), (
x65 = b←v3100.f3, *(float*)&x65
), tf63, tf64), *(word*)&tf66
);
};
SOURCE(1786, 57)
{
word x67;
word x68;
word x69;
word x70;
if (((
x67 = c←v3144.f0, *(float*)&x67
) >= (
x68 = c←v3144.f2, *(float*)&x68
)) || ((
x69 = c←v3144.f1, *(float*)&x69
) >= (
x70 = c←v3144.f3, *(float*)&x70
))) {
SOURCE(1827, 16)
c←v3144.f0 = (* (ptr) &fc71 );
c←v3144.f1 = (* (ptr) &fc71 );
c←v3144.f2 = (* (ptr) &fc71 );
c←v3144.f3 = (* (ptr) &fc71 );
};
};
/* removed tail goto */
(* (W4Pt) formal←c040 ) = c←v3144;
return;
}
static void BoundingBox←P360(formal←c048, a←v3204, b←v3232)
word formal←c048;
W4 a←v3204;
W4 b←v3232;
{
W4 c←v3276;
/* BoundingBox: */
SOURCE(1849, 467)
SOURCE(1912, 70)
{
word x72;
word x73;
if (((
x72 = a←v3204.f0, *(float*)&x72
) > (
x73 = a←v3204.f2, *(float*)&x73
))) {
SOURCE(1936, 46)
{
word t←v4052;
SOURCE(1937, 16)
t←v4052 = a←v3204.f0;
SOURCE(1955, 15)
a←v3204.f0 = a←v3204.f2;
SOURCE(1972, 10)
a←v3204.f2 = t←v4052;
};
};
};
SOURCE(1985, 70)
{
word x74;
word x75;
if (((
x74 = a←v3204.f1, *(float*)&x74
) > (
x75 = a←v3204.f3, *(float*)&x75
))) {
SOURCE(2009, 46)
{
word t←v4096;
SOURCE(2010, 16)
t←v4096 = a←v3204.f1;
SOURCE(2028, 15)
a←v3204.f1 = a←v3204.f3;
SOURCE(2045, 10)
a←v3204.f3 = t←v4096;
};
};
};
SOURCE(2058, 70)
{
word x76;
word x77;
if (((
x76 = b←v3232.f0, *(float*)&x76
) > (
x77 = b←v3232.f2, *(float*)&x77
))) {
SOURCE(2082, 46)
{
word t←v4140;
SOURCE(2083, 16)
t←v4140 = b←v3232.f0;
SOURCE(2101, 15)
b←v3232.f0 = b←v3232.f2;
SOURCE(2118, 10)
b←v3232.f2 = t←v4140;
};
};
};
SOURCE(2131, 70)
{
word x78;
word x79;
if (((
x78 = b←v3232.f1, *(float*)&x78
) > (
x79 = b←v3232.f3, *(float*)&x79
))) {
SOURCE(2155, 46)
{
word t←v4184;
SOURCE(2156, 16)
t←v4184 = b←v3232.f1;
SOURCE(2174, 15)
b←v3232.f1 = b←v3232.f3;
SOURCE(2191, 10)
b←v3232.f3 = t←v4184;
};
};
};
SOURCE(2204, 112)
{
word x80;
float tf81;
float tf82;
word x83;
float tf84;
c←v3276.f0 = (
tf84 = FMIN((
x80 = a←v3204.f0, *(float*)&x80
), (
x83 = b←v3232.f0, *(float*)&x83
), tf81, tf82), *(word*)&tf84
);
};
{
word x85;
float tf86;
float tf87;
word x88;
float tf89;
c←v3276.f1 = (
tf89 = FMIN((
x85 = a←v3204.f1, *(float*)&x85
), (
x88 = b←v3232.f1, *(float*)&x88
), tf86, tf87), *(word*)&tf89
);
};
{
word x90;
float tf91;
float tf92;
word x93;
float tf94;
c←v3276.f2 = (
tf94 = FMAX((
x90 = a←v3204.f2, *(float*)&x90
), (
x93 = b←v3232.f2, *(float*)&x93
), tf91, tf92), *(word*)&tf94
);
};
{
word x95;
float tf96;
float tf97;
word x98;
float tf99;
c←v3276.f3 = (
tf99 = FMAX((
x95 = a←v3204.f3, *(float*)&x95
), (
x98 = b←v3232.f3, *(float*)&x98
), tf96, tf97), *(word*)&tf99
);
};
/* removed tail goto */
(* (W4Pt) formal←c048 ) = c←v3276;
return;
}
static void BoundPoint←P420(formal←c054, a←v3336, b←v3364)
word formal←c054;
W4 a←v3336;
W2 b←v3364;
{
word var←c064;
word var←c065;
word var←c066;
word var←c067;
/* BoundPoint: */
SOURCE(2322, 310)
/* Return var split */
SOURCE(2381, 70)
{
word x100;
word x101;
if (((
x100 = a←v3336.f0, *(float*)&x100
) > (
x101 = a←v3336.f2, *(float*)&x101
))) {
SOURCE(2405, 46)
{
word t←v4228;
SOURCE(2406, 16)
t←v4228 = a←v3336.f0;
SOURCE(2424, 15)
a←v3336.f0 = a←v3336.f2;
SOURCE(2441, 10)
a←v3336.f2 = t←v4228;
};
};
};
SOURCE(2454, 70)
{
word x102;
word x103;
if (((
x102 = a←v3336.f1, *(float*)&x102
) > (
x103 = a←v3336.f3, *(float*)&x103
))) {
SOURCE(2478, 46)
{
word t←v4272;
SOURCE(2479, 16)
t←v4272 = a←v3336.f1;
SOURCE(2497, 15)
a←v3336.f1 = a←v3336.f3;
SOURCE(2514, 10)
a←v3336.f3 = t←v4272;
};
};
};
SOURCE(2527, 105)
{
word x104;
float tf105;
float tf106;
word x107;
float tf108;
var←c064 = (
tf108 = FMIN((
x104 = a←v3336.f0, *(float*)&x104
), (
x107 = b←v3364.f0, *(float*)&x107
), tf105, tf106), *(word*)&tf108
);
};
{
word x109;
float tf110;
float tf111;
word x112;
float tf113;
var←c065 = (
tf113 = FMIN((
x109 = a←v3336.f1, *(float*)&x109
), (
x112 = b←v3364.f1, *(float*)&x112
), tf110, tf111), *(word*)&tf113
);
};
{
word x114;
float tf115;
float tf116;
word x117;
float tf118;
var←c066 = (
tf118 = FMAX((
x114 = a←v3336.f2, *(float*)&x114
), (
x117 = b←v3364.f0, *(float*)&x117
), tf115, tf116), *(word*)&tf118
);
};
{
word x119;
float tf120;
float tf121;
word x122;
float tf123;
var←c067 = (
tf123 = FMAX((
x119 = a←v3336.f3, *(float*)&x119
), (
x122 = b←v3364.f1, *(float*)&x122
), tf120, tf121), *(word*)&tf123
);
};
/* removed tail goto */
(* (( (ptr) formal←c054)+3) ) = var←c067;
(* (( (ptr) formal←c054)+2) ) = var←c066;
(* (( (ptr) formal←c054)+1) ) = var←c065;
(* (ptr) formal←c054 ) = var←c064;
return;
}
/* file: ImagerBoxImpl, module: ImagerBoxImpl, compiled at: July 28, 1993 10:14:14 am PDT */
extern void XR←install←ImagerBoxImpl() {
NoName←Q1368();
}
extern void XR←run←ImagerBoxImpl() { XR←Start(&globalframe); }