#include "opendylan/run-time.h"

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

/* Typedefs for referenced classes */

typedef struct {
  dylan_value wrapper;
  dylan_value xep_;
  dylan_value function_signature_;
  dylan_value Pgf_cache_;
  dylan_value debug_name_;
  dylan_value generic_function_methods_;
  dylan_value discriminator_;
  dylan_value incremental_gf_module_;
  dylan_value incremental_gf_domain_info_;
  dylan_value incremental_gf_method_libraries_;
  dylan_value incremental_gf_properties_;
} _KLincremental_generic_functionGVKe;

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

typedef struct {
  dylan_value wrapper;
} _KLobjectGVKd;

typedef struct {
  dylan_value wrapper;
} _KLunboundGVKe;

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

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

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

typedef struct {
  dylan_value wrapper;
} _KLabstract_integerGVKe;

typedef struct {
  dylan_value wrapper;
  dylan_value xep_;
  dylan_value function_signature_;
  dylan_value mep_;
  dylan_value iep_;
  dylan_value keyword_specifiers_;
} _KLkeyword_methodGVKe;

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

typedef struct {
  dylan_value wrapper;
  dylan_value signature_properties_;
  dylan_value signature_required_;
  dylan_value signature_keys_;
  dylan_value signature_key_types_;
  dylan_value signature_values_;
} _KLkeyword_signatureAvaluesGVKi;

typedef struct {
  dylan_value wrapper;
  dylan_value instanceQ_iep_;
  dylan_value singleton_object_;
} _KLsingletonGVKd;

typedef struct {
  dylan_value wrapper;
  DWORD Pmachine_word_data_;
} _KLmachine_wordGVKe;

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_;
} _KLvalue_classGVKi;


/* Typedefs for defined classes */


/* Referenced object declarations */

dylan_value KPadd_a_methodVKnI (dylan_value, dylan_value, dylan_value, dylan_value, dylan_value, dylan_value);
extern _KLincremental_generic_functionGVKe KmakeVKd;
extern _KLfunction_classGVKi KLincremental_generic_functionGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLincremental_generic_functionGVKeW;
extern _KLlibraryGVKe Kcommon_dylan_libraryYdylan_userVcommon_dylan;
extern _KLclassGVKd KLlibraryGVKe;
extern _KLmm_wrapperGVKi_0 KLlibraryGVKeW;
extern _KLbooleanGVKd KPfalseVKi;
extern _KLclassGVKd KLbooleanGVKd;
extern _KLmm_wrapperGVKi_0 KLbooleanGVKdW;
extern _KLbooleanGVKd KPtrueVKi;
extern _KLincremental_generic_functionGVKe KoddQVKd;
extern _KLincremental_generic_functionGVKe KevenQVKd;
extern _KLincremental_generic_functionGVKe KzeroQVKd;
extern _KLincremental_generic_functionGVKe KpositiveQVKd;
extern _KLincremental_generic_functionGVKe KnegativeQVKd;
extern _KLclassGVKd KLobjectGVKd;
extern _KLmm_wrapperGVKi_0 KLobjectGVKdW;
extern _KLunboundGVKe KPunboundVKi;
extern _KLclassGVKd KLunboundGVKe;
extern _KLmm_wrapperGVKi_0 KLunboundGVKeW;
extern _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;
extern _KLclassGVKd KLsignatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLsignatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_Lmachine_wordG_typesVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_LbooleanG_typesVKi;
extern _KLclassGVKd KLabstract_integerGVKe;
extern _KLmm_wrapperGVKi_0 KLabstract_integerGVKeW;
extern _KLfunction_classGVKi KLkeyword_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_methodGVKeW;
extern _KLsymbolGVKd KJvalue_;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLclassGVKd KLkeyword_signatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLkeyword_signatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_Labstract_integerG_typesVKi;
extern _KLclassGVKd KLsingletonGVKd;
extern _KLmm_wrapperGVKi_0 KLsingletonGVKdW;
dylan_value Ksingleton_pointer_idQ_instanceQVKiI (dylan_value, dylan_value);
extern _KLvalue_classGVKi KLmachine_wordGVKe;
extern _KLclassGVKd KLvalue_classGVKi;
extern _KLmm_wrapperGVKi_0 KLvalue_classGVKiW;
extern _KLmm_wrapperGVKi_1 KLmachine_wordGVKeW;

