#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 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 signature_properties_;
  D signature_required_;
} _KLsignatureGVKe;

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

typedef struct {
  D wrapper;
} _KLintegerGVKd;

typedef struct {
  D wrapper;
  D op_name_;
  D op_properties_;
  D op_disallow_fn_;
  D op_prefer_fn_;
  D op_clash_fn_;
  D op_destroys_fn_;
  D op_c_preserved_destroys_fn_;
  D op_implicit_uses_;
  D op_spread_;
  D op_code_gen_fn_;
  D op_reverse_op_;
  D op_constant_fold_op_;
  D op_info_;
} _KLopGYharp_opVharp;

typedef struct {
  D wrapper;
  D signature_properties_;
  D signature_required_;
  D signature_values_;
} _KLsignatureAvaluesGVKi;


/* Typedefs for defined classes */


/* Referenced object declarations */

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 _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;
extern _KLclassGVKd KLsignatureGVKe;
extern _KLmm_wrapperGVKi_0 KLsignatureGVKeW;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLclassGVKd KLintegerGVKd;
extern _KLmm_wrapperGVKi_0 KLintegerGVKdW;
extern _KLclassGVKd KLopGYharp_opVharp;
extern _KLmm_wrapperGVKi_0 KLopGYharp_opVharpW;
extern _KLclassGVKd KLsignatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLsignatureAvaluesGVKiW;

/* Defined object declarations */

extern _KLsimple_methodGVKe Kins_op_setterYbase_harpVharp;
D Kins_op_setterYbase_harpVharpI (D new_, D sv_, D ins_);
extern _KLsimple_methodGVKe Kins_opYbase_harpVharp;
D Kins_opYbase_harpVharpI (D sv_, D ins_);
extern _KLsimple_methodGVKe Kins_tagYbase_harpVharp;
D Kins_tagYbase_harpVharpI (D sv_, D ins_);
extern _KLsimple_methodGVKe Kins_tag_setterYbase_harpVharp;
D Kins_tag_setterYbase_harpVharpI (D new_, D sv_, D ins_);
static _KLsignatureGVKe K8;
static _KLsimple_object_vectorGVKd_3 K9;
static _KLsignatureGVKe K10;
static _KLsimple_object_vectorGVKd_2 K11;
static _KLsignatureAvaluesGVKi K12;
static _KLsimple_object_vectorGVKd_1 K13;
static _KLsignatureAvaluesGVKi K14;
static _KLsimple_object_vectorGVKd_3 K15;

/* Indirection variables */


/* Variables */

D ins_opYbase_harpVharp = &Kins_opYbase_harpVharp;
D ins_op_setterYbase_harpVharp = &Kins_op_setterYbase_harpVharp;
D ins_tagYbase_harpVharp = &Kins_tagYbase_harpVharp;
D ins_tag_setterYbase_harpVharp = &Kins_tag_setterYbase_harpVharp;

/* Objects */

_KLsimple_methodGVKe Kins_op_setterYbase_harpVharp = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_3,
  &K14,
  &Kins_op_setterYbase_harpVharpI
};

_KLsimple_methodGVKe Kins_opYbase_harpVharp = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_2,
  &K12,
  &Kins_opYbase_harpVharpI
};

_KLsimple_methodGVKe Kins_tagYbase_harpVharp = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_2,
  &K10,
  &Kins_tagYbase_harpVharpI
};

_KLsimple_methodGVKe Kins_tag_setterYbase_harpVharp = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_3,
  &K8,
  &Kins_tag_setterYbase_harpVharpI
};

static _KLsignatureGVKe K8 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 41944077,
  &K9
};

static _KLsimple_object_vectorGVKd_3 K9 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 13,
  &KLobjectGVKd,
  &KLsimple_object_vectorGVKd,
  &KLintegerGVKd
};

static _KLsignatureGVKe K10 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 41944073,
  &K11
};

static _KLsimple_object_vectorGVKd_2 K11 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 9,
  &KLsimple_object_vectorGVKd,
  &KLintegerGVKd
};

static _KLsignatureAvaluesGVKi K12 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (D) 33555465,
  &K11,
  &K13
};

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

static _KLsignatureAvaluesGVKi K14 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (D) 33555469,
  &K15,
  &K13
};

static _KLsimple_object_vectorGVKd_3 K15 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 13,
  &KLopGYharp_opVharp,
  &KLsimple_object_vectorGVKd,
  &KLintegerGVKd
};

/* Code */

D Kins_op_setterYbase_harpVharpI (D new_, D sv_, D ins_) {
  D T3_0;
  DWORD T4;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:25
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:28
  T4 = primitive_cast_integer_as_raw(ins_);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:28
  REPEATED_D_SLOT_VALUE_TAGGED_SETTER(new_, sv_, 1, T4);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:28
  T3_0 = new_;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:25
  MV_SET_COUNT(1);
  return(T3_0);
}

D Kins_opYbase_harpVharpI (D sv_, D ins_) {
  D T2_0;
  DWORD T3;
  D T4;
  D T5_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:17
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:20
  T3 = primitive_cast_integer_as_raw(ins_);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:20
  T4 = REPEATED_D_SLOT_VALUE_TAGGED(sv_, 1, T3);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:20
  T5_0 = T4;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:17
  T2_0 = T5_0;
  {
    MV_CHECK_TYPE_PROLOGUE(T5_0);
    primitive_type_check(T2_0, &KLopGYharp_opVharp);
    MV_CHECK_TYPE_EPILOGUE();
  }
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:17
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kins_tagYbase_harpVharpI (D sv_, D ins_) {
  DWORD T3;
  DWORD T4;
  D T5;
  D T6_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:33
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:36
  T3 = primitive_cast_integer_as_raw(ins_);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:36
  T4 = primitive_machine_word_add_signal_overflow(T3,4);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:36
  T5 = REPEATED_D_SLOT_VALUE_TAGGED(sv_, 1, T4);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:36
  T6_0 = T5;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:33
  MV_SET_COUNT(1);
  return(T6_0);
}

D Kins_tag_setterYbase_harpVharpI (D new_, D sv_, D ins_) {
  D T3_0;
  DWORD T4;
  DWORD T5;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:41
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:44
  T4 = primitive_cast_integer_as_raw(ins_);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:44
  T5 = primitive_machine_word_add_signal_overflow(T4,4);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:44
  REPEATED_D_SLOT_VALUE_TAGGED_SETTER(new_, sv_, 1, T5);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:44
  T3_0 = new_;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/core-harp/harp-macros.dylan:41
  MV_SET_COUNT(1);
  return(T3_0);
}


/* SYSTEM INIT CODE */

void _Init_harp__X_harp_macros_for_system () {
  extern D KPresolve_symbolVKiI(D);
  return;
}

/* USER INIT CODE */

void _Init_harp__X_harp_macros_for_user () {
  return;
}


/* eof */
