/* Generated automatically from libextra.scm.  DO NOT EDIT */
#define LIBGAUCHE_BODY 
#include <gauche.h>
#include <gauche/code.h>


static ScmObj libextramake_fptr_simple(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(libextramake_fptr_simple__STUB, 1, 2,SCM_FALSE,libextramake_fptr_simple, NULL, NULL);


static ScmObj libextramake_fptr_unique(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(libextramake_fptr_unique__STUB, 1, 2,SCM_FALSE,libextramake_fptr_unique, NULL, NULL);


static ScmObj libextramake_fptr_maybe(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(libextramake_fptr_maybe__STUB, 1, 2,SCM_FALSE,libextramake_fptr_maybe, NULL, NULL);


static ScmObj libextrafptr_value(ScmObj*, int, void*);
static SCM_DEFINE_SUBR(libextrafptr_value__STUB, 1, 0,SCM_FALSE,libextrafptr_value, NULL, NULL);

#define PATH_ALLOC(n) SCM_MALLOC_ATOMIC(n)
#define PATH_ERROR(...) Scm_Error(__VA_ARGS__)
#include "paths.c"

static ScmObj libextrasubstitute_all(ScmObj*, int, void*);
static SCM_DEFINE_SUBRX(libextrasubstitute_all__STUB, 3, 0,0, SCM_FALSE,SCM_SUBR_IMMEDIATE_ARG, libextrasubstitute_all, NULL, NULL);

#if defined(__CYGWIN__) || defined(GAUCHE_WINDOWS)
#define SCM_CGEN_CONST /*empty*/
#else
#define SCM_CGEN_CONST const
#endif
static SCM_CGEN_CONST struct scm__scRec {
  ScmString d1563[23];
} scm__sc SCM_UNUSED = {
  {   /* ScmString d1563 */
      SCM_STRING_CONST_INITIALIZER("user", 4, 4),
      SCM_STRING_CONST_INITIALIZER("quote", 5, 5),
      SCM_STRING_CONST_INITIALIZER("make-fptr-simple", 16, 16),
      SCM_STRING_CONST_INITIALIZER("value", 5, 5),
      SCM_STRING_CONST_INITIALIZER("optional", 8, 8),
      SCM_STRING_CONST_INITIALIZER("attr", 4, 4),
      SCM_STRING_CONST_INITIALIZER("source-info", 11, 11),
      SCM_STRING_CONST_INITIALIZER("libextra.scm", 12, 12),
      SCM_STRING_CONST_INITIALIZER("bind-info", 9, 9),
      SCM_STRING_CONST_INITIALIZER("make-fptr-unique", 16, 16),
      SCM_STRING_CONST_INITIALIZER("make-fptr-maybe", 15, 15),
      SCM_STRING_CONST_INITIALIZER("fptr-value", 10, 10),
      SCM_STRING_CONST_INITIALIZER("fptr", 4, 4),
      SCM_STRING_CONST_INITIALIZER("substitute-all", 14, 14),
      SCM_STRING_CONST_INITIALIZER("input", 5, 5),
      SCM_STRING_CONST_INITIALIZER("mark", 4, 4),
      SCM_STRING_CONST_INITIALIZER("subst", 5, 5),
      SCM_STRING_CONST_INITIALIZER("main", 4, 4),
      SCM_STRING_CONST_INITIALIZER("usage: testgosh <test-script>", 29, 29),
      SCM_STRING_CONST_INITIALIZER("exit", 4, 4),
      SCM_STRING_CONST_INITIALIZER("load", 4, 4),
      SCM_STRING_CONST_INITIALIZER("args", 4, 4),
      SCM_STRING_CONST_INITIALIZER("unused-args", 11, 11),
  },
};
static struct scm__rcRec {
  ScmCompiledCode d1566[1];
  ScmWord d1565[21];
  ScmPair d1564[58] SCM_ALIGN_PAIR;
  ScmObj d1562[31];
} scm__rc SCM_UNUSED = {
  {   /* ScmCompiledCode d1566 */
        SCM_COMPILED_CODE_CONST_INITIALIZER(  /* main */
            (ScmWord*)(SCM_OBJ(&scm__rc.d1565[0])), 21,
            11, 1, 0, SCM_FALSE, SCM_NIL, SCM_OBJ(&scm__rc.d1564[57]),
            SCM_FALSE, SCM_FALSE),
  },
  {   /* ScmWord d1565 */
    /* main */
    0x00000076    /*   0 (LREF0-CDR) */,
    0x00000098    /*   1 (PAIRP) */,
    0x0000001e    /*   2 (BF) */,
    SCM_WORD((ScmWord*)SCM_OBJ(&scm__rc.d1565[0]) + 6),
    0x00000013    /*   4 (JUMP) */,
    SCM_WORD((ScmWord*)SCM_OBJ(&scm__rc.d1565[0]) + 13),
    0x0000200e    /*   6 (PRE-CALL 2) */,
    SCM_WORD((ScmWord*)SCM_OBJ(&scm__rc.d1565[0]) + 13),
    0x00001007    /*   8 (CONSTI-PUSH 1) */,
    0x00000006    /*   9 (CONST-PUSH) */,
    SCM_WORD(SCM_OBJ(&scm__sc.d1563[18])) /* "usage: testgosh <test-script>" */,
    0x0000205f    /*  11 (GREF-CALL 2) */,
    SCM_WORD(SCM_UNDEFINED) /* #<identifier #f#exit.3a3b7dc0> */,
    0x0000100e    /*  13 (PRE-CALL 1) */,
    SCM_WORD((ScmWord*)SCM_OBJ(&scm__rc.d1565[0]) + 19),
    0x0000003d    /*  15 (LREF0) */,
    0x00000083    /*  16 (CADR-PUSH) */,
    0x0000105f    /*  17 (GREF-CALL 1) */,
    SCM_WORD(SCM_UNDEFINED) /* #<identifier #f#load.3a3b7d40> */,
    0x00000002    /*  19 (CONSTI 0) */,
    0x00000014    /*  20 (RET) */,
  },
  {   /* ScmPair d1564 */
       { SCM_NIL, SCM_NIL },
       { SCM_NIL, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[1])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[3])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[4])},
       { SCM_MAKE_INT(21U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1563[7]), SCM_OBJ(&scm__rc.d1564[6])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[7])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[9])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[10])},
       { SCM_OBJ(&scm__rc.d1564[11]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[8]), SCM_OBJ(&scm__rc.d1564[12])},
       { SCM_MAKE_INT(23U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1563[7]), SCM_OBJ(&scm__rc.d1564[14])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[15])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[17])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[18])},
       { SCM_OBJ(&scm__rc.d1564[19]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[16]), SCM_OBJ(&scm__rc.d1564[20])},
       { SCM_MAKE_INT(25U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1563[7]), SCM_OBJ(&scm__rc.d1564[22])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[23])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[25])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[26])},
       { SCM_OBJ(&scm__rc.d1564[27]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[24]), SCM_OBJ(&scm__rc.d1564[28])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(29U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1563[7]), SCM_OBJ(&scm__rc.d1564[31])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[32])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[34])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[35])},
       { SCM_OBJ(&scm__rc.d1564[36]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[33]), SCM_OBJ(&scm__rc.d1564[37])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[39])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[40])},
       { SCM_MAKE_INT(54U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1563[7]), SCM_OBJ(&scm__rc.d1564[42])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[43])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[45])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[46])},
       { SCM_OBJ(&scm__rc.d1564[47]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[44]), SCM_OBJ(&scm__rc.d1564[48])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_MAKE_INT(64U), SCM_NIL},
       { SCM_OBJ(&scm__sc.d1563[7]), SCM_OBJ(&scm__rc.d1564[51])},
       { SCM_UNDEFINED, SCM_OBJ(&scm__rc.d1564[52])},
       { SCM_UNDEFINED, SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[54]), SCM_NIL},
       { SCM_OBJ(&scm__rc.d1564[53]), SCM_OBJ(&scm__rc.d1564[55])},
       { SCM_UNDEFINED, SCM_NIL},
  },
  {   /* ScmObj d1562 */
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
    SCM_UNBOUND,
  },
};
ScmClass *fptr_simple, *fptr_unique, *fptr_maybe;
 void print_fptr(ScmObj obj,ScmPort* sink,ScmWriteContext* mode){{
#line 14 "libextra.scm"
((void )(mode));
{ScmClass* k=Scm_ClassOf(obj);
Scm_Printf(sink,"#<fptr-%s %p>",
(((k)==(fptr_simple))?("simple"):(
(((k)==(fptr_unique))?("unique"):("maybe")))),
SCM_FOREIGN_POINTER_REF(void* ,obj));}}}
static ScmObj libextramake_fptr_simple(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj value_scm;
  ScmObj value;
  ScmObj attr_scm;
  ScmObj attr;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("make-fptr-simple");
  if (SCM_ARGCNT >= 3
      && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
    Scm_Error("too many arguments: up to 2 is expected, %d given.", SCM_ARGCNT + Scm_Length(SCM_ARGREF(SCM_ARGCNT-1)) - 1);
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  value_scm = SCM_SUBRARGS[0];
  value = (value_scm);
  if (SCM_ARGCNT > 1+1) {
    attr_scm = SCM_SUBRARGS[1];
  } else {
    attr_scm = SCM_OBJ(&scm__rc.d1564[2]);
  }
  attr = (attr_scm);
  {
{
ScmObj SCM_RESULT;

#line 22 "libextra.scm"
{SCM_RESULT=(Scm_MakeForeignPointerWithAttr(fptr_simple,value,attr));goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

static ScmObj libextramake_fptr_unique(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj value_scm;
  ScmObj value;
  ScmObj attr_scm;
  ScmObj attr;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("make-fptr-unique");
  if (SCM_ARGCNT >= 3
      && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
    Scm_Error("too many arguments: up to 2 is expected, %d given.", SCM_ARGCNT + Scm_Length(SCM_ARGREF(SCM_ARGCNT-1)) - 1);
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  value_scm = SCM_SUBRARGS[0];
  value = (value_scm);
  if (SCM_ARGCNT > 1+1) {
    attr_scm = SCM_SUBRARGS[1];
  } else {
    attr_scm = SCM_OBJ(&scm__rc.d1564[2]);
  }
  attr = (attr_scm);
  {
{
ScmObj SCM_RESULT;

#line 24 "libextra.scm"
{SCM_RESULT=(Scm_MakeForeignPointerWithAttr(fptr_unique,value,attr));goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

static ScmObj libextramake_fptr_maybe(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj value_scm;
  ScmObj value;
  ScmObj attr_scm;
  ScmObj attr;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("make-fptr-maybe");
  if (SCM_ARGCNT >= 3
      && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
    Scm_Error("too many arguments: up to 2 is expected, %d given.", SCM_ARGCNT + Scm_Length(SCM_ARGREF(SCM_ARGCNT-1)) - 1);
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  value_scm = SCM_SUBRARGS[0];
  value = (value_scm);
  if (SCM_ARGCNT > 1+1) {
    attr_scm = SCM_SUBRARGS[1];
  } else {
    attr_scm = SCM_OBJ(&scm__rc.d1564[2]);
  }
  attr = (attr_scm);
  {
{
ScmObj SCM_RESULT;

#line 26 "libextra.scm"
{SCM_RESULT=(Scm_MakeForeignPointerWithAttr(fptr_maybe,
((SCM_FALSEP(value))?(0):(value)),attr));goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

static ScmObj libextrafptr_value(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj fptr_scm;
  ScmObj fptr;
  ScmObj SCM_SUBRARGS[1];
  SCM_ENTER_SUBR("fptr-value");
  for (int SCM_i=0; SCM_i<1; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  fptr_scm = SCM_SUBRARGS[0];
  fptr = (fptr_scm);
  {
{
ScmObj SCM_RESULT;

#line 30 "libextra.scm"
{ScmClass* k=Scm_ClassOf(fptr);
if (!((((k)==(fptr_simple))||(
(k)==(fptr_unique)))||(
(k)==(fptr_maybe)))){{
Scm_Error("fptr required, but got: %S",fptr);}}
{SCM_RESULT=(SCM_OBJ_SAFE(SCM_FOREIGN_POINTER_REF(ScmObj,fptr)));goto SCM_STUB_RETURN;}}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_OBJ_SAFE(SCM_RESULT));
}
  }
}

static ScmObj libextrasubstitute_all(ScmObj *SCM_FP SCM_UNUSED, int SCM_ARGCNT SCM_UNUSED, void *data_ SCM_UNUSED)
{
  ScmObj input_scm;
  const char * input;
  ScmObj mark_scm;
  const char * mark;
  ScmObj subst_scm;
  const char * subst;
  ScmObj SCM_SUBRARGS[3];
  SCM_ENTER_SUBR("substitute-all");
  for (int SCM_i=0; SCM_i<3; SCM_i++) {
    SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
  }
  input_scm = SCM_SUBRARGS[0];
  if (!SCM_STRINGP(input_scm)) Scm_Error("const C string required, but got %S", input_scm);
  input = SCM_STRING_CONST_CSTRING(input_scm);
  mark_scm = SCM_SUBRARGS[1];
  if (!SCM_STRINGP(mark_scm)) Scm_Error("const C string required, but got %S", mark_scm);
  mark = SCM_STRING_CONST_CSTRING(mark_scm);
  subst_scm = SCM_SUBRARGS[2];
  if (!SCM_STRINGP(subst_scm)) Scm_Error("const C string required, but got %S", subst_scm);
  subst = SCM_STRING_CONST_CSTRING(subst_scm);
  {
{
const char * SCM_RESULT;

#line 58 "libextra.scm"
((void )(replace_install_dir));

#line 59 "libextra.scm"
((void )(get_libgauche_path));

#line 60 "libextra.scm"
{SCM_RESULT=(substitute_all(input,mark,subst));goto SCM_STUB_RETURN;}
goto SCM_STUB_RETURN;
SCM_STUB_RETURN:
SCM_RETURN(SCM_MAKE_STR_COPYING(SCM_RESULT));
}
  }
}

static ScmCompiledCode *toplevels[] = {
 NULL /*termination*/
};
void Scm_Init_libextra() {
   Scm_SelectModule(SCM_MODULE(SCM_OBJ(Scm_GaucheModule())));
  scm__rc.d1562[1] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[0])),TRUE); /* user */
  scm__rc.d1562[0] = SCM_OBJ(Scm_FindModule(SCM_SYMBOL(scm__rc.d1562[1]), SCM_FIND_MODULE_CREATE)); /* module user */
   Scm_SelectModule(SCM_MODULE(scm__rc.d1562[0]));
  scm__rc.d1562[2] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[1])),TRUE); /* quote */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[2]), scm__rc.d1562[2]);
  scm__rc.d1562[3] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[2])),TRUE); /* make-fptr-simple */
  scm__rc.d1562[4] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[3])),TRUE); /* value */
  scm__rc.d1562[5] = Scm_MakeKeyword(SCM_STRING(SCM_OBJ(&scm__sc.d1563[4]))); /* :optional */
  scm__rc.d1562[6] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[5])),TRUE); /* attr */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[3]), scm__rc.d1562[6]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[4]), scm__rc.d1562[5]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[5]), scm__rc.d1562[4]);
  scm__rc.d1562[7] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[6])),TRUE); /* source-info */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[8]), scm__rc.d1562[7]);
  scm__rc.d1562[8] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[8])),TRUE); /* bind-info */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[9]), scm__rc.d1562[3]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[10]), scm__rc.d1562[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[11]), scm__rc.d1562[8]);
  scm__rc.d1562[9] = Scm_MakeExtendedPair(scm__rc.d1562[3], SCM_OBJ(&scm__rc.d1564[5]), SCM_OBJ(&scm__rc.d1564[13]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1562[0]), SCM_SYMBOL(SCM_INTERN("make-fptr-simple")), SCM_OBJ(&libextramake_fptr_simple__STUB), 0);
  libextramake_fptr_simple__STUB.common.info = scm__rc.d1562[9];
  scm__rc.d1562[10] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[9])),TRUE); /* make-fptr-unique */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[16]), scm__rc.d1562[7]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[17]), scm__rc.d1562[10]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[18]), scm__rc.d1562[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[19]), scm__rc.d1562[8]);
  scm__rc.d1562[11] = Scm_MakeExtendedPair(scm__rc.d1562[10], SCM_OBJ(&scm__rc.d1564[5]), SCM_OBJ(&scm__rc.d1564[21]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1562[0]), SCM_SYMBOL(SCM_INTERN("make-fptr-unique")), SCM_OBJ(&libextramake_fptr_unique__STUB), 0);
  libextramake_fptr_unique__STUB.common.info = scm__rc.d1562[11];
  scm__rc.d1562[12] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[10])),TRUE); /* make-fptr-maybe */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[24]), scm__rc.d1562[7]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[25]), scm__rc.d1562[12]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[26]), scm__rc.d1562[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[27]), scm__rc.d1562[8]);
  scm__rc.d1562[13] = Scm_MakeExtendedPair(scm__rc.d1562[12], SCM_OBJ(&scm__rc.d1564[5]), SCM_OBJ(&scm__rc.d1564[29]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1562[0]), SCM_SYMBOL(SCM_INTERN("make-fptr-maybe")), SCM_OBJ(&libextramake_fptr_maybe__STUB), 0);
  libextramake_fptr_maybe__STUB.common.info = scm__rc.d1562[13];
  scm__rc.d1562[14] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[11])),TRUE); /* fptr-value */
  scm__rc.d1562[15] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[12])),TRUE); /* fptr */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[30]), scm__rc.d1562[15]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[33]), scm__rc.d1562[7]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[34]), scm__rc.d1562[14]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[35]), scm__rc.d1562[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[36]), scm__rc.d1562[8]);
  scm__rc.d1562[16] = Scm_MakeExtendedPair(scm__rc.d1562[14], SCM_OBJ(&scm__rc.d1564[30]), SCM_OBJ(&scm__rc.d1564[38]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1562[0]), SCM_SYMBOL(SCM_INTERN("fptr-value")), SCM_OBJ(&libextrafptr_value__STUB), 0);
  libextrafptr_value__STUB.common.info = scm__rc.d1562[16];