/* Defined object declarations */

extern _KLkeyword_methodGVKe KmakeVKdMcommon_dylanM2;
dylan_value KmakeVKdMcommon_dylanM2I (dylan_value t_, dylan_value Urest_, dylan_value value_);
extern _KLsimple_methodGVKe KoddQVKdMcommon_dylanM0;
dylan_value KoddQVKdMcommon_dylanM0I (dylan_value m_);
extern _KLsimple_methodGVKe KevenQVKdMcommon_dylanM0;
dylan_value KevenQVKdMcommon_dylanM0I (dylan_value m_);
extern _KLsimple_methodGVKe KzeroQVKdMcommon_dylanM0;
dylan_value KzeroQVKdMcommon_dylanM0I (dylan_value m_);
extern _KLsimple_methodGVKe KpositiveQVKdMcommon_dylanM0;
dylan_value KpositiveQVKdMcommon_dylanM0I (dylan_value m_);
extern _KLsimple_methodGVKe KnegativeQVKdMcommon_dylanM0;
dylan_value KnegativeQVKdMcommon_dylanM0I (dylan_value m_);
static _KLsignatureAvaluesGVKi K18;
static _KLkeyword_signatureAvaluesGVKi K19;
static _KLsimple_object_vectorGVKd_2 K20;
static _KLsimple_object_vectorGVKd_1 K21;
static _KLsimple_object_vectorGVKd_1 K22;
static _KLsingletonGVKd K23;

/* Indirection variables */


/* Variables */


/* Objects */

_KLkeyword_methodGVKe KmakeVKdMcommon_dylanM2 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_3,
  &K19,
  &key_mep_3,
  &KmakeVKdMcommon_dylanM2I,
  &K20
};

_KLsimple_methodGVKe KoddQVKdMcommon_dylanM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K18,
  &KoddQVKdMcommon_dylanM0I
};

_KLsimple_methodGVKe KevenQVKdMcommon_dylanM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K18,
  &KevenQVKdMcommon_dylanM0I
};

_KLsimple_methodGVKe KzeroQVKdMcommon_dylanM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K18,
  &KzeroQVKdMcommon_dylanM0I
};

_KLsimple_methodGVKe KpositiveQVKdMcommon_dylanM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K18,
  &KpositiveQVKdMcommon_dylanM0I
};

_KLsimple_methodGVKe KnegativeQVKdMcommon_dylanM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K18,
  &KnegativeQVKdMcommon_dylanM0I
};

static _KLsignatureAvaluesGVKi K18 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555461,
  &KDsignature_Lmachine_wordG_typesVKi,
  &KDsignature_LbooleanG_typesVKi
};

static _KLkeyword_signatureAvaluesGVKi K19 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817605,
  &K21,
  &K22,
  &KDsignature_Labstract_integerG_typesVKi,
  &KDsignature_Lmachine_wordG_typesVKi
};

static _KLsimple_object_vectorGVKd_2 K20 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KJvalue_,
  &KPfalseVKi
};

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

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

static _KLsingletonGVKd K23 = {
  &KLsingletonGVKdW /* wrapper */,
  &Ksingleton_pointer_idQ_instanceQVKiI,
  &KLmachine_wordGVKe
};

/* Code */

dylan_value KmakeVKdMcommon_dylanM2I (dylan_value t_, dylan_value Urest_, dylan_value value_) {
  dylan_value valueF4;
  DWORD T5;
  dylan_value T6;
  dylan_value T7_0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:10
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:10
  primitive_type_check(value_, &KLabstract_integerGVKe);
  valueF4 = value_;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:14
  T5 = primitive_unwrap_abstract_integer(valueF4);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:14
  T6 = primitive_wrap_machine_word(T5);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:14
  T7_0 = T6;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:10
  MV_SET_COUNT(1);
  return(T7_0);
}

