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

typedef struct {
  dylan_value wrapper;
} _KLunboundGVKe;

typedef struct {
  dylan_value wrapper;
} _KLbooleanGVKd;

typedef struct {
  dylan_value wrapper;
} _KLintegerGVKd;

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 instanceQ_iep_;
  dylan_value debug_name_;
  dylan_value class_implementation_class_;
  dylan_value class_subtype_bit_;
  dylan_value class_module_;
} _KLfunction_classGVKi;

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

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

#define  define__KLbyte_stringGVKd(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value size_; \
    char string_element_[nrepeated+1]; \
  } _KLbyte_stringGVKd_##nrepeated;
define__KLbyte_stringGVKd(7);
define__KLbyte_stringGVKd(10);
define__KLbyte_stringGVKd(12);

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;
  D raw_pointer_address_;
} _KLc_pointerGVKc;

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_;
  dylan_value alignment_of_;
  dylan_value size_of_;
  dylan_value referenced_type_;
  dylan_value concrete_pointer_type_;
  dylan_value abstract_pointer_type_;
} _KLdesignator_classGVKc;

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 subclass_class_;
} _KLsubclassGVKe;

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 */

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 KLintegerGVKd;
extern _KLmm_wrapperGVKi_0 KLintegerGVKdW;
extern _KLfunction_classGVKi KLkeyword_methodGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLkeyword_methodGVKeW;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLclassGVKd KLkeyword_signatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLkeyword_signatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_LintegerG_typesVKi;
extern _KLdesignator_classGVKc KLc_pointerGVKc;
extern _KLclassGVKd KLdesignator_classGVKc;
extern _KLmm_wrapperGVKi_0 KLdesignator_classGVKcW;
extern _KLmm_wrapperGVKi_1 KLc_pointerGVKcW;
extern _KLincremental_generic_functionGVKe KmakeVKd;
extern _KLfunction_classGVKi KLincremental_generic_functionGVKe;
extern _KLmm_wrapperGVKi_0 KLincremental_generic_functionGVKeW;
extern _KLclassGVKd KLsubclassGVKe;
extern _KLmm_wrapperGVKi_0 KLsubclassGVKeW;
dylan_value Ksubclass_instanceQVKiI (dylan_value, dylan_value);
extern _KLsimple_object_vectorGVKd_16 KDsignature_Lmachine_wordG_typesVKi;
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 Kc_pointer_at_setterYc_ffi_interfaceVc_ffi;
dylan_value Kc_pointer_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
static _KLkeyword_signatureAvaluesGVKi K2;
static _KLsimple_object_vectorGVKd_4 K3;
static _KLsymbolGVKd KJbyte_index_;
static _KLsymbolGVKd KJscaled_index_;
static _KLbyte_stringGVKd_12 K6;
static _KLbyte_stringGVKd_10 K7;
static _KLsimple_object_vectorGVKd_2 K8;
static _KLsimple_object_vectorGVKd_2 K9;
static _KLsimple_object_vectorGVKd_1 K10;
extern _KLkeyword_methodGVKe Kc_pointer_atYc_ffi_interfaceVc_ffi;
dylan_value Kc_pointer_atYc_ffi_interfaceVc_ffiI (dylan_value class_, dylan_value pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
static _KLsymbolGVKd KJaddress_;
static _KLbyte_stringGVKd_7 K14;
static _KLkeyword_signatureAvaluesGVKi K15;
static _KLsimple_object_vectorGVKd_2 K16;
static _KLsubclassGVKe K17;
extern _KLkeyword_methodGVKe Kc_signed_int_at_setterYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_int_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
static _KLkeyword_signatureAvaluesGVKi K20;
static _KLsimple_object_vectorGVKd_2 K21;
extern _KLkeyword_methodGVKe Kc_signed_int_atYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_int_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
static _KLkeyword_signatureAvaluesGVKi K24;
extern _KLkeyword_methodGVKe Kc_signed_char_at_setterYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_char_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
extern _KLkeyword_methodGVKe Kc_signed_char_atYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_char_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
extern _KLkeyword_methodGVKe Kc_signed_short_at_setterYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_short_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
extern _KLkeyword_methodGVKe Kc_signed_short_atYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_short_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
extern _KLkeyword_methodGVKe Kc_signed_long_at_setterYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_long_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);
extern _KLkeyword_methodGVKe Kc_signed_long_atYc_ffi_interfaceVc_ffi;
dylan_value Kc_signed_long_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_);

/* Indirection variables */

static dylan_value IKJbyte_index_ = &KJbyte_index_;
static dylan_value IKJscaled_index_ = &KJscaled_index_;
static dylan_value IKJaddress_ = &KJaddress_;

