#include "opendylan/run-time.h"

/* Generated by Open Dylan 2014.1 for x86_64-linux */

/* Typedefs for referenced classes */

#define  define__KLsimple_object_vectorGVKd(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value size_; \
    dylan_value vector_element_[nrepeated+1]; \
  } _KLsimple_object_vectorGVKd_##nrepeated;
define__KLsimple_object_vectorGVKd(3);
define__KLsimple_object_vectorGVKd(5);
define__KLsimple_object_vectorGVKd(2);
define__KLsimple_object_vectorGVKd(0);
define__KLsimple_object_vectorGVKd(1);

typedef struct {
  dylan_value wrapper;
  dylan_value instanceQ_iep_;
  dylan_value debug_name_;
  dylan_value class_implementation_class_;
  dylan_value class_subtype_bit_;
  dylan_value class_module_;
} _KLclassGVKd;

#define  define__KLmm_wrapperGVKi(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value mm_wrapper_implementation_class_; \
    dylan_value mm_wrapper_subtype_mask_; \
    DWORD mm_wrapper_fixed_part_; \
    DWORD mm_wrapper_variable_part_; \
    dylan_value mm_wrapper_number_patterns_; \
    DWORD mm_wrapper_pattern_element_[nrepeated+1]; \
  } _KLmm_wrapperGVKi_##nrepeated;
define__KLmm_wrapperGVKi(1);
define__KLmm_wrapperGVKi(0);

typedef struct {
  dylan_value wrapper;
  dylan_value xep_;
  dylan_value function_signature_;
  dylan_value mep_;
} _KLsimple_methodGVKe;

typedef struct {
  dylan_value wrapper;
  dylan_value instanceQ_iep_;
  dylan_value debug_name_;
  dylan_value class_implementation_class_;
  dylan_value class_subtype_bit_;
  dylan_value class_module_;
} _KLfunction_classGVKi;

typedef struct {
  dylan_value wrapper;
  dylan_value head_;
  dylan_value tail_;
} _KLempty_listGVKd;

typedef struct {
  dylan_value wrapper;
} _KLobjectGVKd;

typedef struct {
  dylan_value wrapper;
} _KLunboundGVKe;

typedef struct {
  dylan_value wrapper;
} _KLbooleanGVKd;

typedef struct {
  dylan_value wrapper;
  dylan_value namespace_name_;
  dylan_value library_major_version_;
  dylan_value library_minor_version_;
  dylan_value library_build_count_;
  dylan_value used_libraries_;
  dylan_value all_used_libraries_;
  dylan_value runtime_module_;
  dylan_value library_defined_generics_;
  dylan_value library_number_static_dispatches_;
  dylan_value library_number_dynamic_dispatches_;
} _KLlibraryGVKe;

typedef struct {
  dylan_value wrapper;
  dylan_value library_major_version_;
  dylan_value library_minor_version_;
  dylan_value library_build_count_;
  dylan_value used_library_;
  dylan_value used_library_binding_;
} _KLused_libraryGVKe;

typedef struct {
  dylan_value wrapper;
  dylan_value symbol_name_;
} _KLsymbolGVKd;

#define  define__KLbyte_stringGVKd(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value size_; \
    char string_element_[nrepeated+1]; \
  } _KLbyte_stringGVKd_##nrepeated;
define__KLbyte_stringGVKd(5);
define__KLbyte_stringGVKd(25);

typedef struct {
  dylan_value wrapper;
  dylan_value Pprimitive_name_;
} _KLdylan_objectGVenvironment_protocols;

typedef struct {
  dylan_value wrapper;
} _KLserverGVenvironment_protocols;

typedef struct {
  dylan_value wrapper;
  dylan_value Pprimitive_name_;
} _KLenvironment_objectGVenvironment_protocols;

typedef struct {
  dylan_value wrapper;
  dylan_value Pprimitive_name_;
  dylan_value compiler_object_proxy_;
} _KLcompiler_objectGVenvironment_protocols;

typedef struct {
  dylan_value wrapper;
  dylan_value Pprimitive_name_;
  dylan_value compiler_object_proxy_;
} _KLdfmc_type_expression_objectGVdfmc_environment_database;

typedef struct {
  dylan_value wrapper;
  dylan_value Pprimitive_name_;
  dylan_value server_project_;
  dylan_value compiler_object_table_;
  dylan_value dfmc_database_proxy_;
  dylan_value module_name_proxies_;
} _KLdfmc_databaseGVdfmc_environment_database;

