/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: August 13, 1993 12:19:29 pm PDT */
/* C2C version: April 20, 1993 (sun4) */
/* ref-counting: off */
/* file: XlImplTQ, module: XlImplTQ */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
#define XRM←BITAND(x, y) (((word)(x)) & ((word)(y)))
static char versionStamp[] = "@(#)mob←version [3836484147,119853569] XlImplTQ";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef struct {word f0, f1, f2, f3;} W4;
typedef W4 *W4Pt;
typedef struct {word f0, f1, f2, f3, f4, f5;} W6;
typedef W6 *W6Pt;
typedef word (*fPt)();
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {word f0, f1;} W2;
typedef struct {word f0, f1, f2, f3, f4;} W5;
typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7;
typedef W2 *W2Pt;
#define SOURCE(p, l) /* source p, l */
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
#define INEG(x)  ( (word) ( - ((int) (word) (x)) ) )
static void NoName←Q1956();
static void XlImplTQ←P0();
static void ForgetQueuedElements←P60();
static void Pass←P1440();
static void RemoveErrorEvents←P120();
static word NoName←Q2016();
static word CreateTQ←P180();
static void Enqueue←P420();
static void DispatcherProcess←P540();
static void AbortNotification←P600();
static word IsTQ←P660();
static word NarrowTQ←P720();
static word OwnsLock←P840();
static word GetLockOrderNum←P900();
static word GetLockOrder←P960();
static void CallWithLocks←P1020();
static word NoName←Q2076();
static void WaitForFreeOnce←P1080();
static word TryAquireLock←P1140();
static void ReleaseLock←P1200();
static void CallWithLock←P1260();
static word NoName←Q2136();
static void SetTQPriority←P1320();
static void SetTQReadiness←P1380();
static void NoName←Q2196();
static void NoName←Q2256();
static void NoName←Q2316();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\276\357\323\042\300\311\135\170\244\100\164\000\000"};
static struct {unsigned f; char r[20];} string2 = {1179666, "\006\006\060\001\064\001\100\160\001\100\164\001\100\214\001\100\224\001\000"};
static struct {unsigned f; char r[12];} string3 = {524300, "\254\205\210\242\000\100\177\232\000\000\000"};
static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\276\357\323\042\300\311\135\170\244\100\200\000\000"};
static struct {unsigned f; char r[4];} string5 = {131074, "\004\015\000"};
static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\344\254\032\063\300\007\044\322\001\100\200\000\000"};
static struct {unsigned f; char r[4];} string7 = {196611, "\004C\360"};
static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\263\064\342\215\300\063\160\325\023\100\150\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\331\065\252\070\300\313\125\035\371\100\150\000\000"};
static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\240\236\274\315\300\111\163\325\023\100\150\000\000"};
static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\351\276\264\273\300\115\104\320\264\100\164\000\000"};
static struct {unsigned f; char r[20];} string12 = {1179668, "\211\006\005\124\121\122\145\160\300\351\276\264\273\300\115\104\320\264\000"};
static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\276\357\323\042\300\311\135\170\244\100\150\000\000"};
static struct {
   word f0[21]; 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; word f38; word f39; 
   word f40; word f41; word f42; word f43; 
   word f44; word f45; word f46; word f47; 
   word f48; word f49; word f50; word f51; 
   word f52; word f53; word f54; word f55; 
   word f56; word f57; word f58[11]; 
   } globalframe = {
   {0}, (word) SetTQReadiness←P1380, 0, (word) SetTQPriority←P1320, 
   0, (word) CallWithLock←P1260, 0, (word) ReleaseLock←P1200, 
   0, (word) TryAquireLock←P1140, 0, (word) WaitForFreeOnce←P1080, 
   0, (word) CallWithLocks←P1020, 0, (word) GetLockOrder←P960, 
   0, (word) GetLockOrderNum←P900, 0, (word) OwnsLock←P840, 
   0, (word) NarrowTQ←P720, 0, (word) IsTQ←P660, 
   0, (word) AbortNotification←P600, 0, (word) DispatcherProcess←P540, 
   0, (word) Enqueue←P420, 0, (word) CreateTQ←P180, 
   0, (word) RemoveErrorEvents←P120, 0, (word) ForgetQueuedElements←P60, 
   0, (word) XlImplTQ←P0, {0}
   };

static void NoName←Q1956()
   {
   register ptr gf←c0131 =  (ptr) &globalframe;
   word var←c12372;
   (* (( (ptr) gf←c0131)+12) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c0131)+13) ) = (word) XR←GetTypeIndexS((word) (&string3));
   (* (( (ptr) gf←c0131)+19) ) = (word) XR←GetTypeIndex((word) &string4, 0, (word) &string5);
   (void) XR←DeclareGlobalFrame((word) "XlImplTQ", &globalframe, (word) XR←GetTypeIndex((word) &string6, 0, (word) &string7)
      , (word) (( (bPt) gf←c0131)+228)/* var←c11700 */ );
   var←c12372 = (word) XR←ImportInterface((word) "ForkOps", (word) XR←GetTypeIndexS((word) (&string8)), 4);
   (* (( (ptr) gf←c0131)+66)/* var←c12244 */  ) = var←c12372;
   (void) XR←ImportProcS(var←c12372, 786435);
   var←c12372 = (word) XR←ImportInterface((word) "ForkOpsFriends", (word) XR←GetTypeIndexS((word) (&string9)), 1);
   (* (( (ptr) gf←c0131)+65)/* var←c11988 */  ) = var←c12372;
   (void) XR←ImportProcS(var←c12372, 524290);
   var←c12372 = (word) XR←ImportInterface((word) "Process", (word) XR←GetTypeIndexS((word) (&string10)), 22);
   (* (( (ptr) gf←c0131)+67)/* var←c12276 */  ) = var←c12372;
   (void) XR←ImportProcS(var←c12372, 134219776);
   (void) XR←ImportProcS(var←c12372, 4864);
   var←c12372 = (word) XR←ExportInterface((word) "Xl", (word) XR←GetTypeIndexS((word) (&string11)), 218);
   (* (( (ptr) gf←c0131)+68)/* var←c12404 */  ) = var←c12372;
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+172)/* var←c11476 */ , 67385089, (word) "IsTQ");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+164)/* var←c11444 */ , 67385345, (word) "NarrowTQ");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+204)/* var←c11604 */ , 67910403, (word) "CreateTQ");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+196)/* var←c11572 */ , 1063940, (word) "Enqueue");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+100)/* var←c11188 */ , 539906, (word) "CallWithLock");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+132)/* var←c11316 */ , 802307, (word) "CallWithLocks");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+156)/* var←c11412 */ , 67387137, (word) "OwnsLock");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+140)/* var←c11348 */ , 67649538, (word) "GetLockOrder");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+148)/* var←c11380 */ , 67387649, (word) "GetLockOrderNum");
   (void) XR←ExportType((word) "TQRep", (word) XR←GetTypeIndexS((word) (&string12)), (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2)
      );
   var←c12372 = (word) XR←ExportInterface((word) "XlTQPrivate", (word) XR←GetTypeIndexS((word) (&string13)), 4);
   (* (( (ptr) gf←c0131)+68)/* var←c12404 */  ) = var←c12372;
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+84)/* var←c11124 */ , 524546, (word) "SetTQReadiness");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+92)/* var←c11156 */ , 524802, (word) "SetTQPriority");
   (void) XR←ExportProcS(var←c12372, (word) (( (bPt) gf←c0131)+212)/* var←c11636 */ , 262913, (word) "RemoveErrorEvents");
   }

