/* 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 <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
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); }