/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: October 28, 1993 1:00:16 pm PDT */ /* C2C version: April 20, 1993 (sun4) */ /* ref-counting: off */ /* file: ImagerDeviceColorImpl, module: ImagerDeviceColorImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [956162829,665599562] ImagerDeviceColorImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); #define SOURCE(p, l) /* source p, l */ static float fc13 = 0.0; #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) ) static float fc17 = 1.0; #define FMIN(x, y, tx, ty) ( (tx=((float) x)) <= (ty=((float) y)) ? tx : ty ) static void NoName←Q2256(); static void ImagerDeviceColorImpl←P0(); static word GetDeviceColorControl←P60(); static void DefaultSetLookupTable←P120(); static word LookupReal←P180(); static word LookupFlipped←P240(); static void CMYKFromCMYK←P300(); static void CMYKFromCMY←P360(); static void CMYKFromRGB←P420(); static void RGBFromRGB←P480(); static void RGBFromCMYK←P540(); static void YFromY←P600(); static void KFromY←P660(); static void CMYKFromY←P720(); static struct {unsigned f; char r[4];} string1 = {131076, "\216\251\000"}; static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\362\033\246\002\300\160\342\266\057\100\214\000\000"}; static struct {unsigned f; char r[4];} string4 = {196611, "\004q\377"}; static struct {unsigned f; char r[20];} string5 = {1179668, "DeviceColorControl\000"}; static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\070\375\343\015\300\047\254\076\112\100\164\000\000"}; static struct {unsigned f; char r[4];} string7 = {131074, "\003\013\000"}; static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\240\236\274\171\300\344\000\142\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\362\033\246\002\300\160\342\266\057\100\150\000\000"}; static struct { word f0[12]; word f12; word f13; word f14; word f15; word f16; word f17; word f18; word f19; word f20; word f21; word f22; word f23; word f24; word f25; word f26; word f27; word f28; word f29; word f30; word f31; word f32; word f33; word f34; word f35; word f36; word f37[3]; } globalframe = { {0}, (word) CMYKFromY←P720, 0, (word) KFromY←P660, 0, (word) YFromY←P600, 0, (word) RGBFromCMYK←P540, 0, (word) RGBFromRGB←P480, 0, (word) CMYKFromRGB←P420, 0, (word) CMYKFromCMY←P360, 0, (word) CMYKFromCMYK←P300, 0, (word) LookupFlipped←P240, 0, (word) LookupReal←P180, 0, (word) DefaultSetLookupTable←P120, 0, (word) GetDeviceColorControl←P60, 0, (word) ImagerDeviceColorImpl←P0, {0} }; static void NoName←Q2256() { register ptr gf←c0147 = (ptr) &globalframe; word var←c11812; (* (( (ptr) gf←c0147)+4) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf←c0147)+7) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4); (* (ptr) (( (bPt) gf←c0147)+44) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0147)+4) ), (word) &string5); (void) XR←DeclareGlobalFrame((word) "ImagerDeviceColorImpl", &globalframe, (word) XR←GetTypeIndex((word) &string6, 0, (word) &string7) , (word) (( (bPt) gf←c0147)+144)/* var←c10692 */ ); var←c11812 = (word) XR←ImportInterface((word) "Prop", (word) XR←GetTypeIndexS((word) (&string8)), 4); (* (( (ptr) gf←c0147)+38)/* var←c10724 */ ) = var←c11812; (void) XR←ImportProcS(var←c11812, 67895299); (void) XR←ImportProcS(var←c11812, 67633410); var←c11812 = (word) XR←ExportInterface((word) "ImagerDeviceColor", (word) XR←GetTypeIndexS((word) (&string9)), 14); (* (( (ptr) gf←c0147)+39)/* var←c11844 */ ) = var←c11812; (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+136)/* var←c10660 */ , 67371265, (word) "GetDeviceColorControl") ; (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+128)/* var←c10628 */ , 787203, (word) "DefaultSetLookupTable") ; (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+120)/* var←c10596 */ , 67634178, (word) "LookupReal"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+112)/* var←c10564 */ , 67634434, (word) "LookupFlipped"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+104)/* var←c10532 */ , 1836551, (word) "CMYKFromCMYK"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+96)/* var←c10500 */ , 1574662, (word) "CMYKFromCMY"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+88)/* var←c10468 */ , 1574918, (word) "CMYKFromRGB"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+80)/* var←c10436 */ , 1575174, (word) "RGBFromRGB"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+72)/* var←c10404 */ , 1837575, (word) "RGBFromCMYK"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+64)/* var←c10372 */ , 1051396, (word) "YFromY"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+48)/* var←c10308 */ , 1051652, (word) "CMYKFromY"); (void) XR←ExportProcS(var←c11812, (word) (( (bPt) gf←c0147)+56)/* var←c10340 */ , 1051908, (word) "KFromY"); } static void ImagerDeviceColorImpl←P0(formal←c020, formal←c019) word formal←c020; word formal←c019; { /* ImagerDeviceColorImpl: */ } static word GetDeviceColorControl←P60(device←v3160) word device←v3160; { register ptr gf←c11876 = (ptr) &globalframe; word var←c3204; /* GetDeviceColorControl: */ SOURCE(548, 458) SOURCE(679, 327) { word var←c10756; { word pd10; pd10 = (* (( (ptr) (* (( (ptr) gf←c11876)+38)/* var←c10724 */ ))+5) ); var←c10756 = (word) ( *( (fPt) ((* (ptr) pd10 ))))((* (( (ptr) (* (( (ptr) device←v3160)+5) ))+9) ), (* (( (ptr) gf←c11876)+11) ), pd10); }; if ((var←c10756 == 0)) { goto lab←L100000; }; if (((* (( (ptr) gf←c11876)+7) ) == XR←GetReferentType(var←c10756))) { { word control←v5144; control←v5144 = var←c10756; SOURCE(763, 16) return(control←v5144); }; } else { lab←L100000: ; SOURCE(792, 216) { word control←v5188; SOURCE(794, 125) control←v5188 = XR←NewObject(56, (* (( (ptr) gf←c11876)+7) )); (* (( (ptr) control←v5188)+9) ) = 1; (* (( (ptr) control←v5188)+10) ) = (word) (( (bPt) gf←c11876)+128)/* var←c10628 */ ; SOURCE(921, 67) { word pd11; pd11 = (* (( (ptr) (* (( (ptr) gf←c11876)+38)/* var←c10724 */ ))+4) ); (* (( (ptr) (* (( (ptr) device←v3160)+5) ))+9) ) = (word) ( *( (fPt) ((* (ptr) pd11 ))))((* (( (ptr) (* (( (ptr) device←v3160)+5) ))+9) ), (* (( (ptr) gf←c11876)+11) ), control←v5188, pd11); }; SOURCE(990, 16) return(control←v5188); }; }; }; } static void DefaultSetLookupTable←P120(control←v3264, which←v3292, table←v3320) word control←v3264; word which←v3292; word table←v3320; { word ident←v5232 = 1; /* DefaultSetLookupTable: */ SOURCE(1015, 436) SOURCE(1153, 50) if ( ( (table←v3320 != 0) ? ((* (ptr) table←v3320 ) == 0) : 0 ) ) { SOURCE(1192, 11) table←v3320 = 0; }; SOURCE(1234, 28) (* (( (ptr) control←v3264)+which←v3292) ) = table←v3320; SOURCE(1264, 107) { register word i←v5276 = 0; lab←L100004: ; SOURCE(1326, 45) if (((* (( (ptr) control←v3264)+i←v5276) ) != 0)) { SOURCE(1358, 13) ident←v5232 = 0; SOURCE(1373, 4) goto lab←L100002; }; if ((i←v5276 >= 3)) { goto lab←L100001; }; i←v5276 = (i←v5276 + 1); goto lab←L100004; lab←L100001: ; lab←L100002: ; }; SOURCE(1389, 27) (* (( (ptr) control←v3264)+9) ) = ident←v5232; SOURCE(1418, 33) (* (( (ptr) control←v3264)+11) ) = ((* (( (ptr) control←v3264)+11) ) + 1); } static word LookupReal←P180(table←v3380, real←v3408) word table←v3380; word real←v3408; { word var←c3452; /* LookupReal: */ SOURCE(1457, 491) SOURCE(1533, 415) if ((table←v3380 == 0)) { SOURCE(1553, 19) return(real←v3408); } else { SOURCE(1572, 379) { word limit←v5320; SOURCE(1574, 25) limit←v5320 = ((* (ptr) table←v3380 ) - 1); SOURCE(1601, 347) { word x12; word x14; if ((( x12 = real←v3408, *(float*)&x12 ) <= ( x14 = (* (ptr) &fc13 ), *(float*)&x14 ))) { SOURCE(1621, 24) { word limit15; return((* ((( (ptr) table←v3380)+1)+( limit15 = (* (ptr) table←v3380 ), BCK(0, limit15) )) )); }; } else { SOURCE(1645, 303) { word x16; word x18; if ((( x16 = real←v3408, *(float*)&x16 ) >= ( x18 = (* (ptr) &fc17 ), *(float*)&x18 ))) { SOURCE(1665, 27) { word limit19; return((* ((( (ptr) table←v3380)+1)+( /*1*/ limit19 = (* (ptr) table←v3380 ), /*1*/ BCK(limit←v5320, limit19) /*1*/ )) )); }; } else { SOURCE(1692, 256) if (( (unsigned) (((unsigned)real←v3408 << 1) >> 24) == 255)) { SOURCE(1729, 19) return(real←v3408); } else { SOURCE(1748, 200) { word s←v5364; word k←v5392; word d←v5420; word v←v5448; SOURCE(1750, 20) { /*1*/ word x20; /*1*/ *(float*)&s←v5364 = (float)(int)limit←v5320 * ( /*1*/ x20 = real←v3408, *(float*)&x20 /*1*/ ); /*1*/ }; SOURCE(1772, 28) k←v5392 = (word) XR←REAL32←Fix(s←v5364); SOURCE(1837, 19) { /*1*/ word x21; /*1*/ *(float*)&d←v5420 = ( /*1*/ x21 = s←v5364, *(float*)&x21 /*1*/ ) - (float)(int)k←v5392; /*1*/ }; SOURCE(1858, 18) { /*1*/ word limit22; /*1*/ v←v5448 = (* ((( (ptr) table←v3380)+1)+( /*1*/ limit22 = (* (ptr) table←v3380 ), /*1*/ BCK(k←v5392, limit22) /*1*/ )) ); /*1*/ }; SOURCE(1878, 70) { /*1*/ word x23; /*1*/ word x24; /*1*/ if ((( /*1*/ x23 = d←v5420, *(float*)&x23 /*1*/ ) <= ( /*1*/ x24 = (* (ptr) &fc13 ), *(float*)&x24 /*1*/ )) || ( (int)k←v5392 >= (int)limit←v5320)) { /*1*/ return(v←v5448); /*1*/ } /*1*/ else { /*1*/ { /*1*/ word var←c0152; /*1*/ { /*1*/ word var←c10820; /*1*/ word var←c0149; /*1*/ word var←c0150; /*1*/ word var←c0151; /*1*/ var←c10820 = (k←v5392 + 1); /*1*/ { /*1*/ word limit25; /*1*/ var←c0149 = (* ((( (ptr) table←v3380)+1)+( /*1*/ limit25 = (* (ptr) table←v3380 ), /*1*/ BCK(var←c10820, limit25) /*1*/ )) ); /*1*/ }; /*1*/ { /*1*/ word x26; /*1*/ word x27; /*1*/ *(float*)&var←c0150 = ( /*1*/ x26 = var←c0149, *(float*)&x26 /*1*/ ) - ( /*1*/ x27 = v←v5448, *(float*)&x27 /*1*/ ); /*1*/ }; /*1*/ { /*1*/ word x28; /*1*/ word x29; /*1*/ *(float*)&var←c0151 = ( /*1*/ x28 = d←v5420, *(float*)&x28 /*1*/ ) * ( /*1*/ x29 = var←c0150, *(float*)&x29 /*1*/ ); /*1*/ }; /*1*/ { /*1*/ word x30; /*1*/ word x31; /*1*/ *(float*)&var←c0152 = ( /*1*/ x30 = v←v5448, *(float*)&x30 /*1*/ ) + ( /*1*/ x31 = var←c0151, *(float*)&x31 /*1*/ ); /*1*/ }; /*1*/ }; /*1*/ return(var←c0152); /*1*/ }; /*1*/ }; /*1*/ }; }; }; }; }; }; }; }; }; } static word LookupFlipped←P240(table←v3512, real←v3540) word table←v3512; word real←v3540; { word var←c3584; /* LookupFlipped: */ SOURCE(1958, 525) SOURCE(2037, 446) if ((table←v3512 == 0)) { SOURCE(2057, 19) return(real←v3540); } else { SOURCE(2076, 410) { word limit←v5492; SOURCE(2078, 25) limit←v5492 = ((* (ptr) table←v3512 ) - 1); SOURCE(2105, 15) { word x32; word x33; *(float*)&real←v3540 = ( x32 = (* (ptr) &fc17 ), *(float*)&x32 ) - ( x33 = real←v3540, *(float*)&x33 ); }; SOURCE(2122, 361) { word x34; word x35; if ((( x34 = real←v3540, *(float*)&x34 ) <= ( x35 = (* (ptr) &fc13 ), *(float*)&x35 ))) { SOURCE(2142, 28) { word x36; word limit37; word x38; float tf39; return(( tf39 = ( x36 = (* (ptr) &fc17 ), *(float*)&x36 ) - ( x38 = (* ((( (ptr) table←v3512)+1)+( /*1*/ limit37 = (* (ptr) table←v3512 ), /*1*/ BCK(0, limit37) /*1*/ )) ), *(float*)&x38 ), *(word*)&tf39 )); }; } else { SOURCE(2170, 313) { word x40; word x41; if ((( x40 = real←v3540, *(float*)&x40 ) >= ( x41 = (* (ptr) &fc17 ), *(float*)&x41 ))) { SOURCE(2190, 31) { word x42; word limit43; word x44; float tf45; return(( tf45 = ( /*1*/ x42 = (* (ptr) &fc17 ), *(float*)&x42 /*1*/ ) - ( /*1*/ x44 = (* ((( (ptr) table←v3512)+1)+( /*1*/ limit43 = (* (ptr) table←v3512 ), /*1*/ BCK(limit←v5492, limit43) /*1*/ )) ), *(float*)&x44 /*1*/ ), *(word*)&tf45 )); }; } else { SOURCE(2221, 262) if (( (unsigned) (((unsigned)real←v3540 << 1) >> 24) == 255)) { SOURCE(2258, 19) return(real←v3540); } else { SOURCE(2277, 206) { word s←v5536; word k←v5564; word d←v5592; word v←v5620; SOURCE(2279, 20) { /*1*/ word x46; /*1*/ *(float*)&s←v5536 = (float)(int)limit←v5492 * ( /*1*/ x46 = real←v3540, *(float*)&x46 /*1*/ ); /*1*/ }; SOURCE(2301, 28) k←v5564 = (word) XR←REAL32←Fix(s←v5536); SOURCE(2366, 19) { /*1*/ word x47; /*1*/ *(float*)&d←v5592 = ( /*1*/ x47 = s←v5536, *(float*)&x47 /*1*/ ) - (float)(int)k←v5564; /*1*/ }; SOURCE(2387, 18) { /*1*/ word limit48; /*1*/ v←v5620 = (* ((( (ptr) table←v3512)+1)+( /*1*/ limit48 = (* (ptr) table←v3512 ), /*1*/ BCK(k←v5564, limit48) /*1*/ )) ); /*1*/ }; SOURCE(2407, 76) { /*1*/ word var←c0157; /*1*/ { /*1*/ word var←c0156; /*1*/ { /*1*/ word x49; /*1*/ word x50; /*1*/ if ((( /*1*/ x49 = d←v5592, *(float*)&x49 /*1*/ ) <= ( /*1*/ x50 = (* (ptr) &fc13 ), *(float*)&x50 /*1*/ )) || ( (int)k←v5564 >= (int)limit←v5492)) { /*1*/ var←c0156 = v←v5620; /*1*/ } /*1*/ else { /*1*/ { /*1*/ word var←c10852; /*1*/ word var←c0153; /*1*/ word var←c0154; /*1*/ word var←c0155; /*1*/ var←c10852 = (k←v5564 + 1); /*1*/ { /*1*/ word limit51; /*1*/ var←c0153 = (* ((( (ptr) table←v3512)+1)+( /*1*/ limit51 = (* (ptr) table←v3512 ), /*1*/ BCK(var←c10852, limit51) /*1*/ )) ); /*1*/ }; /*1*/ { /*1*/ word x52; /*1*/ word x53; /*1*/ *(float*)&var←c0154 = ( /*1*/ x52 = var←c0153, *(float*)&x52 /*1*/ ) - ( /*1*/ x53 = v←v5620, *(float*)&x53 /*1*/ ); /*1*/ }; /*1*/ { /*1*/ word x54; /*1*/ word x55; /*1*/ *(float*)&var←c0155 = ( /*1*/ x54 = d←v5592, *(float*)&x54 /*1*/ ) * ( /*1*/ x55 = var←c0154, *(float*)&x55 /*1*/ ); /*1*/ }; /*1*/ { /*1*/ word x56; /*1*/ word x57; /*1*/ *(float*)&var←c0156 = ( /*1*/ x56 = v←v5620, *(float*)&x56 /*1*/ ) + ( /*1*/ x57 = var←c0155, *(float*)&x57 /*1*/ ); /*1*/ }; /*1*/ }; /*1*/ }; /*1*/ }; /*1*/ { /*1*/ word x58; /*1*/ word x59; /*1*/ *(float*)&var←c0157 = ( /*1*/ x58 = (* (ptr) &fc17 ), *(float*)&x58 /*1*/ ) - ( /*1*/ x59 = var←c0156, *(float*)&x59 /*1*/ ); /*1*/ }; /*1*/ }; /*1*/ return(var←c0157); /*1*/ }; }; }; }; }; }; }; }; }; } static void CMYKFromCMYK←P300(control←v3644, c←v3672, m←v3700, y←v3728, k←v3756, maxOut←v3784, out←v3812) word control←v3644; word c←v3672; word m←v3700; word y←v3728; word k←v3756; word maxOut←v3784; word out←v3812; { word oog←v5664 = 0; /* CMYKFromCMYK: */ SOURCE(2543, 559) SOURCE(2834, 60) { word var←c10884; { word var←c10916; word r←v9780; r←v9780 = (word) LookupFlipped←P240((* (ptr) control←v3644 ), c←v3672); SOURCE(2716, 14) { word x60; word x61; *(float*)&r←v9780 = ( x60 = r←v9780, *(float*)&x60 ) * ( x61 = maxOut←v3784, *(float*)&x61 ); }; SOURCE(2732, 85) { word x62; word x63; if ((( x62 = r←v9780, *(float*)&x62 ) < ( x63 = (* (ptr) &fc13 ), *(float*)&x63 ))) { SOURCE(2749, 10) oog←v5664 = 1; SOURCE(2761, 7) r←v9780 = (* (ptr) &fc13 ); } else { SOURCE(2775, 42) { word x64; word x65; if ((( x64 = r←v9780, *(float*)&x64 ) > ( x65 = maxOut←v3784, *(float*)&x65 ))) { SOURCE(2795, 10) oog←v5664 = 1; SOURCE(2807, 10) r←v9780 = maxOut←v3784; }; }; }; }; SOURCE(2820, 11) var←c10916 = r←v9780; var←c10884 = var←c10916; }; { word limit66; (* ((( (ptr) out←v3812)+2)+( limit66 = (* (( (ptr) out←v3812)+1) ), BCK(0, limit66) )) ) = var←c10884; }; }; SOURCE(2896, 60) { word var←c10948; { word var←c10980; word r←v9732; r←v9732 = (word) LookupFlipped←P240((* (( (ptr) control←v3644)+1) ), m←v3700); SOURCE(2716, 14) { word x67; word x68; *(float*)&r←v9732 = ( x67 = r←v9732, *(float*)&x67 ) * ( x68 = maxOut←v3784, *(float*)&x68 ); }; SOURCE(2732, 85) { word x69; word x70; if ((( x69 = r←v9732, *(float*)&x69 ) < ( x70 = (* (ptr) &fc13 ), *(float*)&x70 ))) { SOURCE(2749, 10) oog←v5664 = 1; SOURCE(2761, 7) r←v9732 = (* (ptr) &fc13 ); } else { SOURCE(2775, 42) { word x71; word x72; if ((( x71 = r←v9732, *(float*)&x71 ) > ( x72 = maxOut←v3784, *(float*)&x72 ))) { SOURCE(2795, 10) oog←v5664 = 1; SOURCE(2807, 10) r←v9732 = maxOut←v3784; }; }; }; }; SOURCE(2820, 11) var←c10980 = r←v9732; var←c10948 = var←c10980; }; { word limit73; (* ((( (ptr) out←v3812)+2)+( limit73 = (* (( (ptr) out←v3812)+1) ), BCK(1, limit73) )) ) = var←c10948; }; }; SOURCE(2958, 60) { word var←c11012; { word var←c11044; word r←v9684; r←v9684 = (word) LookupFlipped←P240((* (( (ptr) control←v3644)+2) ), y←v3728); SOURCE(2716, 14) { word x74; word x75; *(float*)&r←v9684 = ( x74 = r←v9684, *(float*)&x74 ) * ( x75 = maxOut←v3784, *(float*)&x75 ); }; SOURCE(2732, 85) { word x76; word x77; if ((( x76 = r←v9684, *(float*)&x76 ) < ( x77 = (* (ptr) &fc13 ), *(float*)&x77 ))) { SOURCE(2749, 10) oog←v5664 = 1; SOURCE(2761, 7) r←v9684 = (* (ptr) &fc13 ); } else { SOURCE(2775, 42) { word x78; word x79; if ((( x78 = r←v9684, *(float*)&x78 ) > ( x79 = maxOut←v3784, *(float*)&x79 ))) { SOURCE(2795, 10) oog←v5664 = 1; SOURCE(2807, 10) r←v9684 = maxOut←v3784; }; }; }; }; SOURCE(2820, 11) var←c11044 = r←v9684; var←c11012 = var←c11044; }; { word limit80; (* ((( (ptr) out←v3812)+2)+( limit80 = (* (( (ptr) out←v3812)+1) ), BCK(2, limit80) )) ) = var←c11012; }; }; SOURCE(3020, 60) { word var←c11076; { word var←c11108; word r←v9636; r←v9636 = (word) LookupFlipped←P240((* (( (ptr) control←v3644)+3) ), k←v3756); SOURCE(2716, 14) { word x81; word x82; *(float*)&r←v9636 = ( x81 = r←v9636, *(float*)&x81 ) * ( x82 = maxOut←v3784, *(float*)&x82 ); }; SOURCE(2732, 85) { word x83; word x84; if ((( x83 = r←v9636, *(float*)&x83 ) < ( x84 = (* (ptr) &fc13 ), *(float*)&x84 ))) { SOURCE(2749, 10) oog←v5664 = 1; SOURCE(2761, 7) r←v9636 = (* (ptr) &fc13 ); } else { SOURCE(2775, 42) { word x85; word x86; if ((( x85 = r←v9636, *(float*)&x85 ) > ( x86 = maxOut←v3784, *(float*)&x86 ))) { SOURCE(2795, 10) oog←v5664 = 1; SOURCE(2807, 10) r←v9636 = maxOut←v3784; }; }; }; }; SOURCE(2820, 11) var←c11108 = r←v9636; var←c11076 = var←c11108; }; { word limit87; (* ((( (ptr) out←v3812)+2)+( limit87 = (* (( (ptr) out←v3812)+1) ), BCK(3, limit87) )) ) = var←c11076; }; }; SOURCE(3082, 20) (* (ptr) out←v3812 ) = oog←v5664; } static void CMYKFromCMY←P360(control←v3872, c←v3900, m←v3928, y←v3956, maxOut←v3984, out←v4012) word control←v3872; word c←v3900; word m←v3928; word y←v3956; word maxOut←v3984; word out←v4012; { word oog←v5840 = 0; word bg←v5896; word ucr←v5924; word min←v5952; word k←v5980; /* CMYKFromCMY: */ SOURCE(3108, 831) SOURCE(3395, 49) bg←v5896 = (* (( (ptr) control←v3872)+4) ); SOURCE(3446, 52) ucr←v5924 = (* (( (ptr) control←v3872)+5) ); SOURCE(3500, 24) { word x88; float tf89; float tf90; word x91; float tf92; float tf93; float tf94; word x95; float tf96; tf92 = FMIN(( x88 = c←v3900, *(float*)&x88 ), ( x91 = m←v3928, *(float*)&x91 ), tf89, tf90); min←v5952 = ( tf96 = FMIN(tf92, ( x95 = y←v3956, *(float*)&x95 ), tf93, tf94), *(word*)&tf96 ); }; SOURCE(3526, 55) k←v5980 = ( (bg←v5896 == 0) ? (* (ptr) &fc13 ) : (word) LookupReal←P180(bg←v5896, min←v5952) ) ; SOURCE(3583, 83) if ((ucr←v5924 != 0)) { SOURCE(3601, 67) { word u←v6128; SOURCE(3603, 30) u←v6128 = (word) LookupReal←P180(ucr←v5924, min←v5952); SOURCE(3635, 9) { word x97; word x98; *(float*)&c←v3900 = ( x97 = c←v3900, *(float*)&x97 ) - ( x98 = u←v6128, *(float*)&x98 ); }; SOURCE(3646, 9) { word x99; word x100; *(float*)&m←v3928 = ( x99 = m←v3928, *(float*)&x99 ) - ( x100 = u←v6128, *(float*)&x100 ); }; SOURCE(3657, 9) { word x101; word x102; *(float*)&k←v5980 = ( x101 = k←v5980, *(float*)&x101 ) - ( x102 = u←v6128, *(float*)&x102 ); }; }; }; SOURCE(3671, 60) { word var←c11140; { word var←c11172; word r←v9972; r←v9972 = (word) LookupFlipped←P240((* (ptr) control←v3872 ), c←v3900); SOURCE(3277, 14) { word x103; word x104; *(float*)&r←v9972 = ( x103 = r←v9972, *(float*)&x103 ) * ( x104 = maxOut←v3984, *(float*)&x104 ); }; SOURCE(3293, 85) { word x105; word x106; if ((( x105 = r←v9972, *(float*)&x105 ) < ( x106 = (* (ptr) &fc13 ), *(float*)&x106 ))) { SOURCE(3310, 10) oog←v5840 = 1; SOURCE(3322, 7) r←v9972 = (* (ptr) &fc13 ); } else { SOURCE(3336, 42) { word x107; word x108; if ((( x107 = r←v9972, *(float*)&x107 ) > ( x108 = maxOut←v3984, *(float*)&x108 ))) { SOURCE(3356, 10) oog←v5840 = 1; SOURCE(3368, 10) r←v9972 = maxOut←v3984; }; }; }; }; SOURCE(3381, 11) var←c11172 = r←v9972; var←c11140 = var←c11172; }; { word limit109; (* ((( (ptr) out←v4012)+2)+( limit109 = (* (( (ptr) out←v4012)+1) ), BCK(0, limit109) )) ) = var←c11140; }; }; SOURCE(3733, 60) { word var←c11204; { word var←c11236; word r←v9924; r←v9924 = (word) LookupFlipped←P240((* (( (ptr) control←v3872)+1) ), m←v3928); SOURCE(3277, 14) { word x110; word x111; *(float*)&r←v9924 = ( x110 = r←v9924, *(float*)&x110 ) * ( x111 = maxOut←v3984, *(float*)&x111 ); }; SOURCE(3293, 85) { word x112; word x113; if ((( x112 = r←v9924, *(float*)&x112 ) < ( x113 = (* (ptr) &fc13 ), *(float*)&x113 ))) { SOURCE(3310, 10) oog←v5840 = 1; SOURCE(3322, 7) r←v9924 = (* (ptr) &fc13 ); } else { SOURCE(3336, 42) { word x114; word x115; if ((( x114 = r←v9924, *(float*)&x114 ) > ( x115 = maxOut←v3984, *(float*)&x115 ))) { SOURCE(3356, 10) oog←v5840 = 1; SOURCE(3368, 10) r←v9924 = maxOut←v3984; }; }; }; }; SOURCE(3381, 11) var←c11236 = r←v9924; var←c11204 = var←c11236; }; { word limit116; (* ((( (ptr) out←v4012)+2)+( limit116 = (* (( (ptr) out←v4012)+1) ), BCK(1, limit116) )) ) = var←c11204; }; }; SOURCE(3795, 60) { word var←c11268; { word var←c11300; word r←v9876; r←v9876 = (word) LookupFlipped←P240((* (( (ptr) control←v3872)+2) ), y←v3956); SOURCE(3277, 14) { word x117; word x118; *(float*)&r←v9876 = ( x117 = r←v9876, *(float*)&x117 ) * ( x118 = maxOut←v3984, *(float*)&x118 ); }; SOURCE(3293, 85) { word x119; word x120; if ((( x119 = r←v9876, *(float*)&x119 ) < ( x120 = (* (ptr) &fc13 ), *(float*)&x120 ))) { SOURCE(3310, 10) oog←v5840 = 1; SOURCE(3322, 7) r←v9876 = (* (ptr) &fc13 ); } else { SOURCE(3336, 42) { word x121; word x122; if ((( x121 = r←v9876, *(float*)&x121 ) > ( x122 = maxOut←v3984, *(float*)&x122 ))) { SOURCE(3356, 10) oog←v5840 = 1; SOURCE(3368, 10) r←v9876 = maxOut←v3984; }; }; }; }; SOURCE(3381, 11) var←c11300 = r←v9876; var←c11268 = var←c11300; }; { word limit123; (* ((( (ptr) out←v4012)+2)+( limit123 = (* (( (ptr) out←v4012)+1) ), BCK(2, limit123) )) ) = var←c11268; }; }; SOURCE(3857, 60) { word var←c11332; { word var←c11364; word r←v9828; r←v9828 = (word) LookupFlipped←P240((* (( (ptr) control←v3872)+3) ), k←v5980); SOURCE(3277, 14) { word x124; word x125; *(float*)&r←v9828 = ( x124 = r←v9828, *(float*)&x124 ) * ( x125 = maxOut←v3984, *(float*)&x125 ); }; SOURCE(3293, 85) { word x126; word x127; if ((( x126 = r←v9828, *(float*)&x126 ) < ( x127 = (* (ptr) &fc13 ), *(float*)&x127 ))) { SOURCE(3310, 10) oog←v5840 = 1; SOURCE(3322, 7) r←v9828 = (* (ptr) &fc13 ); } else { SOURCE(3336, 42) { word x128; word x129; if ((( x128 = r←v9828, *(float*)&x128 ) > ( x129 = maxOut←v3984, *(float*)&x129 ))) { SOURCE(3356, 10) oog←v5840 = 1; SOURCE(3368, 10) r←v9828 = maxOut←v3984; }; }; }; }; SOURCE(3381, 11) var←c11364 = r←v9828; var←c11332 = var←c11364; }; { word limit130; (* ((( (ptr) out←v4012)+2)+( limit130 = (* (( (ptr) out←v4012)+1) ), BCK(3, limit130) )) ) = var←c11332; }; }; SOURCE(3919, 20) (* (ptr) out←v4012 ) = oog←v5840; } static void CMYKFromRGB←P420(control←v4072, r←v4100, g←v4128, b←v4156, maxOut←v4184, out←v4212) word control←v4072; word r←v4100; word g←v4128; word b←v4156; word maxOut←v4184; word out←v4212; { /* CMYKFromRGB: */ SOURCE(3945, 159) SOURCE(4050, 54) { word x131; word x132; float tf133; word x134; word x135; float tf136; word x137; word x138; float tf139; (void) CMYKFromCMY←P360(control←v4072, ( tf133 = ( x131 = (* (ptr) &fc17 ), *(float*)&x131 ) - ( x132 = r←v4100, *(float*)&x132 ), *(word*)&tf133 ), ( tf136 = ( x134 = (* (ptr) &fc17 ), *(float*)&x134 ) - ( x135 = g←v4128, *(float*)&x135 ), *(word*)&tf136 ), ( tf139 = ( x137 = (* (ptr) &fc17 ), *(float*)&x137 ) - ( x138 = b←v4156, *(float*)&x138 ), *(word*)&tf139 ), maxOut←v4184, out←v4212); }; } static void RGBFromRGB←P480(control←v4272, r←v4300, g←v4328, b←v4356, maxOut←v4384, out←v4412) word control←v4272; word r←v4300; word g←v4328; word b←v4356; word maxOut←v4384; word out←v4412; { word oog←v6172 = 0; /* RGBFromRGB: */ SOURCE(4110, 483) SOURCE(4396, 57) { word var←c11396; { word var←c11428; word r←v10116; r←v10116 = (word) LookupReal←P180((* (ptr) control←v4272 ), r←v4300); SOURCE(4278, 14) { word x140; word x141; *(float*)&r←v10116 = ( x140 = r←v10116, *(float*)&x140 ) * ( x141 = maxOut←v4384, *(float*)&x141 ); }; SOURCE(4294, 85) { word x142; word x143; if ((( x142 = r←v10116, *(float*)&x142 ) < ( x143 = (* (ptr) &fc13 ), *(float*)&x143 ))) { SOURCE(4311, 10) oog←v6172 = 1; SOURCE(4323, 7) r←v10116 = (* (ptr) &fc13 ); } else { SOURCE(4337, 42) { word x144; word x145; if ((( x144 = r←v10116, *(float*)&x144 ) > ( x145 = maxOut←v4384, *(float*)&x145 ))) { SOURCE(4357, 10) oog←v6172 = 1; SOURCE(4369, 10) r←v10116 = maxOut←v4384; }; }; }; }; SOURCE(4382, 11) var←c11428 = r←v10116; var←c11396 = var←c11428; }; { word limit146; (* ((( (ptr) out←v4412)+2)+( limit146 = (* (( (ptr) out←v4412)+1) ), BCK(0, limit146) )) ) = var←c11396; }; }; SOURCE(4455, 57) { word var←c11460; { word var←c11492; word r←v10068; r←v10068 = (word) LookupReal←P180((* (( (ptr) control←v4272)+1) ), g←v4328); SOURCE(4278, 14) { word x147; word x148; *(float*)&r←v10068 = ( x147 = r←v10068, *(float*)&x147 ) * ( x148 = maxOut←v4384, *(float*)&x148 ); }; SOURCE(4294, 85) { word x149; word x150; if ((( x149 = r←v10068, *(float*)&x149 ) < ( x150 = (* (ptr) &fc13 ), *(float*)&x150 ))) { SOURCE(4311, 10) oog←v6172 = 1; SOURCE(4323, 7) r←v10068 = (* (ptr) &fc13 ); } else { SOURCE(4337, 42) { word x151; word x152; if ((( x151 = r←v10068, *(float*)&x151 ) > ( x152 = maxOut←v4384, *(float*)&x152 ))) { SOURCE(4357, 10) oog←v6172 = 1; SOURCE(4369, 10) r←v10068 = maxOut←v4384; }; }; }; }; SOURCE(4382, 11) var←c11492 = r←v10068; var←c11460 = var←c11492; }; { word limit153; (* ((( (ptr) out←v4412)+2)+( limit153 = (* (( (ptr) out←v4412)+1) ), BCK(1, limit153) )) ) = var←c11460; }; }; SOURCE(4514, 57) { word var←c11524; { word var←c11556; word r←v10020; r←v10020 = (word) LookupReal←P180((* (( (ptr) control←v4272)+2) ), b←v4356); SOURCE(4278, 14) { word x154; word x155; *(float*)&r←v10020 = ( x154 = r←v10020, *(float*)&x154 ) * ( x155 = maxOut←v4384, *(float*)&x155 ); }; SOURCE(4294, 85) { word x156; word x157; if ((( x156 = r←v10020, *(float*)&x156 ) < ( x157 = (* (ptr) &fc13 ), *(float*)&x157 ))) { SOURCE(4311, 10) oog←v6172 = 1; SOURCE(4323, 7) r←v10020 = (* (ptr) &fc13 ); } else { SOURCE(4337, 42) { word x158; word x159; if ((( x158 = r←v10020, *(float*)&x158 ) > ( x159 = maxOut←v4384, *(float*)&x159 ))) { SOURCE(4357, 10) oog←v6172 = 1; SOURCE(4369, 10) r←v10020 = maxOut←v4384; }; }; }; }; SOURCE(4382, 11) var←c11556 = r←v10020; var←c11524 = var←c11556; }; { word limit160; (* ((( (ptr) out←v4412)+2)+( limit160 = (* (( (ptr) out←v4412)+1) ), BCK(2, limit160) )) ) = var←c11524; }; }; SOURCE(4573, 20) (* (ptr) out←v4412 ) = oog←v6172; } static void RGBFromCMYK←P540(control←v4472, c←v4500, m←v4528, y←v4556, k←v4584, maxOut←v4612, out←v4640) word control←v4472; word c←v4500; word m←v4528; word y←v4556; word k←v4584; word maxOut←v4612; word out←v4640; { /* RGBFromCMYK: */ SOURCE(4599, 173) SOURCE(4707, 65) { word x161; word x162; word x163; float tf164; word x165; word x166; word x167; float tf168; word x169; word x170; word x171; float tf172; (void) RGBFromRGB←P480(control←v4472, ( tf164 = ( x161 = (* (ptr) &fc17 ), *(float*)&x161 ) - (( x162 = c←v4500, *(float*)&x162 ) + ( x163 = k←v4584, *(float*)&x163 )), *(word*)&tf164 ), ( tf168 = ( x165 = (* (ptr) &fc17 ), *(float*)&x165 ) - (( x166 = m←v4528, *(float*)&x166 ) + ( x167 = k←v4584, *(float*)&x167 )), *(word*)&tf168 ), ( tf172 = ( x169 = (* (ptr) &fc17 ), *(float*)&x169 ) - (( x170 = y←v4556, *(float*)&x170 ) + ( x171 = k←v4584, *(float*)&x171 )), *(word*)&tf172 ), maxOut←v4612, out←v4640); }; } static void YFromY←P600(control←v4700, Y←v4728, maxOut←v4756, out←v4784) word control←v4700; word Y←v4728; word maxOut←v4756; word out←v4784; { word g←v6348 = 0; /* YFromY: */ SOURCE(4778, 346) SOURCE(5048, 56) { word var←c11588; { word var←c11620; word r←v10164; r←v10164 = (word) LookupReal←P180((* (( (ptr) control←v4700)+3) ), Y←v4728); SOURCE(4934, 14) { word x173; word x174; *(float*)&r←v10164 = ( x173 = r←v10164, *(float*)&x173 ) * ( x174 = maxOut←v4756, *(float*)&x174 ); }; SOURCE(4950, 81) { word x175; word x176; if ((( x175 = r←v10164, *(float*)&x175 ) < ( x176 = (* (ptr) &fc13 ), *(float*)&x176 ))) { SOURCE(4967, 8) g←v6348 = 1; SOURCE(4977, 7) r←v10164 = (* (ptr) &fc13 ); } else { SOURCE(4991, 40) { word x177; word x178; if ((( x177 = r←v10164, *(float*)&x177 ) > ( x178 = maxOut←v4756, *(float*)&x178 ))) { SOURCE(5011, 8) g←v6348 = 1; SOURCE(5021, 10) r←v10164 = maxOut←v4756; }; }; }; }; SOURCE(5034, 11) var←c11620 = r←v10164; var←c11588 = var←c11620; }; { word limit179; (* ((( (ptr) out←v4784)+2)+( limit179 = (* (( (ptr) out←v4784)+1) ), BCK(0, limit179) )) ) = var←c11588; }; }; SOURCE(5106, 18) (* (ptr) out←v4784 ) = g←v6348; } static void KFromY←P660(control←v4844, Y←v4872, maxOut←v4900, out←v4928) word control←v4844; word Y←v4872; word maxOut←v4900; word out←v4928; { word g←v6524 = 0; /* KFromY: */ SOURCE(5130, 350) SOURCE(5400, 60) { word var←c11652; { word var←c11684; word r←v10212; { word x180; word x181; *(float*)&r←v10212 = ( x180 = (* (ptr) &fc17 ), *(float*)&x180 ) - ( x181 = (word) LookupReal←P180((* (( (ptr) control←v4844)+3) ), Y←v4872), *(float*)&x181 ); }; SOURCE(5286, 14) { word x182; word x183; *(float*)&r←v10212 = ( x182 = r←v10212, *(float*)&x182 ) * ( x183 = maxOut←v4900, *(float*)&x183 ); }; SOURCE(5302, 81) { word x184; word x185; if ((( x184 = r←v10212, *(float*)&x184 ) < ( x185 = (* (ptr) &fc13 ), *(float*)&x185 ))) { SOURCE(5319, 8) g←v6524 = 1; SOURCE(5329, 7) r←v10212 = (* (ptr) &fc13 ); } else { SOURCE(5343, 40) { word x186; word x187; if ((( x186 = r←v10212, *(float*)&x186 ) > ( x187 = maxOut←v4900, *(float*)&x187 ))) { SOURCE(5363, 8) g←v6524 = 1; SOURCE(5373, 10) r←v10212 = maxOut←v4900; }; }; }; }; SOURCE(5386, 11) var←c11684 = r←v10212; var←c11652 = var←c11684; }; { word limit188; (* ((( (ptr) out←v4928)+2)+( limit188 = (* (( (ptr) out←v4928)+1) ), BCK(0, limit188) )) ) = var←c11652; }; }; SOURCE(5462, 18) (* (ptr) out←v4928 ) = g←v6524; } static void CMYKFromY←P720(control←v4988, Y←v5016, maxOut←v5044, out←v5072) word control←v4988; word Y←v5016; word maxOut←v5044; word out←v5072; { word g←v6700 = 0; /* CMYKFromY: */ SOURCE(5486, 385) SOURCE(5759, 30) { word var←c11716; var←c11716 = (* (ptr) &fc13 ); { word limit189; (* ((( (ptr) out←v5072)+2)+( limit189 = (* (( (ptr) out←v5072)+1) ), BCK(2, limit189) )) ) = var←c11716; }; { word limit190; (* ((( (ptr) out←v5072)+2)+( limit190 = (* (( (ptr) out←v5072)+1) ), BCK(1, limit190) )) ) = var←c11716; }; { word limit191; (* ((( (ptr) out←v5072)+2)+( limit191 = (* (( (ptr) out←v5072)+1) ), BCK(0, limit191) )) ) = var←c11716; }; }; SOURCE(5791, 60) { word var←c11748; { word var←c11780; word r←v10260; { word x192; word x193; *(float*)&r←v10260 = ( x192 = (* (ptr) &fc17 ), *(float*)&x192 ) - ( x193 = (word) LookupReal←P180((* (( (ptr) control←v4988)+3) ), Y←v5016), *(float*)&x193 ); }; SOURCE(5645, 14) { word x194; word x195; *(float*)&r←v10260 = ( x194 = r←v10260, *(float*)&x194 ) * ( x195 = maxOut←v5044, *(float*)&x195 ); }; SOURCE(5661, 81) { word x196; word x197; if ((( x196 = r←v10260, *(float*)&x196 ) < ( x197 = (* (ptr) &fc13 ), *(float*)&x197 ))) { SOURCE(5678, 8) g←v6700 = 1; SOURCE(5688, 7) r←v10260 = (* (ptr) &fc13 ); } else { SOURCE(5702, 40) { word x198; word x199; if ((( x198 = r←v10260, *(float*)&x198 ) > ( x199 = maxOut←v5044, *(float*)&x199 ))) { SOURCE(5722, 8) g←v6700 = 1; SOURCE(5732, 10) r←v10260 = maxOut←v5044; }; }; }; }; SOURCE(5745, 11) var←c11780 = r←v10260; var←c11748 = var←c11780; }; { word limit200; (* ((( (ptr) out←v5072)+2)+( limit200 = (* (( (ptr) out←v5072)+1) ), BCK(3, limit200) )) ) = var←c11748; }; }; SOURCE(5853, 18) (* (ptr) out←v5072 ) = g←v6700; } /* file: ImagerDeviceColorImpl, module: ImagerDeviceColorImpl, compiled at: October 28, 1993 1:00:16 pm PDT */ extern void XR←install←ImagerDeviceColorImpl() { NoName←Q2256(); } extern void XR←run←ImagerDeviceColorImpl() { XR←Start(&globalframe); }