/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: February 21, 1992 4:38:10 pm PST */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: TestRope6, module: TestRope6 */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [4070973170,2383565031] TestRope6";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W8 f; W3 r;} W11;
#define SOURCE(p, l) /* source p, l */
#define INEG(x)  ( (word) ( - ((int) (word) (x)) ) )
#define IOP2(op, x, y)  ( (word) ((x) op (y)) )
#define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i )
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
static void NoName←Q372();
static void TestRope6←P0();
static void PutInt←P60();
static void PutRope←P120();
static struct {unsigned f; char r[16];} string1 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"};
static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"};
static struct {unsigned f; char r[8];} string3 = {458760, "--000--"};
static struct {unsigned f; char r[4];} string4 = {131076, "ab\000"};
static struct {unsigned f; char r[4];} string5 = {131076, "12\000"};
static struct {unsigned f; char r[8];} string6 = {458760, "--111--"};
static struct {unsigned f; char r[8];} string7 = {262152, "abcd\000\000\000"};
static struct {unsigned f; char r[8];} string8 = {262152, "1234\000\000\000"};
static struct {unsigned f; char r[8];} string9 = {458760, "--222--"};
static struct {unsigned f; char r[4];} string10 = {131076, "cd\000"};
static struct {unsigned f; char r[4];} string11 = {131076, "34\000"};
static struct {unsigned f; char r[8];} string12 = {458760, "--333--"};
static struct {unsigned f; char r[16];} string13 = {851984, "abcd876867876\000\000"};
static struct {unsigned f; char r[8];} string14 = {458760, "--444--"};
static struct {unsigned f; char r[12];} string15 = {524300, "equal ok\000\000\000"};
static struct {unsigned f; char r[12];} string16 = {720908, "equal wrong"};
static struct {unsigned f; char r[8];} string17 = {458760, "--555--"};
static struct {unsigned f; char r[16];} string18 = {983056, "not equal wrong"};
static struct {unsigned f; char r[16];} string19 = {786448, "not equal ok\000\000\000"};
static struct {unsigned f; char r[8];} string20 = {458760, "--666--"};
static struct {unsigned f; char r[8];} string21 = {458760, "--777--"};
static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\362\246\036\362\300\216\022\120\347\100\164\000\000"};
static struct {unsigned f; char r[16];} string23 = {917518, "\006\004\020\001\024\001\030\001\050\010\000\004\023\001\000"};
static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"};
static struct {
   word f0[29]; word f29; word f30; word f31; 
   word f32; word f33; word f34[2]; 
   } globalframe = {
   {0}, (word) PutRope←P120, 0, (word) PutInt←P60, 
   0, (word) TestRope6←P0, {0}
   };

static void NoName←Q372()
   {
   register ptr gf←c025 =  (ptr) &globalframe;
   word var←c7392;
   (* (( (ptr) gf←c025)+9) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (*  (ptr) (( (bPt) gf←c025)+40) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string3);
   (*  (ptr) (( (bPt) gf←c025)+44) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string4);
   (*  (ptr) (( (bPt) gf←c025)+48) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string5);
   (*  (ptr) (( (bPt) gf←c025)+52) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string6);
   (*  (ptr) (( (bPt) gf←c025)+56) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string7);
   (*  (ptr) (( (bPt) gf←c025)+60) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string8);
   (*  (ptr) (( (bPt) gf←c025)+64) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string9);
   (*  (ptr) (( (bPt) gf←c025)+68) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string10);
   (*  (ptr) (( (bPt) gf←c025)+72) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string11);
   (*  (ptr) (( (bPt) gf←c025)+76) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string12);
   (*  (ptr) (( (bPt) gf←c025)+80) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string13);
   (*  (ptr) (( (bPt) gf←c025)+84) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string14);
   (*  (ptr) (( (bPt) gf←c025)+88) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string15);
   (*  (ptr) (( (bPt) gf←c025)+92) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string16);
   (*  (ptr) (( (bPt) gf←c025)+96) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string17);
   (*  (ptr) (( (bPt) gf←c025)+100) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string18);
   (*  (ptr) (( (bPt) gf←c025)+104) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string19);
   (*  (ptr) (( (bPt) gf←c025)+108) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string20);
   (*  (ptr) (( (bPt) gf←c025)+112) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c025)+9) ), (word) &string21);
   (void) XR←DeclareGlobalFrame((word) "TestRope6", &globalframe, (word) XR←GetTypeIndex((word) &string22, 0, (word) &string23)
      , (word) (( (bPt) gf←c025)+132)/* var←c7296 */ );
   var←c7392 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string24)), 43);
   (* (( (ptr) gf←c025)+35)/* var←c7328 */  ) = var←c7392;
   (void) XR←ImportProcS(var←c7392, 67634434);
   (void) XR←ImportProcS(var←c7392, 67373569);
   (void) XR←ImportProcS(var←c7392, 67898627);
   (void) XR←ImportProcS(var←c7392, 67896323);
   (void) XR←ImportProcS(var←c7392, 68419845);
   (void) XR←ImportProcS(var←c7392, 67633666);
   }