static void XlImplTQ←P0(formal←c040, formal←c037)
   word formal←c040;
   word formal←c037;
   {
   register ptr gf←c12436 =  (ptr) &globalframe;
   /* XlImplTQ: */ 
SOURCE(89, 7898)
SOURCE(418, 34)
   (* (( (ptr) gf←c12436)+4)/* vanilla1←v2832 */  ) = XR←NewObject(16, (* (( (ptr) gf←c12436)+13) ));
SOURCE(454, 34)
   (* (( (ptr) gf←c12436)+5)/* vanilla2←v2860 */  ) = XR←NewObject(16, (* (( (ptr) gf←c12436)+13) ));
SOURCE(490, 34)
   (* (( (ptr) gf←c12436)+6)/* vanilla3←v2888 */  ) = XR←NewObject(16, (* (( (ptr) gf←c12436)+13) ));
SOURCE(526, 36)
   (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) = XR←NewObject(16, (* (( (ptr) gf←c12436)+13) ));
SOURCE(564, 48)
   {
      word var←c11924;
      var←c11924 = XR←NewObject(16, (* (( (ptr) gf←c12436)+13) ));
      XR←FillWords(&(* (W4Pt) (var←c11924)), 4,  (word) -1);
      (* (( (ptr) gf←c12436)+8)/* desperate2←v2944 */  ) = var←c11924;
      };
SOURCE(1551, 29)
   {
      word var←c11956;
      var←c11956 = XR←NewObject(152, (* (( (ptr) gf←c12436)+12) ));
      (*  (W6Pt) (( (ptr) var←c11956)+14) ) = (*  (W6Pt) (( (ptr) gf←c12436)+59)/* var←c11764 */  );
      (*  (W6Pt) (( (ptr) var←c11956)+20) ) = (*  (W6Pt) (( (ptr) gf←c12436)+59)/* var←c11764 */  );
      (* (( (ptr) var←c11956)+27) ) = 2000;
      (* (( (ptr) var←c11956)+36) ) = 3;
      (* (( (ptr) gf←c12436)+9)/* globalLockTq←v3028 */  ) = var←c11956;
      };
SOURCE(7169, 45)
   (*  (ptr) (* (( (ptr) gf←c12436)+4)/* vanilla1←v2832 */  ) ) |= 33554432;
SOURCE(7216, 45)
   (*  (ptr) (* (( (ptr) gf←c12436)+5)/* vanilla2←v2860 */  ) ) |= 33554432;
SOURCE(7263, 49)
   (*  (ptr) (* (( (ptr) gf←c12436)+5)/* vanilla2←v2860 */  ) ) |= 262144;
SOURCE(7314, 43)
   (*  (ptr) (* (( (ptr) gf←c12436)+5)/* vanilla2←v2860 */  ) ) |= 131072;
SOURCE(7359, 49)
   (*  (ptr) (* (( (ptr) gf←c12436)+5)/* vanilla2←v2860 */  ) ) |= 65536;
SOURCE(7410, 39)
   (*  (ptr) (* (( (ptr) gf←c12436)+6)/* vanilla3←v2888 */  ) ) |= 524288;
SOURCE(7451, 21)
   (*  (W4Pt) (* (( (ptr) gf←c12436)+6)/* vanilla3←v2888 */  ) ) = (*  (W4Pt) (* (( (ptr) gf←c12436)+5)/* vanilla2←v2860 */  ) );
SOURCE(7474, 44)
   (*  (ptr) (* (( (ptr) gf←c12436)+6)/* vanilla3←v2888 */  ) ) |= 16777216;
SOURCE(7520, 44)
   (*  (ptr) (* (( (ptr) gf←c12436)+6)/* vanilla3←v2888 */  ) ) |= 8388608;
SOURCE(7566, 23)
   (*  (W4Pt) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) = (*  (W4Pt) (* (( (ptr) gf←c12436)+6)/* vanilla3←v2888 */  ) );
SOURCE(7591, 43)
   (*  (ptr) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) |= 2097152;
SOURCE(7636, 42)
   (*  (ptr) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) |= 4194304;
SOURCE(7680, 43)
   (*  (ptr) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) |= 536870912;
SOURCE(7725, 45)
   (*  (ptr) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) |= 268435456;
SOURCE(7772, 46)
   (*  (ptr) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) |= 134217728;
SOURCE(7820, 48)
   (*  (ptr) (* (( (ptr) gf←c12436)+7)/* desperate1←v2916 */  ) ) |= 67108864;
SOURCE(7870, 41)
   (*  (ptr) (* (( (ptr) gf←c12436)+8)/* desperate2←v2944 */  ) ) &= 2147483647;
SOURCE(7913, 74)
   {
      word pd14;
      pd14 = (* (( (ptr) (* (( (ptr) gf←c12436)+65)/* var←c11988 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd14 ))))((word) (( (bPt) gf←c12436)+188)/* var←c11540 */ , (word) (( (bPt) gf←c12436)+180)/* var←c11508 */ , pd14)
      ;
      };
   }

static void ForgetQueuedElements←P60(formal←c0158)
   word formal←c0158;
   {
   W8 var←c12468;
   /* declaration of tq←v3876 skipped */ 
   register ptr gf←c12500 =  (ptr) &globalframe;
   /* declaration of var←c12020 skipped */ 
   /* declaration of removed←v6292 skipped */ 
   var←c12468.f4/* tq←v3876 */  = formal←c0158;
   /* ForgetQueuedElements: */ 
SOURCE(615, 649)
   {
      word tmpAddr15;
      tmpAddr15 = (word) (( (ptr) &var←c12468)+5)/* var←c12020 */ ;
      (*  (ptr) tmpAddr15 ) = ( ((word)  (fPt) Pass←P1440) );
      (* (( (ptr) tmpAddr15) + 1) ) = 1;
      };
SOURCE(1055, 17)
   var←c12468.f7/* removed←v6292 */  = 0;
SOURCE(1074, 14)
   (void) Pass←P1440((* (( (ptr) gf←c12500)+4)/* vanilla1←v2832 */  ), (word) (( (bPt) &var←c12468)+20)/* var←c12020 */ );
SOURCE(1090, 25)
   if ((var←c12468.f7/* removed←v6292 */  > 10)) {
SOURCE(1109, 6)
      return;
      };
SOURCE(1117, 14)
   (void) Pass←P1440((* (( (ptr) gf←c12500)+5)/* vanilla2←v2860 */  ), (word) (( (bPt) &var←c12468)+20)/* var←c12020 */ );
SOURCE(1133, 25)
   if ((var←c12468.f7/* removed←v6292 */  > 10)) {
SOURCE(1152, 6)
      return;
      };
SOURCE(1160, 14)
   (void) Pass←P1440((* (( (ptr) gf←c12500)+6)/* vanilla3←v2888 */  ), (word) (( (bPt) &var←c12468)+20)/* var←c12020 */ );
SOURCE(1176, 25)
   if ((var←c12468.f7/* removed←v6292 */  > 10)) {
SOURCE(1195, 6)
      return;
      };
SOURCE(1203, 16)
   (void) Pass←P1440((* (( (ptr) gf←c12500)+7)/* desperate1←v2916 */  ), (word) (( (bPt) &var←c12468)+20)/* var←c12020 */ );
SOURCE(1221, 25)
   if ((var←c12468.f7/* removed←v6292 */  > 10)) {
SOURCE(1240, 6)
      return;
      };
SOURCE(1248, 16)
   (void) Pass←P1440((* (( (ptr) gf←c12500)+8)/* desperate2←v2944 */  ), (word) (( (bPt) &var←c12468)+20)/* var←c12020 */ );
   }

static void Pass←P1440(vanilla←v6368, formal←c12532)
   word vanilla←v6368;
   word formal←c12532;
   {
   word lag←v6408 = 0;
   word p←v6436;
   formal←c12532 = (formal←c12532 - 20);
   /* Pass: */ 
SOURCE(664, 386)
SOURCE(726, 16)
   p←v6436 = (* (( (ptr) (* (( (ptr) formal←c12532)+4) ))+12) );
SOURCE(744, 20)
   if ((p←v6436 == 0)) {
SOURCE(758, 6)
      return;
      };
SOURCE(766, 284)
   lab←L100002: ;
   if ((p←v6436 != (* (( (ptr) (* (( (ptr) formal←c12532)+4) ))+13) ))) {
      }
   else {
      goto lab←L100000;
      };
SOURCE(785, 242)
   {
      word idx16;
      word ix17;
      if ( ( ((*  (ptr) p←v6436 ) != 0) ? (
         ix17 = (
            idx16 = (word) XRM←BITAND((*  (ptr) (*  (ptr) p←v6436 ) ), 127),
            BCK(idx16, 128)
            ),
         ((*  (ptr) (( (ptr) vanilla←v6368) + ((word) ix17 >> 5)) ) >> (31 - ((word) (ix17 & 037)))) & 1
         ) : 0 ) ) {
SOURCE(866, 21)
         (* (( (ptr) formal←c12532)+7) ) = ((* (( (ptr) formal←c12532)+7) ) + 1);
SOURCE(890, 33)
         (* (( (ptr) (* (( (ptr) formal←c12532)+4) ))+11) ) = ((* (( (ptr) (* (( (ptr) formal←c12532)+4) ))+11) ) - 1);
SOURCE(925, 56)
         if ((lag←v6408 == 0)) {
SOURCE(942, 22)
            (* (( (ptr) (* (( (ptr) formal←c12532)+4) ))+12) ) = (* (( (ptr) p←v6436)+3) );
            }
         else {
SOURCE(964, 17)
            (* (( (ptr) lag←v6408)+3) ) = (* (( (ptr) p←v6436)+3) );
            };
SOURCE(984, 25)
         if (((* (( (ptr) formal←c12532)+7) ) > 10)) {
SOURCE(1003, 6)
            return;
            };
         }
      else {
SOURCE(1020, 7)
         lag←v6408 = p←v6436;
         };
      };
SOURCE(1032, 18)
   p←v6436 = (* (( (ptr) p←v6436)+3) );
   goto lab←L100002;
   lab←L100000: ;
   }

static void RemoveErrorEvents←P120(formal←c0159)
   word formal←c0159;
   {
   W5 var←c12564;
   /* declaration of tq←v3936 skipped */ 
   var←c12564.f4/* tq←v3936 */  = formal←c0159;
   /* RemoveErrorEvents: */ 
SOURCE(1271, 265)
   (void) (XR←MonitorEntry(var←c12564.f4/* tq←v3936 */ ));
SOURCE(1321, 215)
   {
      word var←c01;
      {
         word var←c0147;
         var←c0147 = (word) &var←c12564;
         var←c01 = (word) XR←Enable(( ((word)  (fPt) NoName←Q2016) ), ( ((word)  (fPt) NoName←Q2316) ), var←c0147);
         };
      if ((var←c01 == 1)) {
         goto lab←L02;
         };
      };
SOURCE(1271, 265)
   (void) (XR←MonitorExit(var←c12564.f4/* tq←v3936 */ ));
   return;
   lab←L02: ;
   return;
   }

static word NoName←Q2016(formal←c0135)
   word formal←c0135;
   {
SOURCE(1344, 192)
   lab←L100007: ;
   if (((* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+12) ) != 0)) {
      }
   else {
      goto lab←L100005;
      };
SOURCE(1365, 171)
   {
      word var←c12052;
      var←c12052 = (*  (ptr) (* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+12) ) );
      if ((var←c12052 == 0)) {
         goto lab←L100008;
         };
      if (((* (( (ptr) var←c12052)+4) ) == 1)) {
         {
            word error←v6480;
            error←v6480 = var←c12052;
SOURCE(1425, 31)
            (* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+11) ) = ((* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+11) ) - 1);
SOURCE(1458, 22)
            (* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+12) ) = (* (( (ptr) (* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+12) ))+3) );
SOURCE(1482, 34)
            if (((* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+12) ) == 0)) {
SOURCE(1502, 14)
               (* (( (ptr) (* (( (ptr) formal←c0135)+4) ))+13) ) = 0;
               };
            };
         }
      else {
         lab←L100008: ;
SOURCE(1530, 6)
         (void) (XR←MonitorExit(* (( (ptr) formal←c0135)+4) ));
         return(1);
         };
      };
   goto lab←L100007;
   lab←L100005: ;
   return(0);
   }

