/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: April 9, 1992 11:43:32 pm PDT */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: GGStoragePoolsImpl, module: GGStoragePoolsImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [4047108235,966966463] GGStoragePoolsImpl";
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 void NoName←Q300();
static void GGStoragePoolsImpl←P0();
static word CreateClass←P60();
static word CreatePool←P120();
static word Allocate←P180();
static void Free←P240();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\066\171\236\174\300\023\130\350\134\100\244\000\000"};
static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"};
static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\066\171\236\174\300\023\130\350\134\100\260\000\000"};
static struct {unsigned f; char r[4];} string4 = {131074, "\0040\000"};
static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\361\071\370\213\300\071\242\274\277\100\164\000\000"};
static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\066\171\236\174\300\023\130\350\134\100\150\000\000"};
static struct {
   word f0[6]; word f6; word f7; word f8; 
   word f9; word f10; word f11; word f12; 
   word f13; word f14; word f15[2]; 
   } globalframe = {
   {0}, (word) Free←P240, 0, (word) Allocate←P180, 
   0, (word) CreatePool←P120, 0, (word) CreateClass←P60, 
   0, (word) GGStoragePoolsImpl←P0, {0}
   };

static void NoName←Q300()
   {
   register ptr gf←c024 =  (ptr) &globalframe;
   word var←c4408;
   (* (( (ptr) gf←c024)+4) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c024)+5) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4);
   (void) XR←DeclareGlobalFrame((word) "GGStoragePoolsImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string5)), (word) (
         ( (bPt) gf←c024)+56)/* var←c4280 */ );
   var←c4408 = (word) XR←ExportInterface((word) "GGStoragePools", (word) XR←GetTypeIndexS((word) (&string6)), 4);
   (* (( (ptr) gf←c024)+16)/* var←c4376 */  ) = var←c4408;
   (void) XR←ExportProcS(var←c4408, (word) (( (bPt) gf←c024)+48)/* var←c4248 */ , 67895299);
   (void) XR←ExportProcS(var←c4408, (word) (( (bPt) gf←c024)+40)/* var←c4216 */ , 67633410);
   (void) XR←ExportProcS(var←c4408, (word) (( (bPt) gf←c024)+32)/* var←c4184 */ , 67371521);
   (void) XR←ExportProcS(var←c4408, (word) (( (bPt) gf←c024)+24)/* var←c4152 */ , 525058);
   }

static void GGStoragePoolsImpl←P0(formal←c010, formal←c09)
   word formal←c010;
   word formal←c09;
   {
   /* GGStoragePoolsImpl: */ 
   }

static word CreateClass←P60(name←v2820, allocate←v2848, free←v2876)
   word name←v2820;
   word allocate←v2848;
   word free←v2876;
   {
   register ptr gf←c4440 =  (ptr) &globalframe;
   word class←v2920;
   /* CreateClass: */ 
SOURCE(487, 173)
SOURCE(487, 173)
   class←v2920 = 0;
SOURCE(603, 57)
   {
      word var←c4312;
      var←c4312 = XR←NewObject(12, (* (( (ptr) gf←c4440)+4) ));
      (*  (ptr) var←c4312 ) = name←v2820;
      (* (( (ptr) var←c4312)+1) ) = XR←CheckProc(allocate←v2848);
      (* (( (ptr) var←c4312)+2) ) = XR←CheckProc(free←v2876);
      class←v2920 = var←c4312;
      };
SOURCE(487, 173)
   return(class←v2920);
   }

static word CreatePool←P120(class←v2980, makeStorage←v3008)
   word class←v2980;
   word makeStorage←v3008;
   {
   register ptr gf←c4472 =  (ptr) &globalframe;
   word pool←v3052;
   /* CreatePool: */ 
SOURCE(666, 185)
SOURCE(666, 185)
   pool←v3052 = 0;
SOURCE(778, 54)
   {
      word var←c4344;
      var←c4344 = XR←NewObject(24, (* (( (ptr) gf←c4472)+5) ));
      (* (( (ptr) var←c4344)+4) ) = class←v2980;
      pool←v3052 = var←c4344;
      };
SOURCE(834, 17)
   (void) ( *( (fPt) ((*  (ptr) makeStorage←v3008 ))))(pool←v3052, makeStorage←v3008);
SOURCE(666, 185)
   return(pool←v3052);
   }

static word Allocate←P180(pool←v3112)
   word pool←v3112;
   {
   word item←v3156;
   /* Allocate: */ 
SOURCE(856, 108)
   (void) (XR←MonitorEntry(pool←v3112));
SOURCE(856, 108)
   item←v3156 = 0;
SOURCE(932, 32)
   {
      word pd7;
      pd7 = (* (( (ptr) (* (( (ptr) pool←v3112)+4) ))+1) );
      item←v3156 = (word) ( *( (fPt) ((*  (ptr) pd7 ))))(pool←v3112, pd7);
      };
SOURCE(856, 108)
   (void) (XR←MonitorExit(pool←v3112));
   return(item←v3156);
   }

static void Free←P240(pool←v3232, item←v3260)
   word pool←v3232;
   word item←v3260;
   {
   /* Free: */ 
SOURCE(969, 90)
   (void) (XR←MonitorEntry(pool←v3232));
SOURCE(1032, 27)
   {
      word pd8;
      pd8 = (* (( (ptr) (* (( (ptr) pool←v3232)+4) ))+2) );
      (void) ( *( (fPt) ((*  (ptr) pd8 ))))(pool←v3232, item←v3260, pd8);
      };
SOURCE(969, 90)
   (void) (XR←MonitorExit(pool←v3232));
   return;
   }

/* file: GGStoragePoolsImpl, module: GGStoragePoolsImpl, compiled at: April 9, 1992 11:43:32 pm PDT */ 
extern void XR←install←GGStoragePoolsImpl() {
   NoName←Q300();
   }
extern void XR←run←GGStoragePoolsImpl() { XR←Start(&globalframe); }