

#include "BUILTIN.h"

#include "Nat.h"
extern OBJ __ASeq_6;

#include "ComService.h"

#define __AComService_Seg_O1_L15 __AComService_15
#define _AComService_Seg_O1_L15 _AComService_15
#define AComService_15 AComService_Seg_O1_L15
extern OBJ __AComService_Seg_O1_L15;
extern OBJ _AComService_Seg_O1_L15(OBJ);
OBJ __AComService_Asap; /* sap */
extern OBJ _AComService_S2(OBJ,OBJ);OBJ __AComService_S2; /* @ */
extern OBJ _AComService_Seg(OBJ,OBJ,OBJ);OBJ __AComService_Seg; /* => */
extern OBJ _AComService_Seg_O1(OBJ,OBJ);OBJ __AComService_Seg_O1; /* =>,1 */
extern OBJ _AComService_Aboxed(OBJ,OBJ);OBJ __AComService_Aboxed; /* boxed */
extern OBJ _AComService_Aboxed_(OBJ);OBJ __AComService_Aboxed_; /* boxed? */
extern OBJ _AComService_As2(OBJ);OBJ __AComService_As2; /* s2 */
extern OBJ _AComService_As1(OBJ);OBJ __AComService_As1; /* s1 */
extern OBJ _AComService_AsapProc(OBJ);OBJ __AComService_AsapProc; /* sapProc */
extern OBJ _AComService_ArequestProc(OBJ,OBJ,OBJ);OBJ __AComService_ArequestProc; /* requestProc */
extern OBJ _AComService_AprovideProc(OBJ,OBJ,OBJ,OBJ);OBJ __AComService_AprovideProc; /* provideProc */
extern OBJ _AComService_Seg_O1_L15(OBJ);OBJ __AComService_Seg_O1_L15; /* =>,1'15 */

#include "ComService.hc.c"

extern OBJ _AComService_S2(OBJ x1,OBJ x2) /* @ */
{OBJ r;
 CPCLS(__AComService_ArequestProc,1);
 {OBJ x3;
  x3=(*(OBJ(*)(OBJ,OBJ,OBJ))METHOD(__AComService_ArequestProc,2))(__AComService_ArequestProc,x1,x2);
  PRD(2,0,r);FLD(r,1)=x3;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _AComService_Seg(OBJ x1,OBJ x2,OBJ x3) /* => */
{OBJ r;
 CPCLS(__AComService_AprovideProc,1);
 {OBJ x4;
  x4=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__AComService_AprovideProc,3))(__AComService_AprovideProc,x1,x2,x3);
  PRD(2,0,r);FLD(r,1)=x4;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _AComService_Seg_O1(OBJ x1,OBJ x2) /* =>,1 */
{OBJ r;
 CPCLS(__AComService_AprovideProc,1);
 CPCLS(__AComService_Seg_O1_L15,1);
 {OBJ x3;
  x3=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))METHOD(__AComService_AprovideProc,3))(__AComService_AprovideProc,x1,__AComService_Seg_O1_L15,x2);
  PRD(2,0,r);FLD(r,1)=x3;FLD(r,2)=__ASeq_6;}
 return r;}

extern OBJ _AComService_Aboxed(OBJ x1,OBJ x2) /* boxed */
{OBJ r;
 PRD1F(2,r);FLD1(r,1)=x1;FLD1(r,2)=x2;
 return r;}

extern OBJ _AComService_Aboxed_(OBJ x1) /* boxed? */
{OBJ r;
 FRPRD(x1,1);
 r=__ABUILTIN_5;
 return r;}

extern OBJ _AComService_As2(OBJ x1) /* s2 */
{OBJ r;
 {OBJ x3=FLD1(x1,2);
  if(EXPRD(x1,1)){
   r=x3;
   DSPRDF(x1);
  }else{
   r=x3;
   FRPRD(x1,1);}}
 return r;}

extern OBJ _AComService_As1(OBJ x1) /* s1 */
{OBJ r;
 {OBJ x2=FLD1(x1,1);
  if(EXPRD(x1,1)){
   r=x2;
   DSPRDF(x1);
  }else{
   r=x2;
   FRPRD(x1,1);}}
 return r;}

extern OBJ _AComService_Seg_O1_L15(OBJ x1) /* =>,1'15 */
{OBJ r;
 FREE(x1,1);
 r=__ABUILTIN_5;
 return r;}


static OBJ _mt_4_0_3(OBJ t,OBJ t1,OBJ t2,OBJ t3) 
{OBJ r;
 DPCLS(t,r);
 INCCLS(r,0,3);
 FLDCLS(r,1)=t1;
 FLDCLS(r,2)=t2;
 FLDCLS(r,3)=t3;
 return r;}

static OBJ _mt_4_0_4(OBJ t,OBJ t1,OBJ t2,OBJ t3,OBJ t4) 
{OBJ r;
 DCCLS(t,1);
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(t1,t2,t3,t4);
 return r;}

static OBJ _mt_4_3_1(OBJ t,OBJ t1) 
{OBJ r;
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  COPY(FLDCLS(t,1),1);
  COPY(FLDCLS(t,2),1);
  COPY(FLDCLS(t,3),1);
  DCCLS(t,1);}
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1);
 return r;}
static OBJ _mt_4_3_1_l(OBJ t,OBJ t1) 
{OBJ r;
 r=(*(OBJ(*)(OBJ,OBJ,OBJ,OBJ))ENTRY(t))(FLDCLS(t,1),FLDCLS(t,2),FLDCLS(t,3),t1);
 if(EXCLS(t)){
  DSCLSF(t);
 }else{
  DCCLS(t,1);
  FLDCLS(t,1)=NIL;FLDCLS(t,2)=NIL;FLDCLS(t,3)=NIL;
  COPY(r,1);LZYCLS(t,r);}
 return r;}

init_AComService()
{
 static int visited=0; if(visited) return; visited=1;
 init_ACom();
 init_AVoid();
 init_ANat();
 init_ASeq();
 init_AOption();
 init_AComAgent();
 init_ASeqMap();
 init_AComCompose();
 init_AEQUALITY();
 CLS(1,_AComService_15,__AComService_15);
 CLS(4,_AComService_14,__AComService_14);
 CLS(3,_AComService_13,__AComService_13);
 CLS(1,_AComService_12,__AComService_12);
 CLS(1,_AComService_11,__AComService_11);
 CLS(1,_AComService_10,__AComService_10);
 CLS(1,_AComService_9,__AComService_9);
 CLS(2,_AComService_8,__AComService_8);
 CLS(2,_AComService_7,__AComService_7);
 CLS(3,_AComService_6,__AComService_6);
 CLS(2,_AComService_5,__AComService_5);
 MTH(4,0,3,_mt_4_0_3);LZYMTH(4,0,3,_mt_4_0_3);
 MTH(4,0,4,_mt_4_0_4);LZYMTH(4,0,4,_mt_4_0_4);
 MTH(4,3,1,_mt_4_3_1);LZYMTH(4,3,1,_mt_4_3_1_l);
 init_const_AComService();
 /* __AComService_Asap */
 CPCLS(__AComService_AsapProc,1);
 PRD(2,0,__AComService_Asap);FLD(__AComService_Asap,1)=__AComService_AsapProc;FLD(__AComService_Asap,2)=__ASeq_6;}