typedef struct {
  dylan_value wrapper;
  dylan_value proxy_name_;
  dylan_value proxy_library_;
} _KLmodule_name_proxyGVdfmc_environment_database;


/* Typedefs for defined classes */


/* Referenced object declarations */

extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
dylan_value Kinitialize_class_dispatch_keys_vectoredVKgI (dylan_value);
dylan_value KdoVKdMM0I (dylan_value, dylan_value, dylan_value);
extern _KLsimple_methodGVKe Kaugment_class_known_jointVKiMM0;
extern _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;
extern _KLempty_listGVKd KPempty_listVKi;
extern _KLclassGVKd KLempty_listGVKd;
extern _KLmm_wrapperGVKi_0 KLempty_listGVKdW;
dylan_value KPlibrary_version_checkVKeI (dylan_value, dylan_value);
extern _KLclassGVKd KLobjectGVKd;
extern _KLmm_wrapperGVKi_0 KLobjectGVKdW;
extern _KLunboundGVKe KPunboundVKi;
extern _KLclassGVKd KLunboundGVKe;
extern _KLmm_wrapperGVKi_0 KLunboundGVKeW;
extern _KLbooleanGVKd KPtrueVKi;
extern _KLclassGVKd KLbooleanGVKd;
extern _KLmm_wrapperGVKi_0 KLbooleanGVKdW;
extern _KLbooleanGVKd KPfalseVKi;
extern _KLclassGVKd KLlibraryGVKe;
extern _KLmm_wrapperGVKi_0 KLlibraryGVKeW;
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLclassGVKd KLused_libraryGVKe;
extern _KLmm_wrapperGVKi_0 KLused_libraryGVKeW;
extern _KLlibraryGVKe Kenvironment_protocols_libraryYdylan_userVenvironment_protocols;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLlibraryGVKe Kio_libraryYdylan_userVio;
extern _KLlibraryGVKe Kdfmc_browser_support_libraryYdylan_userVdfmc_browser_support;
extern _KLlibraryGVKe Kuser_projects_libraryYdylan_userVuser_projects;
extern _KLlibraryGVKe Kdfmc_conditions_libraryYdylan_userVdfmc_conditions;
extern _KLclassGVKd KLdylan_objectGVenvironment_protocols;
extern _KLmm_wrapperGVKi_0 KLdylan_objectGVenvironment_protocolsW;
extern _KLclassGVKd KLserverGVenvironment_protocols;
extern _KLmm_wrapperGVKi_0 KLserverGVenvironment_protocolsW;
extern _KLclassGVKd KLenvironment_objectGVenvironment_protocols;
extern _KLmm_wrapperGVKi_0 KLenvironment_objectGVenvironment_protocolsW;
extern _KLclassGVKd KLcompiler_objectGVenvironment_protocols;
extern _KLmm_wrapperGVKi_0 KLcompiler_objectGVenvironment_protocolsW;
extern _KLclassGVKd KLdfmc_type_expression_objectGVdfmc_environment_database;
extern _KLclassGVKd KLdfmc_databaseGVdfmc_environment_database;
extern _KLclassGVKd KLmodule_name_proxyGVdfmc_environment_database;

/* Defined object declarations */

static _KLsimple_object_vectorGVKd_2 K1;
static _KLsimple_object_vectorGVKd_2 K2;
extern _KLlibraryGVKe Kdfmc_environment_database_libraryYdylan_userVdfmc_environment_database;
static _KLbyte_stringGVKd_25 K6;
static _KLsimple_object_vectorGVKd_5 K7;
static _KLused_libraryGVKe K8;
static _KLused_libraryGVKe K9;
static _KLused_libraryGVKe K10;
static _KLused_libraryGVKe K11;
static _KLused_libraryGVKe K12;
static _KLsymbolGVKd KJtight_;
static _KLbyte_stringGVKd_5 K14;
static _KLsimple_object_vectorGVKd_1 K15;
static _KLsimple_object_vectorGVKd_1 K16;
static _KLsimple_object_vectorGVKd_3 K17;

/* Indirection variables */

static dylan_value IKJtight_ = &KJtight_;

/* Variables */

dylan_value dfmc_environment_database_libraryYdylan_userVdfmc_environment_database = &Kdfmc_environment_database_libraryYdylan_userVdfmc_environment_database;

/* Objects */

static _KLsimple_object_vectorGVKd_2 K1 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &K15,
  &K16
};

static _KLsimple_object_vectorGVKd_2 K2 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KLdylan_objectGVenvironment_protocols,
  &KLserverGVenvironment_protocols
};

