#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 Pgf_cache_;
  D debug_name_;
  D generic_function_methods_;
  D discriminator_;
  D incremental_gf_module_;
  D incremental_gf_domain_info_;
  D incremental_gf_method_libraries_;
  D incremental_gf_properties_;
} _KLincremental_generic_functionGVKe;

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;
  D properties_;
  D engine_node_callback_;
  D engine_node_entry_point_;
} _KLabsent_engine_nodeGVKg;

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

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

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

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

typedef struct {
  D wrapper;
  D mangler_;
  D cg_variables_;
  D registers_;
  D variables_;
} _KLharp_native_back_endGYnative_back_endVharp_native;

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

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


/* 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 KLincremental_generic_functionGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLincremental_generic_functionGVKeW;
extern _KLempty_listGVKd KPempty_listVKi;
extern _KLclassGVKd KLempty_listGVKd;
extern _KLmm_wrapperGVKi_0 KLempty_listGVKdW;
extern _KLabsent_engine_nodeGVKg RSINGULAR_Labsent_engine_nodeG;
extern _KLclassGVKd KLabsent_engine_nodeGVKg;
extern _KLmm_wrapperGVKi_0 KLabsent_engine_nodeGVKgW;
extern _KLmoduleGVKe Kthread_environment_moduleYdylan_userVharp_native;
extern _KLclassGVKd KLmoduleGVKe;
extern _KLmm_wrapperGVKi_0 KLmoduleGVKeW;
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLclassGVKd KLsignatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLsignatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_LintegerG_typesVKi;
extern _KLclassGVKd KLharp_native_back_endGYnative_back_endVharp_native;
extern _KLmm_wrapperGVKi_0 KLharp_native_back_endGYnative_back_endVharp_nativeW;
extern _KLclassGVKd KLpairGVKd;
extern _KLmm_wrapperGVKi_0 KLpairGVKdW;
extern _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;

/* Defined object declarations */

extern _KLincremental_generic_functionGVKe Kteb_total_sizeYthread_environmentVharp_native;
extern _KLsimple_methodGVKe Kteb_total_sizeYthread_environmentVharp_nativeMM0;
D Kteb_total_sizeYthread_environmentVharp_nativeMM0I (D);
static _KLpairGVKd K3;
static _KLsignatureAvaluesGVKi K4;
static _KLbyte_stringGVKd_14 K5;
static _KLsimple_object_vectorGVKd_1 K6;
extern _KLincremental_generic_functionGVKe Kteb_mv_area_offsetYthread_environmentVharp_native;
extern _KLincremental_generic_functionGVKe Kteb_mv_area_sizeYthread_environmentVharp_native;
extern _KLsimple_methodGVKe Kteb_mv_area_sizeYthread_environmentVharp_nativeMM0;
D Kteb_mv_area_sizeYthread_environmentVharp_nativeMM0I (D);
static _KLpairGVKd K11;
static _KLbyte_stringGVKd_16 K12;
extern _KLsimple_methodGVKe Kteb_mv_area_offsetYthread_environmentVharp_nativeMM0;
D Kteb_mv_area_offsetYthread_environmentVharp_nativeMM0I (D);
static _KLpairGVKd K15;
static _KLbyte_stringGVKd_18 K16;
extern _KLsimple_methodGVKe Kteb_dynamic_environment_offsetYthread_environmentVharp_nativeMM0;
D Kteb_dynamic_environment_offsetYthread_environmentVharp_nativeMM0I (D);
extern _KLsimple_methodGVKe Kteb_thread_local_variables_offsetYthread_environmentVharp_nativeMM0;
D Kteb_thread_local_variables_offsetYthread_environmentVharp_nativeMM0I (D);
extern _KLsimple_methodGVKe Kteb_current_thread_offsetYthread_environmentVharp_nativeMM0;
D Kteb_current_thread_offsetYthread_environmentVharp_nativeMM0I (D);
extern _KLsimple_methodGVKe Kteb_current_thread_handle_offsetYthread_environmentVharp_nativeMM0;
D Kteb_current_thread_handle_offsetYthread_environmentVharp_nativeMM0I (D);
extern _KLsimple_methodGVKe Kteb_current_handler_offsetYthread_environmentVharp_nativeMM0;
D Kteb_current_handler_offsetYthread_environmentVharp_nativeMM0I (D);
extern _KLsimple_methodGVKe Kteb_runtime_state_offsetYthread_environmentVharp_nativeMM0;
D Kteb_runtime_state_offsetYthread_environmentVharp_nativeMM0I (D);
extern _KLsimple_methodGVKe Kteb_mv_count_offsetYthread_environmentVharp_nativeMM0;
D Kteb_mv_count_offsetYthread_environmentVharp_nativeMM0I (D);