static word CreateTQ←P180(createData←v3996, order←v4024, reverse←v4052)
   word createData←v3996;
   word order←v4024;
   word reverse←v4052;
   {
   register ptr gf←c12596 =  (ptr) &globalframe;
   word tq←v4112;
   /* CreateTQ: */ 
SOURCE(1621, 472)
SOURCE(1621, 472)
   tq←v4112 = 0;
SOURCE(1947, 56)
   {
      word var←c12084;
      var←c12084 = XR←NewObject(152, (* (( (ptr) gf←c12596)+12) ));
      (*  (W6Pt) (( (ptr) var←c12084)+14) ) = (*  (W6Pt) (( (ptr) gf←c12596)+59)/* var←c11764 */  );
      (*  (W6Pt) (( (ptr) var←c12084)+20) ) = (*  (W6Pt) (( (ptr) gf←c12596)+59)/* var←c11764 */  );
      (* (( (ptr) var←c12084)+27) ) = 2000;
      (* (( (ptr) var←c12084)+31) ) = order←v4024;
      (* (( (ptr) var←c12084)+36) ) = 3;
      (* (( (ptr) var←c12084)+37) ) = createData←v3996;
      tq←v4112 = var←c12084;
      };
SOURCE(2005, 27)
   {
      word tq←v10612;
      word realTq←v10640;
      tq←v10612 = (* (( (ptr) gf←c12596)+9)/* globalLockTq←v3028 */  );
      realTq←v10640 = tq←v4112;
SOURCE(2005, 27)
      (void) (XR←MonitorEntry(tq←v10612));
SOURCE(1790, 109)
      if (( (int)(* (( (ptr) gf←c12596)+11)/* sLow←v3084 */  ) ==  (int)2147483647)) {
SOURCE(1815, 8)
         (* (( (ptr) gf←c12596)+11)/* sLow←v3084 */  ) = 0;
SOURCE(1825, 15)
         (* (( (ptr) gf←c12596)+10)/* sHigh←v3056 */  ) = ((* (( (ptr) gf←c12596)+10)/* sHigh←v3056 */  ) + 1);
         }
      else {
SOURCE(1886, 13)
         (* (( (ptr) gf←c12596)+11)/* sLow←v3084 */  ) = ((* (( (ptr) gf←c12596)+11)/* sLow←v3084 */  ) + 1);
         };
SOURCE(1903, 19)
      (* (( (ptr) realTq←v10640)+32) ) = (* (( (ptr) gf←c12596)+10)/* sHigh←v3056 */  );
SOURCE(1924, 18)
      (* (( (ptr) realTq←v10640)+33) ) = (* (( (ptr) gf←c12596)+11)/* sLow←v3084 */  );
      (void) (XR←MonitorExit(tq←v10612));
      };
SOURCE(2034, 59)
   if ((0 != reverse←v4052)) {
SOURCE(2052, 19)
      (* (( (ptr) tq←v4112)+32) ) = INEG((* (( (ptr) tq←v4112)+32) ));
SOURCE(2074, 19)
      (* (( (ptr) tq←v4112)+33) ) = INEG((* (( (ptr) tq←v4112)+33) ));
      };
SOURCE(1621, 472)
   return(tq←v4112);
   }