_KLlibraryGVKe Kdfmc_environment_database_libraryYdylan_userVdfmc_environment_database = {
  &KLlibraryGVKeW /* wrapper */,
  &K6,
  (dylan_value) 1,
  (dylan_value) 1,
  (dylan_value) 239311881,
  &K7,
  &KPempty_vectorVKi,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (dylan_value) 1413,
  (dylan_value) 1297
};

static _KLbyte_stringGVKd_25 K6 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 101,
  "dfmc-environment-database"
};

static _KLsimple_object_vectorGVKd_5 K7 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 21,
  &K8,
  &K9,
  &K10,
  &K11,
  &K12
};

static _KLused_libraryGVKe K8 = {
  &KLused_libraryGVKeW /* wrapper */,
  (dylan_value) 1,
  (dylan_value) 1,
  (dylan_value) 238283689,
  &Kdfmc_conditions_libraryYdylan_userVdfmc_conditions,
  &KJtight_
};

static _KLused_libraryGVKe K9 = {
  &KLused_libraryGVKeW /* wrapper */,
  (dylan_value) 1,
  (dylan_value) 1,
  (dylan_value) 239247817,
  &Kuser_projects_libraryYdylan_userVuser_projects,
  &KJtight_
};

static _KLused_libraryGVKe K10 = {
  &KLused_libraryGVKeW /* wrapper */,
  (dylan_value) 1,
  (dylan_value) 1,
  (dylan_value) 238917865,
  &Kdfmc_browser_support_libraryYdylan_userVdfmc_browser_support,
  &KJtight_
};

static _KLused_libraryGVKe K11 = {
  &KLused_libraryGVKeW /* wrapper */,
  (dylan_value) 9,
  (dylan_value) 5,
  (dylan_value) 237568009,
  &Kio_libraryYdylan_userVio,
  &KJtight_
};

static _KLused_libraryGVKe K12 = {
  &KLused_libraryGVKeW /* wrapper */,
  (dylan_value) 9,
  (dylan_value) 5,
  (dylan_value) 237881673,
  &Kenvironment_protocols_libraryYdylan_userVenvironment_protocols,
  &KJtight_
};

static _KLsymbolGVKd KJtight_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K14
};

static _KLbyte_stringGVKd_5 K14 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 21,
  "tight"
};

static _KLsimple_object_vectorGVKd_1 K15 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 5,
  &KLcompiler_objectGVenvironment_protocols
};

static _KLsimple_object_vectorGVKd_1 K16 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 5,
  &KLenvironment_objectGVenvironment_protocols
};

static _KLsimple_object_vectorGVKd_3 K17 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KLdfmc_type_expression_objectGVdfmc_environment_database,
  &KLdfmc_databaseGVdfmc_environment_database,
  &KLmodule_name_proxyGVdfmc_environment_database
};

/* Code */


/* SYSTEM INIT CODE */

void _Init_dfmc_environment_database__X_library_for_system () {
  extern dylan_value KPresolve_symbolVKiI(dylan_value);
  {
    dylan_value T0;

    T0 = KPresolve_symbolVKiI(&KJtight_);
    if (T0 != &KJtight_) {
      primitive_slot_value_setter(T0, &K8, 4);
      primitive_slot_value_setter(T0, &K9, 4);
      primitive_slot_value_setter(T0, &K10, 4);
      primitive_slot_value_setter(T0, &K11, 4);
      primitive_slot_value_setter(T0, &K12, 4);
    }
  }
  return;
}

/* USER INIT CODE */

void _Init_dfmc_environment_database__X_library_for_user () {
{
  _KLsimple_object_vectorGVKd_1 T0 = {&KLsimple_object_vectorGVKdW, (dylan_value) 5};
  dylan_value T1;

  Kinitialize_class_dispatch_keys_vectoredVKgI(&K17);
  T0.vector_element_[0] = &K1;
  T1 = KdoVKdMM0I(&Kaugment_class_known_jointVKiMM0, &K2, &T0);
  goto I0;
}
I0:

{
  dylan_value T0;

  T0 = &KPfalseVKi;
  goto I3;
}
I3:

{
  dylan_value T0;
  dylan_value T1;

  // /home/bruce/Development/dylan/opendylan/sources/environment/dfmc/database/library.dylan:9
  T0 = primitive_runtime_module_handle();
  // /home/bruce/Development/dylan/opendylan/sources/environment/dfmc/database/library.dylan:9
  T1 = KPlibrary_version_checkVKeI(&Kdfmc_environment_database_libraryYdylan_userVdfmc_environment_database, T0);
  goto I4;
}
I4:

  return;
}


/* eof */