static void TestRope6←P0(formal←c013, formal←c011)
   word formal←c013;
   word formal←c011;
   {
   register ptr gf←c7424 =  (ptr) &globalframe;
   /* TestRope6: */ 
SOURCE(16, 1408)
SOURCE(787, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+10)) ));
SOURCE(807, 28)
   {
      word pd25;
      pd25 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+6) );
      (* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ) = (word) ( *( (fPt) ((*  (ptr) pd25 ))))((* (( (ptr) gf←c7424)+11) ), (* (( (ptr) gf←c7424)+12)
          ), pd25);
      };
SOURCE(837, 11)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+4)/* r1←v2440 */ ) ));
SOURCE(850, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+13)) ));
SOURCE(871, 32)
   {
      word pd26;
      pd26 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+6) );
      (* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ) = (word) ( *( (fPt) ((*  (ptr) pd26 ))))((* (( (ptr) gf←c7424)+14) ), (* (( (ptr) gf←c7424)+15)
          ), pd26);
      };
SOURCE(905, 11)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+4)/* r1←v2440 */ ) ));
SOURCE(918, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+16)) ));
SOURCE(939, 37)
   {
      word pd27;
      pd27 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+5) );
      (* (( (ptr) gf←c7424)+5)/* r2←v2468 */  ) = (word) ( *( (fPt) ((*  (ptr) pd27 ))))((* (( (ptr) gf←c7424)+11) ), (* (( (ptr) gf←c7424)+17)
          ), (* (( (ptr) gf←c7424)+12) ), (* (( (ptr) gf←c7424)+18) ), 0, pd27);
      };
SOURCE(978, 11)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+5)/* r2←v2468 */ ) ));
SOURCE(991, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+19)) ));
SOURCE(1012, 20)
   (* (( (ptr) gf←c7424)+6)/* r3←v2496 */  ) = (* (( (ptr) gf←c7424)+20) );
SOURCE(1034, 11)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+6)/* r3←v2496 */ ) ));
SOURCE(1047, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+21)) ));
SOURCE(1068, 75)
   {
      word pd28;
      pd28 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+8) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd28 ))))((* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ), (* (( (ptr) gf←c7424)+5)/* r2←v2468 */  ), 1, pd28)
      )) {
SOURCE(1096, 25)
         (void) PutRope←P120((* ((( (ptr) gf←c7424)+22)) ));
         }
      else {
SOURCE(1121, 22)
         (void) PutRope←P120((* ((( (ptr) gf←c7424)+23)) ));
         };
      };
SOURCE(1145, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+24)) ));
SOURCE(1166, 83)
   {
      word pd29;
      pd29 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+8) );
      if ((0 != (word) ( *( (fPt) ((*  (ptr) pd29 ))))((* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ), (* (( (ptr) gf←c7424)+6)/* r3←v2496 */  ), 1, pd29)
      )) {
SOURCE(1194, 32)
         (void) PutRope←P120((* ((( (ptr) gf←c7424)+25)) ));
         }
      else {
SOURCE(1226, 23)
         (void) PutRope←P120((* ((( (ptr) gf←c7424)+26)) ));
         };
      };
SOURCE(1251, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+27)) ));
SOURCE(1271, 80)
   {
      register word i←v2808 = 0;
      if (( (int)i←v2808 >  (int)199)) {
         goto lab←L100000;
         };
      lab←L100003: ;
SOURCE(1297, 26)
      {
         word pd30;
         pd30 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+6) );
         (* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ) = (word) ( *( (fPt) ((*  (ptr) pd30 ))))((* (( (ptr) gf←c7424)+11) ), (* (( (ptr) gf←c7424)+4)
            /* r1←v2440 */  ), pd30);
         };
SOURCE(1325, 26)
      {
         word pd31;
         pd31 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+6) );
         (* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ) = (word) ( *( (fPt) ((*  (ptr) pd31 ))))((* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ), (* (
               ( (ptr) gf←c7424)+12) ), pd31);
         };
      if (( (int)i←v2808 >=  (int)199)) {
         goto lab←L100000;
         };
      i←v2808 = (i←v2808 + 1);
      goto lab←L100003;
      lab←L100000: ;
      };
SOURCE(1362, 29)
   {
      word pd32;
      pd32 = (* (( (ptr) (* (( (ptr) gf←c7424)+35)/* var←c7328 */  ))+17) );
      (* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ) = (word) ( *( (fPt) ((*  (ptr) pd32 ))))((* (( (ptr) gf←c7424)+4)/* r1←v2440 */  ), 390, 30, pd32)
      ;
      };