static void Enqueue←P420(tq←v4564, proc←v4592, data←v4620, event←v4648)
   word tq←v4564;
   word proc←v4592;
   word data←v4620;
   word event←v4648;
   {
   register ptr gf←c12628 =  (ptr) &globalframe;
   word p←v6684;
   word var←c12116;
   word mustFork←v10844;
   word tq←v10876;
   word data←v10904;
   word event←v10932;
   /* Enqueue: */ 
SOURCE(3030, 239)
SOURCE(3110, 23)
   p←v6684 = proc←v4592;
SOURCE(3170, 99)
   {
      word x18;
      tq←v10876 = tq←v4564;
      data←v10904 = data←v4620;
      event←v10932 = event←v4648;
SOURCE(2514, 507)
      (void) (XR←MonitorEntry(tq←v10876));
      {
         word job←v6656;
SOURCE(2514, 507)
         mustFork←v10844 = 0;
         {
            word job←v10688;
            word tq←v10720;
            tq←v10720 = tq←v10876;
SOURCE(2103, 187)
            job←v10688 = 0;
SOURCE(2172, 13)
            job←v10688 = (* (( (ptr) tq←v10720)+29) );
SOURCE(2187, 103)
            if ((job←v10688 != 0)) {
SOURCE(2205, 18)
               (* (( (ptr) tq←v10720)+29) ) = (* (( (ptr) job←v10688)+3) );
SOURCE(2225, 14)
               (* (( (ptr) job←v10688)+3) ) = 0;
SOURCE(2241, 25)
               (* (( (ptr) tq←v10720)+30) ) = ((* (( (ptr) tq←v10720)+30) ) - 1);
               }
            else {
SOURCE(2273, 17)
               job←v10688 = XR←NewObject(16, (* (( (ptr) gf←c12628)+19) ));
               };
SOURCE(2103, 187)
            job←v6656 = job←v10688;
            };
SOURCE(2669, 22)
         if ((0 != (* (( (ptr) tq←v10876)+34) ))) {
SOURCE(2685, 6)
            var←c12116 = mustFork←v10844;
            goto lab←L100011;
            };
SOURCE(2693, 15)
         (* (( (ptr) job←v6656)+2) ) = data←v10904;
SOURCE(2710, 15)
         (* (( (ptr) job←v6656)+1) ) = XR←CheckProc(p←v6684);
SOURCE(2727, 17)
         (*  (ptr) job←v6656 ) = event←v10932;
SOURCE(2746, 275)
         if (((* (( (ptr) tq←v10876)+12) ) == 0)) {
SOURCE(2769, 17)
            (* (( (ptr) tq←v10876)+11) ) = 1;
SOURCE(2788, 23)
            (* (( (ptr) tq←v10876)+12) ) = job←v6656;
            (* (( (ptr) tq←v10876)+13) ) = job←v6656;
SOURCE(2813, 65)
            if ((0 == (* (( (ptr) tq←v10876)+6) ))) {
SOURCE(2840, 21)
               (* (( (ptr) tq←v10876)+6) ) = 1;
SOURCE(2863, 15)
               mustFork←v10844 = 1;
               };
            }
         else {
SOURCE(2891, 33)
            (* (( (ptr) tq←v10876)+11) ) = ((* (( (ptr) tq←v10876)+11) ) + 1);
SOURCE(2926, 18)
            (* (( (ptr) (* (( (ptr) tq←v10876)+13) ))+3) ) = job←v6656;
SOURCE(2946, 13)
            (* (( (ptr) tq←v10876)+13) ) = job←v6656;
SOURCE(2961, 60)
            if (((* (( (ptr) tq←v10876)+11) ) > (* (( (ptr) tq←v10876)+27) ))) {
SOURCE(2997, 24)
               (void) ForgetQueuedElements←P60(tq←v10876);
               };
            };
SOURCE(2514, 507)
         var←c12116 = mustFork←v10844;
         };
      lab←L100011: ;
      (void) (XR←MonitorExit(tq←v10876));
      x18 =  (word) (0 != var←c12116);
      if (x18) {
SOURCE(3221, 48)
         {
            word pd19;
            pd19 = (* (( (ptr) (* (( (ptr) gf←c12628)+66)/* var←c12244 */  ))+4) );
            (void) ( *( (fPt) ((*  (ptr) pd19 ))))((word) (( (bPt) gf←c12628)+188)/* var←c11540 */ , tq←v4564, (* (( (ptr) tq←v4564)+36)
                ), pd19);
            };
         };
      };
   }

