#include "run-time.h"

/* Typedefs for referenced classes */

typedef struct {
  D wrapper;
  D binary_file_;
  D current_section_;
  D debug_section_;
  D code_section_;
  D init_code_section_;
  D elf_init_code_section_;
  D elf_fini_code_section_;
  D directives_section_;
  D optional_data_section_;
  D optional_vars_section_;
  D optional_objs_section_;
  D optional_untraced_objs_section_;
  D optional_untraced_data_section_;
  D destination_;
  D def_file_;
  D source_file_;
  D current_fixups_;
  D id_current_fixups_;
  D dynamic_linkingQ_;
} _KLbinary_builderGVbinary_builder;

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(4);
define__KLsimple_object_vectorGVKd(10);
define__KLsimple_object_vectorGVKd(1);
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;
} _KLharp_outputterGYharp_outputterVharp;

typedef struct {
  D wrapper;
  D binary_file_;
  D current_section_;
  D debug_section_;
  D code_section_;
  D init_code_section_;
  D elf_init_code_section_;
  D elf_fini_code_section_;
  D directives_section_;
  D optional_data_section_;
  D optional_vars_section_;
  D optional_objs_section_;
  D optional_untraced_objs_section_;
  D optional_untraced_data_section_;
  D destination_;
  D def_file_;
  D source_file_;
  D current_fixups_;
  D id_current_fixups_;
  D dynamic_linkingQ_;
  D model_object_protocolQ_;
  D outputter_line_position_;
  D finished_outputtingQ_;
} _KLharp_gnu_as_outputterGVgnu_as_outputter;

typedef struct {
  D wrapper;
  D binary_file_;
  D current_section_;
  D debug_section_;
  D code_section_;
  D init_code_section_;
  D elf_init_code_section_;
  D elf_fini_code_section_;
  D directives_section_;
  D optional_data_section_;
  D optional_vars_section_;
  D optional_objs_section_;
  D optional_untraced_objs_section_;
  D optional_untraced_data_section_;
  D destination_;
  D def_file_;
  D source_file_;
  D current_fixups_;
  D id_current_fixups_;
  D dynamic_linkingQ_;
  D model_object_protocolQ_;
  D outputter_line_position_;
  D finished_outputtingQ_;
} _KLharp_elf_as_outputterGVgnu_as_outputter;

typedef struct {
  D wrapper;
  D binary_file_;
  D current_section_;
  D debug_section_;
  D code_section_;
  D init_code_section_;
  D elf_init_code_section_;
  D elf_fini_code_section_;
  D directives_section_;
  D optional_data_section_;
  D optional_vars_section_;
  D optional_objs_section_;
  D optional_untraced_objs_section_;
  D optional_untraced_data_section_;
  D destination_;
  D def_file_;
  D source_file_;
  D current_fixups_;
  D id_current_fixups_;
  D dynamic_linkingQ_;
  D model_object_protocolQ_;
  D outputter_line_position_;
  D finished_outputtingQ_;
} _KLharp_macho_as_outputterGVgnu_as_outputter;

typedef struct {
  D wrapper;
  D section_name_;
  D section_alignment_;
  D section_flags_;
  D section_data_;
  D raw_data_size_;
  D current_position_;
} _KLgnu_sectionGVgnu_as_outputter;


/* Typedefs for defined classes */


/* Referenced object declarations */

D Kinitialize_class_dispatch_keys_vectoredVKgI (D);
D Kaugment_rcpl_position_data_multipleVKiI (D, D);
extern _KLclassGVKd KLbinary_builderGVbinary_builder;
extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
extern _KLmm_wrapperGVKi_0 KLbinary_builderGVbinary_builderW;
D Kaugment_class_known_jointVKiMM0I (D, D);
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 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 Kdylan_libraryYdylan_userVdylan;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLlibraryGVKe Kcommon_dylan_libraryYdylan_userVcommon_dylan;
extern _KLlibraryGVKe Kcollections_libraryYdylan_userVcollections;
extern _KLlibraryGVKe Kio_libraryYdylan_userVio;
extern _KLlibraryGVKe Kbig_integers_libraryYdylan_userVbig_integers;
extern _KLlibraryGVKe Ksystem_libraryYdylan_userVsystem;
extern _KLlibraryGVKe Kharp_libraryYdylan_userVharp;
extern _KLlibraryGVKe Kbinary_manager_libraryYdylan_userVbinary_manager;
extern _KLlibraryGVKe Kbinary_builder_libraryYdylan_userVbinary_builder;
extern _KLlibraryGVKe Kbinary_outputter_libraryYdylan_userVbinary_outputter;
extern _KLclassGVKd KLharp_outputterGYharp_outputterVharp;
extern _KLmm_wrapperGVKi_0 KLharp_outputterGYharp_outputterVharpW;
extern _KLclassGVKd KLharp_gnu_as_outputterGVgnu_as_outputter;
extern _KLclassGVKd KLharp_elf_as_outputterGVgnu_as_outputter;
extern _KLclassGVKd KLharp_macho_as_outputterGVgnu_as_outputter;
extern _KLclassGVKd KLgnu_sectionGVgnu_as_outputter;

/* Defined object declarations */