/* Indirection variables */


/* Variables */

D teb_mv_count_offsetYthread_environmentVharp_native = &Kteb_mv_count_offsetYthread_environmentVharp_nativeMM0;
D teb_runtime_state_offsetYthread_environmentVharp_native = &Kteb_runtime_state_offsetYthread_environmentVharp_nativeMM0;
D teb_current_handler_offsetYthread_environmentVharp_native = &Kteb_current_handler_offsetYthread_environmentVharp_nativeMM0;
D teb_current_thread_handle_offsetYthread_environmentVharp_native = &Kteb_current_thread_handle_offsetYthread_environmentVharp_nativeMM0;
D teb_current_thread_offsetYthread_environmentVharp_native = &Kteb_current_thread_offsetYthread_environmentVharp_nativeMM0;
D teb_thread_local_variables_offsetYthread_environmentVharp_native = &Kteb_thread_local_variables_offsetYthread_environmentVharp_nativeMM0;
D teb_dynamic_environment_offsetYthread_environmentVharp_native = &Kteb_dynamic_environment_offsetYthread_environmentVharp_nativeMM0;
D teb_mv_area_offsetYthread_environmentVharp_native = &Kteb_mv_area_offsetYthread_environmentVharp_native;
D teb_mv_area_sizeYthread_environmentVharp_native = &Kteb_mv_area_sizeYthread_environmentVharp_native;
D teb_total_sizeYthread_environmentVharp_native = &Kteb_total_sizeYthread_environmentVharp_native;

/* Objects */

_KLincremental_generic_functionGVKe Kteb_total_sizeYthread_environmentVharp_native = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &K4,
  &KPfalseVKi,
  &K5,
  &K3,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kthread_environment_moduleYdylan_userVharp_native,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLsimple_methodGVKe Kteb_total_sizeYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_total_sizeYthread_environmentVharp_nativeMM0I
};

static _KLpairGVKd K3 = {
  &KLpairGVKdW /* wrapper */,
  &Kteb_total_sizeYthread_environmentVharp_nativeMM0,
  &KPempty_listVKi
};

static _KLsignatureAvaluesGVKi K4 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (D) 33555461,
  &K6,
  &KDsignature_LintegerG_typesVKi
};

static _KLbyte_stringGVKd_14 K5 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 57,
  "teb-total-size"
};

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

_KLincremental_generic_functionGVKe Kteb_mv_area_offsetYthread_environmentVharp_native = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &K4,
  (D) 1,
  &K16,
  &K15,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kthread_environment_moduleYdylan_userVharp_native,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLincremental_generic_functionGVKe Kteb_mv_area_sizeYthread_environmentVharp_native = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &K4,
  (D) 1,
  &K12,
  &K11,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kthread_environment_moduleYdylan_userVharp_native,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLsimple_methodGVKe Kteb_mv_area_sizeYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_mv_area_sizeYthread_environmentVharp_nativeMM0I
};

static _KLpairGVKd K11 = {
  &KLpairGVKdW /* wrapper */,
  &Kteb_mv_area_sizeYthread_environmentVharp_nativeMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_16 K12 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "teb-mv-area-size"
};