static void DispatcherProcess←P540(t←v4780)
   word t←v4780;
   {
   register ptr gf←c12660 =  (ptr) &globalframe;
   word tq←v6728;
   word job←v6784 = 0;
   /* DispatcherProcess: */ 
SOURCE(3407, 865)
SOURCE(3444, 18)
   tq←v6728 = XR←Narrow(t←v4780, (* (( (ptr) gf←c12660)+12) ));
SOURCE(4001, 33)
   {
      word pd20;
      pd20 = (* (( (ptr) (* (( (ptr) gf←c12660)+67)/* var←c12276 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd20 ))))((word) ((( (bPt) tq←v6728)+16)), pd20);
      };
SOURCE(4036, 236)
   lab←L100014: ;
SOURCE(4039, 90)
   {
      word tc21;
      W2 temp22;
      if (( (int)(* (( (ptr) tq←v6728)+26) ) >  (int)0)) {
         (*  (ptr) &temp22 ) = 0;
         (* (( (ptr) &temp22) + 1) ) = 0;
         tc21 =  (word) XR←EqualWords((( (ptr) tq←v6728)+8), &temp22, 2);
         }
      else {
         tc21 =  (word) 0;
         };
      if (tc21) {
SOURCE(4093, 19)
SOURCE(4093, 19)
         (void) (XR←MonitorEntry(tq←v6728));
SOURCE(3323, 80)
         {
            word tc23;
            W2 temp24;
            if (( (int)(* (( (ptr) tq←v6728)+26) ) >  (int)0)) {
               (*  (ptr) &temp24 ) = 0;
               (* (( (ptr) &temp24) + 1) ) = 0;
               tc23 =  (word) XR←EqualWords((( (ptr) tq←v6728)+8), &temp24, 2);
               }
            else {
               tc23 =  (word) 0;
               };
            if (tc23) {
SOURCE(3375, 28)
               (void) (XR←Broadcast((word) (( (bPt) tq←v6728)+80)));
               };
            };
         (void) (XR←MonitorExit(tq←v6728));
SOURCE(4114, 15)
         {
            word pd25;
            pd25 = (* (( (ptr) (* (( (ptr) gf←c12660)+67)/* var←c12276 */  ))+23) );
            (void) ( *( (fPt) ((*  (ptr) pd25 ))))(pd25);
            };
         };
      };
SOURCE(4134, 24)
   {
      word var←c12308;
      word job←v10996;
      word oldJob←v11028;
      oldJob←v11028 = job←v6784;
SOURCE(3464, 521)
      (void) (XR←MonitorEntry(tq←v6728));
SOURCE(3464, 521)
      job←v10996 = 0;
SOURCE(3538, 46)
      if ((oldJob←v11028 != 0)) {
SOURCE(3557, 27)
         {
            word tq←v10768;
            word job←v10796;
            tq←v10768 = tq←v6728;
            job←v10796 = oldJob←v11028;
SOURCE(2357, 14)
            (* (( (ptr) job←v10796)+2) ) = 0;
SOURCE(2420, 87)
            if (((* (( (ptr) tq←v10768)+30) ) < 25)) {
SOURCE(2444, 18)
               (* (( (ptr) job←v10796)+3) ) = (* (( (ptr) tq←v10768)+29) );
SOURCE(2464, 13)
               (* (( (ptr) tq←v10768)+29) ) = job←v10796;
SOURCE(2479, 28)
               (* (( (ptr) tq←v10768)+30) ) = ((* (( (ptr) tq←v10768)+30) ) + 1);
               };
            };
         };
SOURCE(3586, 13)
      job←v10996 = (* (( (ptr) tq←v6728)+12) );
SOURCE(3601, 168)
      if ((job←v10996 == 0)) {
SOURCE(3619, 22)
         (* (( (ptr) tq←v6728)+6) ) = 0;
SOURCE(3643, 13)
         (* (( (ptr) tq←v6728)+13) ) = 0;
SOURCE(3658, 20)
         {
            word tmpAddr26;
            tmpAddr26 = (word) (( (ptr) tq←v6728)+4);
            (*  (ptr) tmpAddr26 ) = 0;
            (* (( (ptr) tmpAddr26) + 1) ) = 0;
            };
SOURCE(3680, 79)
         {
            word tc27;
            W2 temp28;
            if (( (int)(* (( (ptr) tq←v6728)+26) ) >  (int)0)) {
               (*  (ptr) &temp28 ) = 0;
               (* (( (ptr) &temp28) + 1) ) = 0;
               tc27 =  (word) XR←EqualWords((( (ptr) tq←v6728)+8), &temp28, 2);
               }
            else {
               tc27 =  (word) 0;
               };
            if (tc27) {
SOURCE(3732, 27)
               (void) (XR←Broadcast((word) (( (bPt) tq←v6728)+80)));
               };
            };
SOURCE(3762, 7)
         var←c12308 = job←v10996;
         goto lab←L100016;
         };
SOURCE(3772, 31)
      (* (( (ptr) tq←v6728)+11) ) = ((* (( (ptr) tq←v6728)+11) ) - 1);
SOURCE(3805, 18)
      (* (( (ptr) tq←v6728)+12) ) = (* (( (ptr) job←v10996)+3) );
SOURCE(3825, 136)
      lab←L100019: ;
      {
         W2 temp29;
         (*  (ptr) &temp29 ) = 0;
         (* (( (ptr) &temp29) + 1) ) = 0;
         if ( ! XR←EqualWords((( (ptr) tq←v6728)+8), &temp29, 2)) {
            }
         else {
            goto lab←L100017;
            };
         };
SOURCE(3853, 41)
      (* (( (ptr) tq←v6728)+26) ) = ((* (( (ptr) tq←v6728)+26) ) + 1);
SOURCE(3896, 22)
      (void) (XR←Wait(tq←v6728, (word) (( (bPt) tq←v6728)+80)));
SOURCE(3920, 41)
      (* (( (ptr) tq←v6728)+26) ) = ((* (( (ptr) tq←v6728)+26) ) - 1);
      goto lab←L100019;
      lab←L100017: ;
SOURCE(3972, 13)
      (* (( (ptr) tq←v6728)+28) ) = job←v10996;
SOURCE(3464, 521)
      var←c12308 = job←v10996;
      lab←L100016: ;
      (void) (XR←MonitorExit(tq←v6728));
      job←v6784 = var←c12308;
      };
SOURCE(4160, 22)
   if ((job←v6784 == 0)) {
SOURCE(4176, 6)
      return;
      };
SOURCE(4184, 73)
   {
      word pd30;
      pd30 = (* (( (ptr) job←v6784)+1) );
      (void) ( *( (fPt) ((*  (ptr) pd30 ))))((*  (ptr) job←v6784 ), (* (( (ptr) job←v6784)+2) ), tq←v6728, pd30);
      };