static _KLsimple_object_vectorGVKd_1 K1;
static _KLsimple_object_vectorGVKd_1 K2;
extern _KLlibraryGVKe Kgnu_as_outputter_libraryYdylan_userVgnu_as_outputter;
extern _KLmoduleGVKe Kgnu_as_outputter_moduleYdylan_userVgnu_as_outputter;
static _KLbyte_stringGVKd_16 K7;
static _KLsimple_object_vectorGVKd_10 K8;
static _KLused_libraryGVKe K9;
static _KLused_libraryGVKe K10;
static _KLused_libraryGVKe K11;
static _KLused_libraryGVKe K12;
static _KLused_libraryGVKe K13;
static _KLused_libraryGVKe K14;
static _KLused_libraryGVKe K15;
static _KLused_libraryGVKe K16;
static _KLused_libraryGVKe K17;
static _KLused_libraryGVKe K18;
static _KLsymbolGVKd KJtight_;
static _KLbyte_stringGVKd_5 K20;
static _KLsimple_object_vectorGVKd_4 K21;

/* Indirection variables */

static D IKJtight_ = &KJtight_;

/* Variables */

D gnu_as_outputter_moduleYdylan_userVgnu_as_outputter = &Kgnu_as_outputter_moduleYdylan_userVgnu_as_outputter;
D gnu_as_outputter_libraryYdylan_userVgnu_as_outputter = &Kgnu_as_outputter_libraryYdylan_userVgnu_as_outputter;

/* Objects */

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

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

_KLlibraryGVKe Kgnu_as_outputter_libraryYdylan_userVgnu_as_outputter = {
  &KLlibraryGVKeW /* wrapper */,
  &K7,
  (D) 1,
  (D) 1,
  (D) 129526709,
  &K8,
  &KPempty_vectorVKi,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 525,
  (D) 817
};

_KLmoduleGVKe Kgnu_as_outputter_moduleYdylan_userVgnu_as_outputter = {
  &KLmoduleGVKeW /* wrapper */,
  &K7,
  &Kgnu_as_outputter_libraryYdylan_userVgnu_as_outputter
};

static _KLbyte_stringGVKd_16 K7 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "gnu-as-outputter"
};

static _KLsimple_object_vectorGVKd_10 K8 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 41,
  &K9,
  &K10,
  &K11,
  &K12,
  &K13,
  &K14,
  &K15,
  &K16,
  &K17,
  &K18
};

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

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

static _KLused_libraryGVKe K11 = {
  &KLused_libraryGVKeW /* wrapper */,
  (D) 1,
  (D) 1,
  (D) 129535349,
  &Kbinary_manager_libraryYdylan_userVbinary_manager,
  &KJtight_
};

static _KLused_libraryGVKe K12 = {
  &KLused_libraryGVKeW /* wrapper */,
  (D) 1,
  (D) 1,
  (D) 129635797,
  &Kharp_libraryYdylan_userVharp,
  &KJtight_
};

static _KLused_libraryGVKe K13 = {
  &KLused_libraryGVKeW /* wrapper */,
  (D) 9,
  (D) 5,
  (D) 128323797,
  &Ksystem_libraryYdylan_userVsystem,
  &KJtight_
};

static _KLused_libraryGVKe K14 = {
  &KLused_libraryGVKeW /* wrapper */,
  (D) 9,
  (D) 5,
  (D) 128648757,
  &Kbig_integers_libraryYdylan_userVbig_integers,
  &KJtight_
};

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

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

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

static _KLused_libraryGVKe K18 = {
  &KLused_libraryGVKeW /* wrapper */,
  (D) 9,
  (D) 5,
  (D) 128132821,
  &Kdylan_libraryYdylan_userVdylan,
  &KJtight_
};

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

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

static _KLsimple_object_vectorGVKd_4 K21 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 17,
  &KLharp_gnu_as_outputterGVgnu_as_outputter,
  &KLharp_elf_as_outputterGVgnu_as_outputter,
  &KLharp_macho_as_outputterGVgnu_as_outputter,
  &KLgnu_sectionGVgnu_as_outputter
};

/* Code */


/* SYSTEM INIT CODE */

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

    T0 = KPresolve_symbolVKiI(&KJtight_);
    if (T0 != &KJtight_) {
      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);
      primitive_slot_value_setter(T0, &K13, 4);
      primitive_slot_value_setter(T0, &K14, 4);
      primitive_slot_value_setter(T0, &K15, 4);
      primitive_slot_value_setter(T0, &K16, 4);
      primitive_slot_value_setter(T0, &K17, 4);
      primitive_slot_value_setter(T0, &K18, 4);
    }
  }
  return;
}

/* USER INIT CODE */

void _Init_gnu_as_outputter__X_library_for_user () {
{
  D T0;

  Kinitialize_class_dispatch_keys_vectoredVKgI(&K21);
  Kaugment_rcpl_position_data_multipleVKiI(&KLbinary_builderGVbinary_builder, &K1);
  T0 = Kaugment_class_known_jointVKiMM0I(&KLbinary_builderGVbinary_builder, &K2);
  goto I0;
}
I0:

{
  D T0;

  T0 = &KPfalseVKi;
  goto I3;
}
I3:

{
  D T0;
  D T1;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/gnu-as-outputter/library.dylan:10
  T0 = primitive_runtime_module_handle();
  // /Users/bruce/Development/dylan/opendylan/sources/harp/gnu-as-outputter/library.dylan:10
  T1 = KPlibrary_version_checkVKeI(&Kgnu_as_outputter_libraryYdylan_userVgnu_as_outputter, T0);
  goto I4;
}
I4:

  return;
}


/* eof */