dylan_value KoddQVKdMcommon_dylanM0I (dylan_value m_) {
  DWORD raw_x_;
  dylan_value T3;
  dylan_value T4_0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:20
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:22
  raw_x_ = primitive_unwrap_machine_word(m_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:22
  T3 = primitive_machine_word_logbitQ(0,raw_x_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:22
  T4_0 = T3;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:20
  MV_SET_COUNT(1);
  return(T4_0);
}

dylan_value KevenQVKdMcommon_dylanM0I (dylan_value m_) {
  DWORD raw_x_;
  dylan_value T3;
  dylan_value T4;
  dylan_value T5_0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:25
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:27
  raw_x_ = primitive_unwrap_machine_word(m_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:27
  T3 = primitive_machine_word_logbitQ(0,raw_x_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:27
  T4 = primitive_not(T3);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:27
  T5_0 = T4;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:25
  MV_SET_COUNT(1);
  return(T5_0);
}

dylan_value KzeroQVKdMcommon_dylanM0I (dylan_value m_) {
  DWORD raw_x_;
  dylan_value T3;
  dylan_value T4_0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:33
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:35
  raw_x_ = primitive_unwrap_machine_word(m_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:35
  T3 = primitive_machine_word_equalQ(raw_x_,0);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:35
  T4_0 = T3;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:33
  MV_SET_COUNT(1);
  return(T4_0);
}

dylan_value KpositiveQVKdMcommon_dylanM0I (dylan_value m_) {
  DWORD raw_y_;
  dylan_value T3;
  dylan_value T4_0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:38
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:40
  raw_y_ = primitive_unwrap_machine_word(m_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:40
  T3 = primitive_machine_word_less_thanQ(0,raw_y_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:40
  T4_0 = T3;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:38
  MV_SET_COUNT(1);
  return(T4_0);
}

dylan_value KnegativeQVKdMcommon_dylanM0I (dylan_value m_) {
  DWORD raw_x_;
  dylan_value T3;
  dylan_value T4_0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:43
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:45
  raw_x_ = primitive_unwrap_machine_word(m_);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:45
  T3 = primitive_machine_word_less_thanQ(raw_x_,0);
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:45
  T4_0 = T3;
  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:43
  MV_SET_COUNT(1);
  return(T4_0);
}


/* SYSTEM INIT CODE */

void _Init_common_dylan__X_14Emachine_word_for_system () {
  extern dylan_value KPresolve_symbolVKiI(dylan_value);
  return;
}

/* USER INIT CODE */

void _Init_common_dylan__X_14Emachine_word_for_user () {
{
  dylan_value T0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:10
  T0 = KPadd_a_methodVKnI(&KmakeVKd, &KmakeVKdMcommon_dylanM2, &Kcommon_dylan_libraryYdylan_userVcommon_dylan, &KPfalseVKi, &KPtrueVKi, &KPtrueVKi);
  goto I2;
}
I2:

{
  dylan_value T0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:20
  T0 = KPadd_a_methodVKnI(&KoddQVKd, &KoddQVKdMcommon_dylanM0, &Kcommon_dylan_libraryYdylan_userVcommon_dylan, &KPfalseVKi, &KPtrueVKi, &KPtrueVKi);
  goto I5;
}
I5:

{
  dylan_value T0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:25
  T0 = KPadd_a_methodVKnI(&KevenQVKd, &KevenQVKdMcommon_dylanM0, &Kcommon_dylan_libraryYdylan_userVcommon_dylan, &KPfalseVKi, &KPtrueVKi, &KPtrueVKi);
  goto I8;
}
I8:

{
  dylan_value T0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:33
  T0 = KPadd_a_methodVKnI(&KzeroQVKd, &KzeroQVKdMcommon_dylanM0, &Kcommon_dylan_libraryYdylan_userVcommon_dylan, &KPfalseVKi, &KPtrueVKi, &KPtrueVKi);
  goto I11;
}
I11:

{
  dylan_value T0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:38
  T0 = KPadd_a_methodVKnI(&KpositiveQVKd, &KpositiveQVKdMcommon_dylanM0, &Kcommon_dylan_libraryYdylan_userVcommon_dylan, &KPfalseVKi, &KPtrueVKi, &KPtrueVKi);
  goto I14;
}
I14:

{
  dylan_value T0;

  // /home/bruce/Development/dylan/opendylan/sources/common-dylan/machine-words/machine-word.dylan:43
  T0 = KPadd_a_methodVKnI(&KnegativeQVKd, &KnegativeQVKdMcommon_dylanM0, &Kcommon_dylan_libraryYdylan_userVcommon_dylan, &KPfalseVKi, &KPtrueVKi, &KPtrueVKi);
  goto I17;
}
I17:

  return;
}


/* eof */