/* Variables */

dylan_value c_long_atYc_ffi_interfaceVc_ffi = &Kc_signed_long_atYc_ffi_interfaceVc_ffi;
dylan_value c_long_at_setterYc_ffi_interfaceVc_ffi = &Kc_signed_long_at_setterYc_ffi_interfaceVc_ffi;
dylan_value c_short_atYc_ffi_interfaceVc_ffi = &Kc_signed_short_atYc_ffi_interfaceVc_ffi;
dylan_value c_short_at_setterYc_ffi_interfaceVc_ffi = &Kc_signed_short_at_setterYc_ffi_interfaceVc_ffi;
dylan_value c_char_atYc_ffi_interfaceVc_ffi = &Kc_signed_char_atYc_ffi_interfaceVc_ffi;
dylan_value c_char_at_setterYc_ffi_interfaceVc_ffi = &Kc_signed_char_at_setterYc_ffi_interfaceVc_ffi;
dylan_value c_int_atYc_ffi_interfaceVc_ffi = &Kc_signed_int_atYc_ffi_interfaceVc_ffi;
dylan_value c_int_at_setterYc_ffi_interfaceVc_ffi = &Kc_signed_int_at_setterYc_ffi_interfaceVc_ffi;
dylan_value c_pointer_atYc_ffi_interfaceVc_ffi = &Kc_pointer_atYc_ffi_interfaceVc_ffi;
dylan_value c_pointer_at_setterYc_ffi_interfaceVc_ffi = &Kc_pointer_at_setterYc_ffi_interfaceVc_ffi;

/* Objects */

_KLkeyword_methodGVKe Kc_pointer_at_setterYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K2,
  &key_mep_5,
  &Kc_pointer_at_setterYc_ffi_interfaceVc_ffiI,
  &K3
};

static _KLkeyword_signatureAvaluesGVKi K2 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &K8,
  &K9,
  &KDsignature_LintegerG_typesVKi,
  &K10
};

static _KLsimple_object_vectorGVKd_4 K3 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 17,
  &KJbyte_index_,
  (dylan_value) 1,
  &KJscaled_index_,
  (dylan_value) 1
};

static _KLsymbolGVKd KJbyte_index_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K7
};

static _KLsymbolGVKd KJscaled_index_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K6
};

static _KLbyte_stringGVKd_12 K6 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 49,
  "scaled-index"
};

static _KLbyte_stringGVKd_10 K7 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 41,
  "byte-index"
};

static _KLsimple_object_vectorGVKd_2 K8 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KLc_pointerGVKc,
  &KLc_pointerGVKc
};

static _KLsimple_object_vectorGVKd_2 K9 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KJbyte_index_,
  &KJscaled_index_
};

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

_KLkeyword_methodGVKe Kc_pointer_atYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K15,
  &key_mep_5,
  &Kc_pointer_atYc_ffi_interfaceVc_ffiI,
  &K3
};

static _KLsymbolGVKd KJaddress_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K14
};

static _KLbyte_stringGVKd_7 K14 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 29,
  "address"
};

static _KLkeyword_signatureAvaluesGVKi K15 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &K16,
  &K9,
  &KDsignature_LintegerG_typesVKi,
  &K10
};

static _KLsimple_object_vectorGVKd_2 K16 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &K17,
  &KLc_pointerGVKc
};

static _KLsubclassGVKe K17 = {
  &KLsubclassGVKeW /* wrapper */,
  &Ksubclass_instanceQVKiI,
  &KLc_pointerGVKc
};

_KLkeyword_methodGVKe Kc_signed_int_at_setterYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K20,
  &key_mep_5,
  &Kc_signed_int_at_setterYc_ffi_interfaceVc_ffiI,
  &K3
};

static _KLkeyword_signatureAvaluesGVKi K20 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &K21,
  &K9,
  &KDsignature_LintegerG_typesVKi,
  &KDsignature_Lmachine_wordG_typesVKi
};

static _KLsimple_object_vectorGVKd_2 K21 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KLmachine_wordGVKe,
  &KLc_pointerGVKc
};

_KLkeyword_methodGVKe Kc_signed_int_atYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_4,
  &K24,
  &key_mep_4,
  &Kc_signed_int_atYc_ffi_interfaceVc_ffiI,
  &K3
};

static _KLkeyword_signatureAvaluesGVKi K24 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817605,
  &K10,
  &K9,
  &KDsignature_LintegerG_typesVKi,
  &KDsignature_Lmachine_wordG_typesVKi
};