SOURCE(1393, 11)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+4)/* r1←v2440 */ ) ));
SOURCE(1406, 18)
   (void) PutRope←P120((* ((( (ptr) gf←c7424)+28)) ));
   }

static void PutInt←P60(i←v2720)
   word i←v2720;
   {
   W11 stack←v2852;
   word nChars←v2880 = 0;
   word negative←v2908 = 0;
   /* PutInt: */ 
SOURCE(160, 393)
SOURCE(257, 32)
   if (( (int)i←v2720 <  (int)0)) {
SOURCE(270, 4)
      i←v2720 = INEG(i←v2720);
SOURCE(276, 13)
      negative←v2908 = 1;
      };
SOURCE(292, 115)
   lab←L100006: ;
SOURCE(292, 115)
   {
      word digit←v2988;
SOURCE(295, 21)
      {
         word idx33;
         digit←v2988 = (
            idx33 = (word) IOP2( % ,  (int)i←v2720,  (int)10),
            SGNCK(idx33)
            );
         };
SOURCE(318, 35)
      (* (( (ptr) &stack←v2852)+BCK(nChars←v2880, 11)) ) = BCK((digit←v2988 + 48), 256);
SOURCE(355, 19)
      nChars←v2880 = (nChars←v2880 + 1);
SOURCE(376, 15)
      if (( (int)i←v2720 <  (int)10)) {
SOURCE(391, 4)
         goto lab←L100005;
         };
SOURCE(397, 10)
      i←v2720 = IOP2( / ,  (int)i←v2720,  (int)10);
      };
   goto lab←L100006;
   lab←L100005: ;
SOURCE(418, 58)
   if ((0 != negative←v2908)) {
SOURCE(437, 18)
      (* (( (ptr) &stack←v2852)+BCK(nChars←v2880, 11)) ) = 45;
SOURCE(457, 19)
      nChars←v2880 = (nChars←v2880 + 1);
      };
SOURCE(481, 11)
   (void) XR←DebugPutChar(32);
SOURCE(494, 59)
   {
      register word n←v3032;
      n←v3032 = SGNCK(nChars←v2880);
      if ((0 >= n←v3032)) {
         goto lab←L100007;
         };
      n←v3032 = (n←v3032 - 1);
      lab←L100010: ;
SOURCE(536, 17)
      (void) XR←DebugPutChar((* ((( (ptr) &stack←v2852)+BCK(n←v3032, 11))) ));
      if ((0 >= n←v3032)) {
         goto lab←L100007;
         };
      n←v3032 = (n←v3032 - 1);
      goto lab←L100010;
      lab←L100007: ;
      };
   }

static void PutRope←P120(s←v2780)
   word s←v2780;
   {
   register ptr gf←c7456 =  (ptr) &globalframe;
   word length←v3076;
   word c←v3104;
   /* PutRope: */ 
SOURCE(568, 213)
SOURCE(631, 23)
   {
      word pd34;
      pd34 = (* (( (ptr) (* (( (ptr) gf←c7456)+35)/* var←c7328 */  ))+14) );
      length←v3076 = (word) ( *( (fPt) ((*  (ptr) pd34 ))))(s←v2780, pd34);
      };
SOURCE(656, 11)
   (void) XR←DebugPutChar(91);
SOURCE(669, 14)
   (void) PutInt←P60(length←v3076);
SOURCE(685, 11)
   (void) XR←DebugPutChar(42);
SOURCE(698, 61)
   {
      register word i←v3148 = 0;
      register word noName←c7360;
      noName←c7360 = length←v3076;
      if (( (int)i←v3148 >=  (int)noName←c7360)) {
         goto lab←L100011;
         };
      lab←L100014: ;
SOURCE(727, 20)
      {
         word pd35;
         pd35 = (* (( (ptr) (* (( (ptr) gf←c7456)+35)/* var←c7328 */  ))+9) );
         c←v3104 = (word) ( *( (fPt) ((*  (ptr) pd35 ))))(s←v2780, i←v3148, pd35);
         };
SOURCE(749, 10)
      (void) XR←DebugPutChar(c←v3104);
      i←v3148 = (i←v3148 + 1);
      if (( (int)i←v3148 <  (int)noName←c7360)) {
         goto lab←L100014;
         };
      lab←L100011: ;
      };
SOURCE(770, 11)
   (void) XR←DebugPutChar(93);
   }

/* file: TestRope6, module: TestRope6, compiled at: February 21, 1992 4:38:10 pm PST */ 
extern void XR←install←TestRope6() {
   NoName←Q372();
   }
extern void XR←run←TestRope6() { XR←Start(&globalframe); }