/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: July 28, 1993 10:28:48 am PDT */ /* C2C version: April 20, 1993 (sun4) */ /* ref-counting: off */ /* file: Vector2Impl, module: Vector2Impl */ /* switches: bcfhklnouw */ #include #include static char versionStamp[] = "@(#)mob_version [3774313079,28158533] Vector2Impl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef struct {word f0, f1;} W2; typedef word (*fPt)(); #define SOURCE(p, l) /* source p, l */ static void NoName_Q780(); static void Vector2Impl_P0(); static void Add_P60(); static void Sub_P120(); static void Neg_P180(); static void Mul_P240(); static void Div_P300(); static void MulC_P360(); static void DivC_P420(); static word Dot_P480(); static word Cross_P540(); static word Square_P600(); static word Length_P660(); static void Unit_P720(); static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\340\367\162\167\300\001\255\252\105\100\164\000\000"}; static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\245\247\302\156\300\052\156\325\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\247\031\224\326\300\123\162\224\023\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; word f20; word f21; word f22; word f23; word f24; word f25; word f26; word f27; word f28; word f29[3]; } globalframe = { {0}, (word) Unit_P720, 0, (word) Length_P660, 0, (word) Square_P600, 0, (word) Cross_P540, 0, (word) Dot_P480, 0, (word) DivC_P420, 0, (word) MulC_P360, 0, (word) Div_P300, 0, (word) Mul_P240, 0, (word) Neg_P180, 0, (word) Sub_P120, 0, (word) Add_P60, 0, (word) Vector2Impl_P0, {0} }; static void NoName_Q780() { register ptr gf_c060 = (ptr) &globalframe; word var_c5396; (void) XR_DeclareGlobalFrame((word) "Vector2Impl", &globalframe, (word) XR_GetTypeIndexS((word) (&string1)), (word) (( (bPt) gf_c060)+112) /* var_c5044 */ ); var_c5396 = (word) XR_ImportInterface((word) "RealFns", (word) XR_GetTypeIndexS((word) (&string2)), 36); (* (( (ptr) gf_c060)+30)/* var_c5332 */ ) = var_c5396; (void) XR_ImportProcS(var_c5396, 67372289); var_c5396 = (word) XR_ExportInterface((word) "Vector2", (word) XR_GetTypeIndexS((word) (&string3)), 22); (* (( (ptr) gf_c060)+31)/* var_c5428 */ ) = var_c5396; (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+104)/* var_c5012 */ , 135266306, (word) "Add"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+96)/* var_c4980 */ , 135266818, (word) "Sub"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+88)/* var_c4948 */ , 134743041, (word) "Neg"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+80)/* var_c4916 */ , 135005698, (word) "Mul"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+72)/* var_c4884 */ , 135006210, (word) "Div"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+64)/* var_c4852 */ , 135268866, (word) "MulC"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+56)/* var_c4820 */ , 135269378, (word) "DivC"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+48)/* var_c4788 */ , 68161026, (word) "Dot"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+40)/* var_c4756 */ , 68161538, (word) "Cross"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+32)/* var_c4724 */ , 67637761, (word) "Square"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+24)/* var_c4692 */ , 67638273, (word) "Length"); (void) XR_ExportProcS(var_c5396, (word) (( (bPt) gf_c060)+16)/* var_c4660 */ , 134747393, (word) "Unit"); } static void Vector2Impl_P0(formal_c018, formal_c017) word formal_c018; word formal_c017; { /* Vector2Impl: */ } static void Add_P60(formal_c022, v1_v2884, v2_v2912) word formal_c022; W2 v1_v2884; W2 v2_v2912; { word var_c063; word var_c064; /* Add: */ SOURCE(148, 78) /* Return var split */ SOURCE(195, 31) { word x4; word x5; *(float*)&var_c063 = ( x4 = v1_v2884.f0, *(float*)&x4 ) + ( x5 = v2_v2912.f0, *(float*)&x5 ); }; { word x6; word x7; *(float*)&var_c064 = ( x6 = v1_v2884.f1, *(float*)&x6 ) + ( x7 = v2_v2912.f1, *(float*)&x7 ); }; /* removed tail goto */ (* (( (ptr) formal_c022)+1) ) = var_c064; (* (ptr) formal_c022 ) = var_c063; return; } static void Sub_P120(formal_c026, v1_v3016, v2_v3044) word formal_c026; W2 v1_v3016; W2 v2_v3044; { word var_c065; word var_c066; /* Sub: */ SOURCE(230, 78) /* Return var split */ SOURCE(277, 31) { word x8; word x9; *(float*)&var_c065 = ( x8 = v1_v3016.f0, *(float*)&x8 ) - ( x9 = v2_v3044.f0, *(float*)&x9 ); }; { word x10; word x11; *(float*)&var_c066 = ( x10 = v1_v3016.f1, *(float*)&x10 ) - ( x11 = v2_v3044.f1, *(float*)&x11 ); }; /* removed tail goto */ (* (( (ptr) formal_c026)+1) ) = var_c066; (* (ptr) formal_c026 ) = var_c065; return; } static void Neg_P180(formal_c029, v_v3148) word formal_c029; W2 v_v3148; { word var_c067; word var_c068; /* Neg: */ SOURCE(312, 63) /* Return var split */ SOURCE(354, 21) { word x12; *(float*)&var_c067 = - ( x12 = v_v3148.f0, *(float*)&x12 ); }; { word x13; *(float*)&var_c068 = - ( x13 = v_v3148.f1, *(float*)&x13 ); }; /* removed tail goto */ (* (( (ptr) formal_c029)+1) ) = var_c068; (* (ptr) formal_c029 ) = var_c067; return; } static void Mul_P240(formal_c033, v_v3252, s_v3280) word formal_c033; W2 v_v3252; word s_v3280; { word var_c069; word var_c070; /* Mul: */ SOURCE(379, 74) /* Return var split */ SOURCE(430, 23) { word x14; word x15; *(float*)&var_c069 = ( x14 = v_v3252.f0, *(float*)&x14 ) * ( x15 = s_v3280, *(float*)&x15 ); }; { word x16; word x17; *(float*)&var_c070 = ( x16 = v_v3252.f1, *(float*)&x16 ) * ( x17 = s_v3280, *(float*)&x17 ); }; /* removed tail goto */ (* (( (ptr) formal_c033)+1) ) = var_c070; (* (ptr) formal_c033 ) = var_c069; return; } static void Div_P300(formal_c037, v_v3384, s_v3412) word formal_c037; W2 v_v3384; word s_v3412; { word var_c071; word var_c072; /* Div: */ SOURCE(457, 74) /* Return var split */ SOURCE(508, 23) { word x18; word x19; *(float*)&var_c071 = ( x18 = v_v3384.f0, *(float*)&x18 ) / ( x19 = s_v3412, *(float*)&x19 ); }; { word x20; word x21; *(float*)&var_c072 = ( x20 = v_v3384.f1, *(float*)&x20 ) / ( x21 = s_v3412, *(float*)&x21 ); }; /* removed tail goto */ (* (( (ptr) formal_c037)+1) ) = var_c072; (* (ptr) formal_c037 ) = var_c071; return; } static void MulC_P360(formal_c041, v1_v3516, v2_v3544) word formal_c041; W2 v1_v3516; W2 v2_v3544; { word var_c073; word var_c074; /* MulC: */ SOURCE(535, 79) /* Return var split */ SOURCE(583, 31) { word x22; word x23; *(float*)&var_c073 = ( x22 = v1_v3516.f0, *(float*)&x22 ) * ( x23 = v2_v3544.f0, *(float*)&x23 ); }; { word x24; word x25; *(float*)&var_c074 = ( x24 = v1_v3516.f1, *(float*)&x24 ) * ( x25 = v2_v3544.f1, *(float*)&x25 ); }; /* removed tail goto */ (* (( (ptr) formal_c041)+1) ) = var_c074; (* (ptr) formal_c041 ) = var_c073; return; } static void DivC_P420(formal_c045, v1_v3648, v2_v3676) word formal_c045; W2 v1_v3648; W2 v2_v3676; { word var_c075; word var_c076; /* DivC: */ SOURCE(618, 79) /* Return var split */ SOURCE(666, 31) { word x26; word x27; *(float*)&var_c075 = ( x26 = v1_v3648.f0, *(float*)&x26 ) / ( x27 = v2_v3676.f0, *(float*)&x27 ); }; { word x28; word x29; *(float*)&var_c076 = ( x28 = v1_v3648.f1, *(float*)&x28 ) / ( x29 = v2_v3676.f1, *(float*)&x29 ); }; /* removed tail goto */ (* (( (ptr) formal_c045)+1) ) = var_c076; (* (ptr) formal_c045 ) = var_c075; return; } static word Dot_P480(v1_v3780, v2_v3808) W2 v1_v3780; W2 v2_v3808; { word var_c3852; /* Dot: */ SOURCE(701, 76) SOURCE(749, 28) { word x30; word x31; word x32; word x33; float tf34; return(( tf34 = (( x30 = v1_v3780.f0, *(float*)&x30 ) * ( x31 = v2_v3808.f0, *(float*)&x31 )) + (( x32 = v1_v3780.f1, *(float*)&x32 ) * ( x33 = v2_v3808.f1, *(float*)&x33 )), *(word*)&tf34 )); }; } static word Cross_P540(v1_v3912, v2_v3940) W2 v1_v3912; W2 v2_v3940; { word var_c3984; /* Cross: */ SOURCE(781, 78) SOURCE(831, 28) { word x35; word x36; word x37; word x38; float tf39; return(( tf39 = (( x35 = v1_v3912.f0, *(float*)&x35 ) * ( x36 = v2_v3940.f1, *(float*)&x36 )) - (( x37 = v1_v3912.f1, *(float*)&x37 ) * ( x38 = v2_v3940.f0, *(float*)&x38 )), *(word*)&tf39 )); }; } static word Square_P600(v_v4044) W2 v_v4044; { word var_c4088; /* Square: */ SOURCE(863, 70) SOURCE(909, 24) { word x40; word x41; word x42; word x43; float tf44; return(( tf44 = (( x40 = v_v4044.f0, *(float*)&x40 ) * ( x41 = v_v4044.f0, *(float*)&x41 )) + (( x42 = v_v4044.f1, *(float*)&x42 ) * ( x43 = v_v4044.f1, *(float*)&x43 )), *(word*)&tf44 )); }; } static word Length_P660(v_v4148) W2 v_v4148; { register ptr gf_c5460 = (ptr) &globalframe; word var_c4192; /* Length: */ SOURCE(936, 84) SOURCE(982, 38) { word pd45; word x46; word x47; word x48; word x49; float tf50; pd45 = (* (( (ptr) (* (( (ptr) gf_c5460)+30)/* var_c5332 */ ))+9) ); return((word) ( *( (fPt) ((* (ptr) pd45 ))))(( tf50 = (( x46 = v_v4148.f0, *(float*)&x46 ) * ( x47 = v_v4148.f0, *(float*)&x47 )) + (( x48 = v_v4148.f1, *(float*)&x48 ) * ( x49 = v_v4148.f1, *(float*)&x49 )), *(word*)&tf50 ), pd45)); }; } static void Unit_P720(formal_c059, v_v4252) word formal_c059; W2 v_v4252; { register ptr gf_c5492 = (ptr) &globalframe; word var_c077; word var_c078; word m_v4324; /* Unit: */ SOURCE(1023, 107) /* Return var split */ SOURCE(1066, 39) { word pd51; word x52; word x53; word x54; word x55; float tf56; pd51 = (* (( (ptr) (* (( (ptr) gf_c5492)+30)/* var_c5332 */ ))+9) ); m_v4324 = (word) ( *( (fPt) ((* (ptr) pd51 ))))(( tf56 = (( x52 = v_v4252.f0, *(float*)&x52 ) * ( x53 = v_v4252.f0, *(float*)&x53 )) + (( x54 = v_v4252.f1, *(float*)&x54 ) * ( x55 = v_v4252.f1, *(float*)&x55 )), *(word*)&tf56 ), pd51); }; SOURCE(1107, 23) { word x57; word x58; *(float*)&var_c077 = ( x57 = v_v4252.f0, *(float*)&x57 ) / ( x58 = m_v4324, *(float*)&x58 ); }; { word x59; word x60; *(float*)&var_c078 = ( x59 = v_v4252.f1, *(float*)&x59 ) / ( x60 = m_v4324, *(float*)&x60 ); }; /* removed tail goto */ (* (( (ptr) formal_c059)+1) ) = var_c078; (* (ptr) formal_c059 ) = var_c077; return; } /* file: Vector2Impl, module: Vector2Impl, compiled at: July 28, 1993 10:28:48 am PDT */ extern void XR_install_Vector2Impl() { NoName_Q780(); } extern void XR_run_Vector2Impl() { XR_Start(&globalframe); }