#include "run-time.h"

/* Typedefs for referenced classes */

#define  define__KLsimple_object_vectorGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D size_; \
    D 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 {
  D wrapper;
  D instanceQ_iep_;
  D debug_name_;
  D class_implementation_class_;
  D class_subtype_bit_;
  D class_module_;
} _KLclassGVKd;

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

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

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

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

typedef struct {
  D wrapper;
} _KLobjectGVKd;

typedef struct {
  D wrapper;
} _KLunboundGVKe;

typedef struct {
  D wrapper;
} _KLbooleanGVKd;

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

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

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

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

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

typedef struct {
  D wrapper;
} _KLserverGVenvironment_protocols;

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

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

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

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

typedef struct {
  D wrapper;
  D proxy_name_;
  D 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;
D Kinitialize_class_dispatch_keys_vectoredVKgI (D);
D KdoVKdMM0I (D, D, D);
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;
D KPlibrary_version_checkVKeI (D, D);
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 D IKJtight_ = &KJtight_;

/* Variables */

D 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 */,
  (D) 9,
  &K15,
  &K16
};

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

_KLlibraryGVKe Kdfmc_environment_database_libraryYdylan_userVdfmc_environment_database = {
  &KLlibraryGVKeW /* wrapper */,
  &K6,
  (D) 1,
  (D) 1,
  (D) 129245653,
  &K7,
  &KPempty_vectorVKi,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 1433,
  (D) 1305
};

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

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

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

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

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

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

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

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

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

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

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

static _KLsimple_object_vectorGVKd_3 K17 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 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 D KPresolve_symbolVKiI(D);
  {
    D 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, (D) 5};
  D T1;

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

{
  D T0;

  T0 = &KPfalseVKi;
  goto I3;
}
I3:

{
  D T0;
  D T1;

  // /Users/bruce/Development/dylan/opendylan/sources/environment/dfmc/database/library.dylan:9
  T0 = primitive_runtime_module_handle();
  // /Users/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 */
