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