_KLkeyword_methodGVKe Kc_signed_char_at_setterYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K20,
  &key_mep_5,
  &Kc_signed_char_at_setterYc_ffi_interfaceVc_ffiI,
  &K3
};

_KLkeyword_methodGVKe Kc_signed_char_atYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_4,
  &K24,
  &key_mep_4,
  &Kc_signed_char_atYc_ffi_interfaceVc_ffiI,
  &K3
};

_KLkeyword_methodGVKe Kc_signed_short_at_setterYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K20,
  &key_mep_5,
  &Kc_signed_short_at_setterYc_ffi_interfaceVc_ffiI,
  &K3
};

_KLkeyword_methodGVKe Kc_signed_short_atYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_4,
  &K24,
  &key_mep_4,
  &Kc_signed_short_atYc_ffi_interfaceVc_ffiI,
  &K3
};

_KLkeyword_methodGVKe Kc_signed_long_at_setterYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K20,
  &key_mep_5,
  &Kc_signed_long_at_setterYc_ffi_interfaceVc_ffiI,
  &K3
};

_KLkeyword_methodGVKe Kc_signed_long_atYc_ffi_interfaceVc_ffi = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_4,
  &K24,
  &key_mep_4,
  &Kc_signed_long_atYc_ffi_interfaceVc_ffiI,
  &K3
};

/* Code */