_KLsimple_methodGVKe Kteb_mv_area_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_mv_area_offsetYthread_environmentVharp_nativeMM0I
};

static _KLpairGVKd K15 = {
  &KLpairGVKdW /* wrapper */,
  &Kteb_mv_area_offsetYthread_environmentVharp_nativeMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_18 K16 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 73,
  "teb-mv-area-offset"
};

_KLsimple_methodGVKe Kteb_dynamic_environment_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_dynamic_environment_offsetYthread_environmentVharp_nativeMM0I
};

_KLsimple_methodGVKe Kteb_thread_local_variables_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_thread_local_variables_offsetYthread_environmentVharp_nativeMM0I
};

_KLsimple_methodGVKe Kteb_current_thread_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_current_thread_offsetYthread_environmentVharp_nativeMM0I
};

_KLsimple_methodGVKe Kteb_current_thread_handle_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_current_thread_handle_offsetYthread_environmentVharp_nativeMM0I
};

_KLsimple_methodGVKe Kteb_current_handler_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_current_handler_offsetYthread_environmentVharp_nativeMM0I
};

_KLsimple_methodGVKe Kteb_runtime_state_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_runtime_state_offsetYthread_environmentVharp_nativeMM0I
};

_KLsimple_methodGVKe Kteb_mv_count_offsetYthread_environmentVharp_nativeMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_1,
  &K4,
  &Kteb_mv_count_offsetYthread_environmentVharp_nativeMM0I
};

/* Code */

D Kteb_total_sizeYthread_environmentVharp_nativeMM0I (D be_) {
  D T2;
  D T3;
  DWORD T4;
  DWORD T5;
  DWORD T6;
  DWORD T7;
  DWORD T8;
  DWORD T9;
  DWORD T10;
  D T11;
  D T12_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:80
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  CONGRUENT_CALL_PROLOG(&Kteb_mv_area_offsetYthread_environmentVharp_native, 1);
  T2 = CONGRUENT_CALL1(be_);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  CONGRUENT_CALL_PROLOG(&Kteb_mv_area_sizeYthread_environmentVharp_native, 1);
  T3 = CONGRUENT_CALL1(be_);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T4 = primitive_cast_integer_as_raw(T3);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T5 = primitive_machine_word_shift_right(T4,2);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T6 = primitive_machine_word_multiply_signal_overflow(16,T5);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T7 = primitive_machine_word_logior(T6,1);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T8 = primitive_cast_integer_as_raw(T2);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T9 = primitive_machine_word_logxor(T7,1);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T10 = primitive_machine_word_add_signal_overflow(T8,T9);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T11 = primitive_cast_raw_as_integer(T10);
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:82
  T12_0 = T11;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:80
  MV_SET_COUNT(1);
  return(T12_0);
}

D Kteb_mv_area_sizeYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:71
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:73
  T2_0 = (D) 257;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:71
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_mv_area_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:62
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:64
  T2_0 = (D) 145;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:62
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_dynamic_environment_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:13
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:15
  T2_0 = (D) 1;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:13
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_thread_local_variables_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:19
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:21
  T2_0 = (D) 17;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:19
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_current_thread_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:25
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:27
  T2_0 = (D) 33;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:25
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_current_thread_handle_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:31
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:33
  T2_0 = (D) 49;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:31
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_current_handler_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:37
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:39
  T2_0 = (D) 65;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:37
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_runtime_state_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:43
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:45
  T2_0 = (D) 81;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:43
  MV_SET_COUNT(1);
  return(T2_0);
}

D Kteb_mv_count_offsetYthread_environmentVharp_nativeMM0I (D be_) {
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:53
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:55
  T2_0 = (D) 129;
  // /Users/bruce/Development/dylan/opendylan/sources/harp/native/thread-environment-offsets.dylan:53
  MV_SET_COUNT(1);
  return(T2_0);
}


/* SYSTEM INIT CODE */

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

/* USER INIT CODE */

void _Init_harp_native__X_thread_environment_offsets_for_user () {
  return;
}


/* eof */