#line 38 "libextra.scm"
fptr_simple=(Scm_MakeForeignPointerClass(
Scm_UserModule(),"<fptr-simple>",print_fptr,NULL,0));

#line 40 "libextra.scm"
fptr_unique=(Scm_MakeForeignPointerClass(
Scm_UserModule(),"<fptr-simple>",print_fptr,NULL,SCM_FOREIGN_POINTER_KEEP_IDENTITY));

#line 43 "libextra.scm"
fptr_maybe=(Scm_MakeForeignPointerClass(
Scm_UserModule(),"<fptr-simple>",print_fptr,NULL,SCM_FOREIGN_POINTER_MAP_NULL));
  scm__rc.d1562[17] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[13])),TRUE); /* substitute-all */
  scm__rc.d1562[18] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[14])),TRUE); /* input */
  scm__rc.d1562[19] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[15])),TRUE); /* mark */
  scm__rc.d1562[20] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[16])),TRUE); /* subst */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[39]), scm__rc.d1562[20]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[40]), scm__rc.d1562[19]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[41]), scm__rc.d1562[18]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[44]), scm__rc.d1562[7]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[45]), scm__rc.d1562[17]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[46]), scm__rc.d1562[1]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[47]), scm__rc.d1562[8]);
  scm__rc.d1562[21] = Scm_MakeExtendedPair(scm__rc.d1562[17], SCM_OBJ(&scm__rc.d1564[41]), SCM_OBJ(&scm__rc.d1564[49]));
  Scm_MakeBinding(SCM_MODULE(scm__rc.d1562[0]), SCM_SYMBOL(SCM_INTERN("substitute-all")), SCM_OBJ(&libextrasubstitute_all__STUB), 0);
  libextrasubstitute_all__STUB.common.info = scm__rc.d1562[21];
  scm__rc.d1562[22] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[17])),TRUE); /* main */
  scm__rc.d1562[24] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[19])),TRUE); /* exit */
  scm__rc.d1562[25] = SCM_OBJ(Scm_FindModule(SCM_SYMBOL(scm__rc.d1562[1]), SCM_FIND_MODULE_CREATE|SCM_FIND_MODULE_PLACEHOLDING)); /* module user */
  scm__rc.d1562[23] = Scm_MakeIdentifier(scm__rc.d1562[24], SCM_MODULE(scm__rc.d1562[25]), SCM_NIL); /* user#exit */
  scm__rc.d1562[27] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[20])),TRUE); /* load */
  scm__rc.d1562[26] = Scm_MakeIdentifier(scm__rc.d1562[27], SCM_MODULE(scm__rc.d1562[25]), SCM_NIL); /* user#load */
  scm__rc.d1562[28] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[21])),TRUE); /* args */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[50]), scm__rc.d1562[28]);
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[53]), scm__rc.d1562[7]);
  scm__rc.d1562[29] = Scm_MakeSymbol(SCM_STRING(SCM_OBJ(&scm__sc.d1563[22])),TRUE); /* unused-args */
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[54]), scm__rc.d1562[29]);
  scm__rc.d1562[30] = Scm_MakeExtendedPair(scm__rc.d1562[22], SCM_OBJ(&scm__rc.d1564[50]), SCM_OBJ(&scm__rc.d1564[56]));
  SCM_SET_CAR(SCM_OBJ(&scm__rc.d1564[57]), scm__rc.d1562[30]);
  SCM_COMPILED_CODE(SCM_OBJ(&scm__rc.d1566[0]))->name = scm__rc.d1562[22];/* main */
  ((ScmWord*)SCM_OBJ(&scm__rc.d1565[0]))[12] = SCM_WORD(scm__rc.d1562[23]);
  ((ScmWord*)SCM_OBJ(&scm__rc.d1565[0]))[18] = SCM_WORD(scm__rc.d1562[26]);
  ScmObj G1567 = Scm_MakeClosure(SCM_OBJ(&scm__rc.d1566[0]), NULL);

  Scm_MakeBinding(SCM_MODULE(Scm_CurrentModule()) /*  */, SCM_SYMBOL(scm__rc.d1562[22]) /* main */, G1567,0);

  Scm_VMExecuteToplevels(toplevels);
}