SOURCE(4259, 13)
   (* (( (ptr) tq←v6728)+28) ) = 0;
   goto lab←L100014;
   }

static void AbortNotification←P600(t←v4852)
   word t←v4852;
   {
   register ptr gf←c12692 =  (ptr) &globalframe;
   word tq←v6960;
   /* AbortNotification: */ 
SOURCE(4287, 108)
SOURCE(4324, 18)
   tq←v6960 = XR←Narrow(t←v4852, (* (( (ptr) gf←c12692)+12) ));
SOURCE(4344, 13)
   (* (( (ptr) tq←v6960)+28) ) = 0;
SOURCE(4359, 19)
SOURCE(4359, 19)
   (void) (XR←MonitorEntry(tq←v6960));
SOURCE(3323, 80)
   {
      word tc31;
      W2 temp32;
      if (( (int)(* (( (ptr) tq←v6960)+26) ) >  (int)0)) {
         (*  (ptr) &temp32 ) = 0;
         (* (( (ptr) &temp32) + 1) ) = 0;
         tc31 =  (word) XR←EqualWords((( (ptr) tq←v6960)+8), &temp32, 2);
         }
      else {
         tc31 =  (word) 0;
         };
      if (tc31) {
SOURCE(3375, 28)
         (void) (XR←Broadcast((word) (( (bPt) tq←v6960)+80)));
         };
      };
   (void) (XR←MonitorExit(tq←v6960));
SOURCE(4380, 15)
   {
      word pd33;
      pd33 = (* (( (ptr) (* (( (ptr) gf←c12692)+67)/* var←c12276 */  ))+23) );
      (void) ( *( (fPt) ((*  (ptr) pd33 ))))(pd33);
      };
   }

static word IsTQ←P660(x←v4924)
   word x←v4924;
   {
   register ptr gf←c12724 =  (ptr) &globalframe;
   word b←v4980;
   /* IsTQ: */ 
SOURCE(4401, 81)
SOURCE(4454, 28)
   if ((x←v4924 != 0)) {
      if ((x←v4924 == 0)) {
         b←v4980 =  (unsigned) 1;
         }
      else {
         b←v4980 =  (unsigned) ((* (( (ptr) gf←c12724)+12) ) == XR←GetReferentType(x←v4924));
         };
      }
   else {
      b←v4980 =  (unsigned) 0;
      };
SOURCE(4401, 81)
   return(b←v4980);
   }

static word NarrowTQ←P720(x←v5040)
   word x←v5040;
   {
   register ptr gf←c12756 =  (ptr) &globalframe;
   word t←v5096;
   /* NarrowTQ: */ 
SOURCE(4486, 73)
SOURCE(4486, 73)
   t←v5096 = 0;
SOURCE(4541, 18)
   t←v5096 = XR←Narrow(x←v5040, (* (( (ptr) gf←c12756)+12) ));
SOURCE(4486, 73)
   return(t←v5096);
   }

