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