#include "run-time.h"

/* Typedefs for referenced classes */

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;
} _KLobjectGVKd;

typedef struct {
  D wrapper;
} _KLunboundGVKe;

typedef struct {
  D wrapper;
} _KLbooleanGVKd;

typedef struct {
  D wrapper;
  D namespace_name_;
  D home_library_;
} _KLmoduleGVKe;

#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(16);

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;

#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(2);
define__KLsimple_object_vectorGVKd(3);
define__KLsimple_object_vectorGVKd(0);

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;

typedef struct {
  D wrapper;
  D mangler_;
  D cg_variables_;
} _KLharp_cg_back_endGVharp_cg_back_end;

typedef struct {
  D wrapper;
  D current_lambda_;
  D current_scl_;
  D current_parameters_;
  D stack_shift_;
  D args_to_be_dropped_;
  D count_vreg_;
  D next_methods_vreg_;
  D result_vreg_;
  D function_vreg_;
  D exit_tag_;
  D imports_;
  D runtime_references_;
  D cg_temporaries_;
  D tags_;
  D cg_references_;
  D model_references_;
  D cg_multiple_values_;
  D required_multiple_values_;
} _KLharp_cg_variablesGVharp_cg_back_end;


/* Typedefs for defined classes */


/* Referenced object declarations */

D Kinitialize_class_dispatch_keys_vectoredVKgI (D);
D KPlibrary_version_checkVKeI (D, D);
extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
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 KLmoduleGVKe;
extern _KLmm_wrapperGVKi_0 KLmoduleGVKeW;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLclassGVKd KLlibraryGVKe;
extern _KLmm_wrapperGVKi_0 KLlibraryGVKeW;
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLclassGVKd KLused_libraryGVKe;
extern _KLmm_wrapperGVKi_0 KLused_libraryGVKeW;
extern _KLlibraryGVKe Kcommon_dylan_libraryYdylan_userVcommon_dylan;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLlibraryGVKe Kdfmc_back_end_protocol_libraryYdylan_userVdfmc_back_end_protocol;
extern _KLlibraryGVKe Kcollections_libraryYdylan_userVcollections;
extern _KLclassGVKd KLharp_cg_back_endGVharp_cg_back_end;
extern _KLclassGVKd KLharp_cg_variablesGVharp_cg_back_end;

/* Defined object declarations */

extern _KLlibraryGVKe Kharp_cg_back_end_libraryYdylan_userVharp_cg_back_end;
extern _KLmoduleGVKe Kharp_cg_back_end_moduleYdylan_userVharp_cg_back_end;
static _KLbyte_stringGVKd_16 K5;
static _KLsimple_object_vectorGVKd_3 K6;
static _KLused_libraryGVKe K7;
static _KLused_libraryGVKe K8;
static _KLused_libraryGVKe K9;
static _KLsymbolGVKd KJtight_;
static _KLbyte_stringGVKd_5 K11;
static _KLsimple_object_vectorGVKd_2 K12;

/* Indirection variables */

static D IKJtight_ = &KJtight_;

/* Variables */

D harp_cg_back_end_moduleYdylan_userVharp_cg_back_end = &Kharp_cg_back_end_moduleYdylan_userVharp_cg_back_end;
D harp_cg_back_end_libraryYdylan_userVharp_cg_back_end = &Kharp_cg_back_end_libraryYdylan_userVharp_cg_back_end;

/* Objects */

_KLlibraryGVKe Kharp_cg_back_end_libraryYdylan_userVharp_cg_back_end = {
  &KLlibraryGVKeW /* wrapper */,
  &K5,
  (D) 1,
  (D) 1,
  (D) 129690453,
  &K6,
  &KPempty_vectorVKi,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 173,
  (D) 21
};

_KLmoduleGVKe Kharp_cg_back_end_moduleYdylan_userVharp_cg_back_end = {
  &KLmoduleGVKeW /* wrapper */,
  &K5,
  &Kharp_cg_back_end_libraryYdylan_userVharp_cg_back_end
};

static _KLbyte_stringGVKd_16 K5 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "harp-cg-back-end"
};

static _KLsimple_object_vectorGVKd_3 K6 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 13,
  &K7,
  &K8,
  &K9
};

static _KLused_libraryGVKe K7 = {
  &KLused_libraryGVKeW /* wrapper */,
  (D) 9,
  (D) 5,
  (D) 128429365,
  &Kcollections_libraryYdylan_userVcollections,
  &KJtight_
};

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

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

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

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

static _KLsimple_object_vectorGVKd_2 K12 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 9,
  &KLharp_cg_back_endGVharp_cg_back_end,
  &KLharp_cg_variablesGVharp_cg_back_end
};

/* Code */


/* SYSTEM INIT CODE */

void _Init_harp_cg_back_end__X_harp_cg_back_end_module_for_system () {
  extern D KPresolve_symbolVKiI(D);
  {
    D T0;

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

/* USER INIT CODE */

void _Init_harp_cg_back_end__X_harp_cg_back_end_module_for_user () {
{
  D T0;

  T0 = Kinitialize_class_dispatch_keys_vectoredVKgI(&K12);
  goto I0;
}
I0:

{
  D T0;

  T0 = &KPfalseVKi;
  goto I1;
}
I1:

{
  D T0;
  D T1;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/harp-cg-back-end/harp-cg-back-end-module.dylan:9
  T0 = primitive_runtime_module_handle();
  // /Users/bruce/Development/dylan/opendylan/sources/harp/harp-cg-back-end/harp-cg-back-end-module.dylan:9
  T1 = KPlibrary_version_checkVKeI(&Kharp_cg_back_end_libraryYdylan_userVharp_cg_back_end, T0);
  goto I2;
}
I2:

  return;
}


/* eof */