dylan_value Kc_pointer_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF6;
  dylan_value scaled_indexF7;
  void* T8;
  void* T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:175
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:175
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF6 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:175
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF7 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:183
  T8 = primitive_unwrap_c_pointer(new_value_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:180
  T9 = primitive_unwrap_c_pointer(pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:181
  T11 = primitive_cast_integer_as_raw(scaled_indexF7);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:181
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:182
  T13 = primitive_cast_integer_as_raw(byte_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:182
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:180
  primitive_c_pointer_at_setter(T8,T9,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:184
  T10_0 = new_value_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:175
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_pointer_atYc_ffi_interfaceVc_ffiI (dylan_value class_, dylan_value pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF6;
  dylan_value scaled_indexF7;
  void* T8;
  void* T9;
  DADDR T10;
  dylan_value T11;
  dylan_value T12_0;
  dylan_value T13_0;
  DWORD T14;
  DWORD T15;
  DWORD T16;
  DWORD T17;
  _KLsimple_object_vectorGVKd_2 T18 = {&KLsimple_object_vectorGVKdW, (dylan_value) 9};

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:161
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:161
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF6 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:161
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF7 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:170
  T8 = primitive_unwrap_c_pointer(pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:171
  T14 = primitive_cast_integer_as_raw(scaled_indexF7);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:171
  T15 = primitive_machine_word_shift_right(T14,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:172
  T16 = primitive_cast_integer_as_raw(byte_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:172
  T17 = primitive_machine_word_shift_right(T16,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:169
  T9 = primitive_c_pointer_at(T8,T15,T17);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:168
  T10 = primitive_cast_pointer_as_raw(T9);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:167
  T11 = primitive_wrap_machine_word(T10);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:166
  T18.vector_element_[0] = IKJaddress_;
  T18.vector_element_[1] = T11;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:166
  CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
  T12_0 = CONGRUENT_CALL2(class_, &T18);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:161
  T13_0 = T12_0;
  {
    MV_CHECK_TYPE_PROLOGUE(T12_0);
    primitive_type_check(T13_0, &KLc_pointerGVKc);
    MV_CHECK_TYPE_EPILOGUE();
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:161
  MV_SET_COUNT(1);
  return(T13_0);
}

dylan_value Kc_signed_int_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF6;
  dylan_value scaled_indexF7;
  DWORD T8;
  void* T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF6 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF7 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:99
  T8 = primitive_unwrap_machine_word(new_value_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T9 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T11 = primitive_cast_integer_as_raw(scaled_indexF7);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T13 = primitive_cast_integer_as_raw(byte_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:97
  primitive_c_signed_int_at_setter(T8,T9,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T10_0 = new_value_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_int_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF5;
  dylan_value scaled_indexF6;
  void* T7;
  int T8;
  dylan_value T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF5 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF6 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T7 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T11 = primitive_cast_integer_as_raw(scaled_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T13 = primitive_cast_integer_as_raw(byte_indexF5);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:97
  T8 = primitive_c_signed_int_at(T7,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:98
  T9 = primitive_wrap_machine_word(T8);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:98
  T10_0 = T9;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:95
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_char_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF6;
  dylan_value scaled_indexF7;
  DWORD T8;
  void* T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF6 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF7 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:42
  T8 = primitive_unwrap_machine_word(new_value_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T9 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T11 = primitive_cast_integer_as_raw(scaled_indexF7);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T13 = primitive_cast_integer_as_raw(byte_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:41
  primitive_c_signed_char_at_setter(T8,T9,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T10_0 = new_value_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_char_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF5;
  dylan_value scaled_indexF6;
  void* T7;
  signed char T8;
  dylan_value T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF5 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF6 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T7 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T11 = primitive_cast_integer_as_raw(scaled_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T13 = primitive_cast_integer_as_raw(byte_indexF5);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:41
  T8 = primitive_c_signed_char_at(T7,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:42
  T9 = primitive_wrap_machine_word(T8);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:42
  T10_0 = T9;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:39
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_short_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF6;
  dylan_value scaled_indexF7;
  DWORD T8;
  void* T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF6 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF7 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:56
  T8 = primitive_unwrap_machine_word(new_value_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T9 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T11 = primitive_cast_integer_as_raw(scaled_indexF7);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T13 = primitive_cast_integer_as_raw(byte_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:54
  primitive_c_signed_short_at_setter(T8,T9,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T10_0 = new_value_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_short_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF5;
  dylan_value scaled_indexF6;
  void* T7;
  short T8;
  dylan_value T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF5 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF6 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T7 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T11 = primitive_cast_integer_as_raw(scaled_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T13 = primitive_cast_integer_as_raw(byte_indexF5);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:54
  T8 = primitive_c_signed_short_at(T7,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:55
  T9 = primitive_wrap_machine_word(T8);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:55
  T10_0 = T9;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:52
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_long_at_setterYc_ffi_interfaceVc_ffiI (dylan_value new_value_, dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF6;
  dylan_value scaled_indexF7;
  DWORD T8;
  void* T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF6 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF7 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:71
  T8 = primitive_unwrap_machine_word(new_value_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T9 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T11 = primitive_cast_integer_as_raw(scaled_indexF7);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T13 = primitive_cast_integer_as_raw(byte_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:69
  primitive_c_signed_long_at_setter(T8,T9,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T10_0 = new_value_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  MV_SET_COUNT(1);
  return(T10_0);
}

dylan_value Kc_signed_long_atYc_ffi_interfaceVc_ffiI (dylan_value c_pointer_, dylan_value Urest_, dylan_value byte_index_, dylan_value scaled_index_) {
  dylan_value byte_indexF5;
  dylan_value scaled_indexF6;
  void* T7;
  long T8;
  dylan_value T9;
  dylan_value T10_0;
  DWORD T11;
  DWORD T12;
  DWORD T13;
  DWORD T14;

  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  primitive_type_check(byte_index_, &KLintegerGVKd);
  byte_indexF5 = byte_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  primitive_type_check(scaled_index_, &KLintegerGVKd);
  scaled_indexF6 = scaled_index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T7 = primitive_unwrap_c_pointer(c_pointer_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T11 = primitive_cast_integer_as_raw(scaled_indexF6);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T12 = primitive_machine_word_shift_right(T11,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T13 = primitive_cast_integer_as_raw(byte_indexF5);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  T14 = primitive_machine_word_shift_right(T13,2);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:69
  T8 = primitive_c_signed_long_at(T7,T12,T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:70
  T9 = primitive_wrap_machine_word(T8);
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:70
  T10_0 = T9;
  // /home/bruce/Development/dylan/opendylan/sources/lib/c-ffi/pointer-ref.dylan:67
  MV_SET_COUNT(1);
  return(T10_0);
}


/* SYSTEM INIT CODE */

void _Init_c_ffi__X_pointer_ref_for_system () {
  extern dylan_value KPresolve_symbolVKiI(dylan_value);
  {
    dylan_value T0;

    T0 = KPresolve_symbolVKiI(&KJbyte_index_);
    if (T0 != &KJbyte_index_) {
      primitive_repeated_slot_value_setter(T0, &K9, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K3, 1, 0);
    }
  }
  {
    dylan_value T0;

    T0 = KPresolve_symbolVKiI(&KJscaled_index_);
    if (T0 != &KJscaled_index_) {
      primitive_repeated_slot_value_setter(T0, &K9, 1, 1);
      primitive_repeated_slot_value_setter(T0, &K3, 1, 2);
    }
  }
  {
    dylan_value T0;

    T0 = KPresolve_symbolVKiI(&KJaddress_);
    if (T0 != &KJaddress_) {
      IKJaddress_ = T0;
    }
  }
  return;
}

/* USER INIT CODE */

void _Init_c_ffi__X_pointer_ref_for_user () {
  return;
}


/* eof */