static word OwnsLock←P840(tq←v5232)
   word tq←v5232;
   {
   register ptr gf←c12788 =  (ptr) &globalframe;
   word var←c5276;
   W2 self←v7004;
   /* OwnsLock: */ 
SOURCE(4666, 138)
SOURCE(4716, 32)
   {
      word pd34;
      pd34 = (* (( (ptr) (* (( (ptr) gf←c12788)+67)/* var←c12276 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd34 ))))((word) (&self←v7004), pd34);
      };
SOURCE(4750, 54)
   {
      word tc35;
      if (XR←EqualWords(&self←v7004, (( (ptr) tq←v5232)+4), 2)) {
         tc35 =  (word)  (unsigned) 1;
         }
      else {
         tc35 =  (word)  (unsigned) XR←EqualWords(&self←v7004, (( (ptr) tq←v5232)+8), 2);
         };
      return(tc35);
      };
   }

static word GetLockOrderNum←P900(tq←v5336)
   word tq←v5336;
   {
   word var←c5380;
   /* GetLockOrderNum: */ 
SOURCE(4807, 76)
SOURCE(4863, 20)
   return((* (( (ptr) tq←v5336)+31) ));
   }

static word GetLockOrder←P960(first←v5440, second←v5468)
   word first←v5440;
   word second←v5468;
   {
   word l←v5512;
   /* GetLockOrder: */ 
SOURCE(4886, 367)
SOURCE(4959, 294)
   if ((0 != (* (( (ptr) first←v5440)+34) )) || (0 != (* (( (ptr) second←v5468)+34) ))) {
      l←v5512 = 2;
      goto endif036;
      };
   if (( (int)(* (( (ptr) first←v5440)+31) ) <  (int)(* (( (ptr) second←v5468)+31) ))) {
      l←v5512 = 0;
      goto endif036;
      };
   if (( (int)(* (( (ptr) first←v5440)+31) ) >  (int)(* (( (ptr) second←v5468)+31) ))) {
      l←v5512 = 1;
      goto endif036;
      };
   if (( (int)(* (( (ptr) first←v5440)+32) ) <  (int)(* (( (ptr) second←v5468)+32) ))) {
      l←v5512 = 0;
      goto endif036;
      };
   if (( (int)(* (( (ptr) first←v5440)+32) ) >  (int)(* (( (ptr) second←v5468)+32) ))) {
      l←v5512 = 1;
      goto endif036;
      };
   if (( (int)(* (( (ptr) first←v5440)+33) ) <  (int)(* (( (ptr) second←v5468)+33) ))) {
      l←v5512 = 0;
      goto endif036;
      };
   if (( (int)(* (( (ptr) first←v5440)+33) ) >  (int)(* (( (ptr) second←v5468)+33) ))) {
      l←v5512 = 1;
      goto endif036;
      };
   if ((first←v5440 == second←v5468)) {
      l←v5512 = 0;
      goto endif036;
      };
   l←v5512 =  (unsigned) (
      XR←RaiseUnnamedError(), 0
      );
   goto endif036;
   endif036: ;
SOURCE(4886, 367)
   return(l←v5512);
   }

static void CallWithLocks←P1020(formal←c0160, formal←c0161, formal←c0162)
   word formal←c0160;
   word formal←c0161;
   word formal←c0162;
   {
   W7 var←c12820;
   /* declaration of proc←v5572 skipped */ 
   /* declaration of tq1←v5600 skipped */ 
   /* declaration of tq2←v5628 skipped */ 
   register ptr gf←c12852 =  (ptr) &globalframe;
   W2 self←v7064;
   var←c12820.f4/* proc←v5572 */  = formal←c0160;
   var←c12820.f5/* tq1←v5600 */  = formal←c0161;
   var←c12820.f6/* tq2←v5628 */  = formal←c0162;
   /* CallWithLocks: */ 
SOURCE(5258, 693)
SOURCE(5316, 32)
   {
      word pd37;
      pd37 = (* (( (ptr) (* (( (ptr) gf←c12852)+67)/* var←c12276 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd37 ))))((word) (&self←v7064), pd37);
      };
SOURCE(5350, 98)
   if (((var←c12820.f5/* tq1←v5600 */  == 0) || XR←EqualWords(&self←v7064, (( (ptr) var←c12820.f5/* tq1←v5600 */ )+4), 2)) || XR←EqualWords(
      &self←v7064, (( (ptr) var←c12820.f5/* tq1←v5600 */ )+8), 2)) {
SOURCE(5416, 23)
      (void) CallWithLock←P1260(var←c12820.f6/* tq2←v5628 */ , var←c12820.f4/* proc←v5572 */ );
SOURCE(5441, 7)
      return;
      };
SOURCE(5451, 109)
   if ((((var←c12820.f6/* tq2←v5628 */  == 0) || XR←EqualWords(&self←v7064, (( (ptr) var←c12820.f6/* tq2←v5628 */ )+4), 2)) || XR←EqualWords(
      &self←v7064, (( (ptr) var←c12820.f6/* tq2←v5628 */ )+8), 2)) || (var←c12820.f5/* tq1←v5600 */  == var←c12820.f6/* tq2←v5628 */ )) {
SOURCE(5528, 23)
      (void) CallWithLock←P1260(var←c12820.f5/* tq1←v5600 */ , var←c12820.f4/* proc←v5572 */ );
SOURCE(5553, 7)
      return;
      };
SOURCE(5563, 115)
   {
      word var←c12340;
      var←c12340 = (word) GetLockOrder←P960(var←c12820.f5/* tq1←v5600 */ , var←c12820.f6/* tq2←v5628 */ );
      if ((var←c12340 == 0)) {
         }
      else {
         if ((var←c12340 == 1)) {
SOURCE(5620, 32)
            {
               word t←v7124;
SOURCE(5621, 11)
               t←v7124 = var←c12820.f5/* tq1←v5600 */ ;
SOURCE(5634, 9)
               var←c12820.f5/* tq1←v5600 */  = var←c12820.f6/* tq2←v5628 */ ;
SOURCE(5645, 7)
               var←c12820.f6/* tq2←v5628 */  = t←v7124;
               };
            }
         else {
SOURCE(5666, 12)
            (void) XR←RaiseError((word) (( (bPt) gf←c12852)+80)/* var←c11092 */ , 0);
            };
         };
      };
SOURCE(5680, 271)
   lab←L100023: ;
SOURCE(5683, 268)
   if ((0 != (word) TryAquireLock←P1140(var←c12820.f5/* tq1←v5600 */ , self←v7064))) {
SOURCE(5719, 194)
      if ((0 != (word) TryAquireLock←P1140(var←c12820.f6/* tq2←v5628 */ , self←v7064))) {
SOURCE(5755, 54)
         {
            word var←c0148;
            var←c0148 = (word) &var←c12820;
             (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q2076) ), ( ((word)  (fPt) NoName←Q2256) ), var←c0148);
            };
SOURCE(5816, 16)
         (void) ReleaseLock←P1200(var←c12820.f6/* tq2←v5628 */ );
SOURCE(5834, 16)
         (void) ReleaseLock←P1200(var←c12820.f5/* tq1←v5600 */ );
SOURCE(5852, 7)
         return;
         }
      else {
SOURCE(5868, 16)
         (void) ReleaseLock←P1200(var←c12820.f5/* tq1←v5600 */ );
SOURCE(5886, 27)
         (void) WaitForFreeOnce←P1080(var←c12820.f6/* tq2←v5628 */ , self←v7064);
         };
      }
   else {
SOURCE(5924, 27)
      (void) WaitForFreeOnce←P1080(var←c12820.f5/* tq1←v5600 */ , self←v7064);
      };
   goto lab←L100023;
   }

static word NoName←Q2076(formal←c0144)
   word formal←c0144;
   {
SOURCE(5755, 54)
   {
      word pd38;
      pd38 = (* (( (ptr) formal←c0144)+4) );
      (void) ( *( (fPt) ((*  (ptr) pd38 ))))(pd38);
      };
   return(0);
   }

static void WaitForFreeOnce←P1080(tq←v5704, self←v5732)
   word tq←v5704;
   W2 self←v5732;
   {
   /* WaitForFreeOnce: */ 
SOURCE(5968, 236)
   (void) (XR←MonitorEntry(tq←v5704));
SOURCE(6024, 180)
   {
      word tc40;
      W2 temp41;
      if (((* (( (ptr) tq←v5704)+28) ) != 0)) { goto then039;};
      (*  (ptr) &temp41 ) = 0;
      (* (( (ptr) &temp41) + 1) ) = 0;
      if ( ! XR←EqualWords((( (ptr) tq←v5704)+8), &temp41, 2)) {
         tc40 =  (word)  ! XR←EqualWords((( (ptr) tq←v5704)+8), &self←v5732, 2);
         }
      else {
         tc40 =  (word) 0;
         };
      if (tc40) {
         then039: ;
SOURCE(6094, 42)
         (* (( (ptr) tq←v5704)+26) ) = ((* (( (ptr) tq←v5704)+26) ) + 1);
SOURCE(6138, 22)
         (void) (XR←Wait(tq←v5704, (word) (( (bPt) tq←v5704)+80)));
SOURCE(6162, 42)
         (* (( (ptr) tq←v5704)+26) ) = ((* (( (ptr) tq←v5704)+26) ) - 1);
         };
      };
SOURCE(5968, 236)
   (void) (XR←MonitorExit(tq←v5704));
   return;
   }

static word TryAquireLock←P1140(tq←v5808, self←v5836)
   word tq←v5808;
   W2 self←v5836;
   {
   word var←c5896;
   /* TryAquireLock: */ 
SOURCE(6213, 272)
   (void) (XR←MonitorEntry(tq←v5808));
SOURCE(6213, 272)
   var←c5896 = 0;
SOURCE(6290, 34)
   if (((* (( (ptr) tq←v5808)+28) ) != 0)) {
SOURCE(6310, 14)
      (void) (XR←MonitorExit(tq←v5808));
      return(0);
      };
SOURCE(6326, 82)
   {
      W2 temp42;
      (*  (ptr) &temp42 ) = 0;
      (* (( (ptr) &temp42) + 1) ) = 0;
      if (XR←EqualWords((( (ptr) tq←v5808)+8), &temp42, 2)) {
SOURCE(6354, 16)
         (* (( (ptr) tq←v5808)+10) ) = 1;
SOURCE(6372, 21)
         (*  (W2Pt) (( (ptr) tq←v5808)+8) ) = self←v5836;
SOURCE(6395, 13)
         (void) (XR←MonitorExit(tq←v5808));
         return(1);
         };
      };
SOURCE(6412, 73)
   if (XR←EqualWords((( (ptr) tq←v5808)+8), &self←v5836, 2)) {
SOURCE(6441, 29)
      (* (( (ptr) tq←v5808)+10) ) = ((* (( (ptr) tq←v5808)+10) ) + 1);
SOURCE(6472, 13)
      (void) (XR←MonitorExit(tq←v5808));
      return(1);
      };
SOURCE(6213, 272)
   (void) (XR←MonitorExit(tq←v5808));
   return(var←c5896);
   }

static void ReleaseLock←P1200(tq←v5956)
   word tq←v5956;
   {
   /* ReleaseLock: */ 
SOURCE(6493, 174)
   (void) (XR←MonitorEntry(tq←v5956));
SOURCE(6530, 29)
   (* (( (ptr) tq←v5956)+10) ) = ((* (( (ptr) tq←v5956)+10) ) - 1);
SOURCE(6563, 104)
   if (((* (( (ptr) tq←v5956)+10) ) == 0)) {
SOURCE(6588, 20)
      {
         word tmpAddr43;
         tmpAddr43 = (word) (( (ptr) tq←v5956)+8);
         (*  (ptr) tmpAddr43 ) = 0;
         (* (( (ptr) tmpAddr43) + 1) ) = 0;
         };
SOURCE(6610, 57)
      if (( (int)(* (( (ptr) tq←v5956)+26) ) >  (int)0)) {
SOURCE(6639, 28)
         (void) (XR←Broadcast((word) (( (bPt) tq←v5956)+80)));
         };
      };
SOURCE(6493, 174)
   (void) (XR←MonitorExit(tq←v5956));
   return;
   }

static void CallWithLock←P1260(formal←c0163, formal←c0164)
   word formal←c0163;
   word formal←c0164;
   {
   W6 var←c12884;
   /* declaration of tq←v6016 skipped */ 
   /* declaration of proc←v6044 skipped */ 
   register ptr gf←c12916 =  (ptr) &globalframe;
   W2 self←v7168;
   var←c12884.f4/* tq←v6016 */  = formal←c0163;
   var←c12884.f5/* proc←v6044 */  = formal←c0164;
   /* CallWithLock: */ 
SOURCE(6674, 328)
SOURCE(6725, 32)
   {
      word pd44;
      pd44 = (* (( (ptr) (* (( (ptr) gf←c12916)+67)/* var←c12276 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd44 ))))((word) (&self←v7168), pd44);
      };
SOURCE(6759, 76)
   if (((var←c12884.f4/* tq←v6016 */  == 0) || XR←EqualWords(&self←v7168, (( (ptr) var←c12884.f4/* tq←v6016 */ )+4), 2)) || XR←EqualWords(
      &self←v7168, (( (ptr) var←c12884.f4/* tq←v6016 */ )+8), 2)) {
SOURCE(6821, 6)
      {
         word pd45;
         pd45 = (word) (var←c12884.f5/* proc←v6044 */ );
         (void) ( *( (fPt) ((*  (ptr) pd45 ))))(pd45);
         };
SOURCE(6829, 6)
      return;
      };
SOURCE(6838, 28)
   if ((0 != (* (( (ptr) var←c12884.f4/* tq←v6016 */ )+34) ))) {
SOURCE(6854, 12)
      (void) XR←RaiseError((word) (( (bPt) gf←c12916)+80)/* var←c11092 */ , 0);
      };
SOURCE(6868, 134)
   lab←L100028: ;
SOURCE(6871, 93)
   if ((0 != (word) TryAquireLock←P1140(var←c12884.f4/* tq←v6016 */ , self←v7168))) {
SOURCE(6905, 33)
      {
         word var←c0149;
         var←c0149 = (word) &var←c12884;
          (void) (word) XR←Enable(( ((word)  (fPt) NoName←Q2136) ), ( ((word)  (fPt) NoName←Q2196) ), var←c0149);
         };
SOURCE(6940, 15)
      (void) ReleaseLock←P1200(var←c12884.f4/* tq←v6016 */ );
SOURCE(6958, 6)
      return;
      };
SOURCE(6969, 33)
   (void) WaitForFreeOnce←P1080(var←c12884.f4/* tq←v6016 */ , self←v7168);
   goto lab←L100028;
   }

static word NoName←Q2136(formal←c0146)
   word formal←c0146;
   {
SOURCE(6905, 33)
   {
      word pd46;
      pd46 = (* (( (ptr) formal←c0146)+5) );
      (void) ( *( (fPt) ((*  (ptr) pd46 ))))(pd46);
      };
   return(0);
   }

static void SetTQPriority←P1320(tq←v6120, priority←v6148)
   word tq←v6120;
   word priority←v6148;
   {
   /* SetTQPriority: */ 
SOURCE(7008, 90)
SOURCE(7076, 22)
   (* (( (ptr) tq←v6120)+36) ) = priority←v6148;
   }

static void SetTQReadiness←P1380(tq←v6208, ms←v6236)
   word tq←v6208;
   word ms←v6236;
   {
   /* SetTQReadiness: */ 
   }

static void NoName←Q2196(formal←c0120, formal←c200008, formal←c200009, formal←c200010, formal←c200011)
   word formal←c0120;
   word formal←c200008;
   word formal←c200009;
   word formal←c200010;
   word formal←c200011;
   {
   if ((formal←c200009 == XR←Unwind)) {
SOURCE(6922, 16)
      (void) ReleaseLock←P1200((* ((( (ptr) formal←c200008)+4)) ));
      };
   (*  (ptr) formal←c0120 ) = 0;
   (* (( (ptr) formal←c0120)+1) ) = 0;
   return;
   }

static void NoName←Q2256(formal←c0125, formal←c200004, formal←c200005, formal←c200006, formal←c200007)
   word formal←c0125;
   word formal←c200004;
   word formal←c200005;
   word formal←c200006;
   word formal←c200007;
   {
   if ((formal←c200005 == XR←Unwind)) {
SOURCE(5774, 16)
      (void) ReleaseLock←P1200((* ((( (ptr) formal←c200004)+6)) ));
SOURCE(5793, 16)
      (void) ReleaseLock←P1200((* ((( (ptr) formal←c200004)+5)) ));
      };
   (*  (ptr) formal←c0125 ) = 0;
   (* (( (ptr) formal←c0125)+1) ) = 0;
   return;
   }

static void NoName←Q2316(formal←c0130, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c0130;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   if ((formal←c200001 == XR←Unwind)) {
      (void) (XR←MonitorExit(* (( (ptr) formal←c200000)+4) ));
      };
   (*  (ptr) formal←c0130 ) = 0;
   (* (( (ptr) formal←c0130)+1) ) = 0;
   return;
   }

/* file: XlImplTQ, module: XlImplTQ, compiled at: August 13, 1993 12:19:28 pm PDT */ 
extern void XR←install←XlImplTQ() {
   NoName←Q1956();
   }
extern void XR←run←XlImplTQ() { XR←Start(&globalframe); }