#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;
  dylan_value xep_;
  dylan_value function_signature_;
  dylan_value Pgf_cache_;
  dylan_value debug_name_;
  dylan_value generic_function_methods_;
  dylan_value discriminator_;
} _KLsealed_generic_functionGVKe;

typedef struct {
  dylan_value wrapper;
  dylan_value head_;
  dylan_value tail_;
} _KLempty_listGVKd;

typedef struct {
  dylan_value wrapper;
  dylan_value properties_;
  dylan_value engine_node_callback_;
  dylan_value engine_node_entry_point_;
} _KLabsent_engine_nodeGVKg;

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

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;

#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(8);
define__KLsimple_object_vectorGVKd(6);
define__KLsimple_object_vectorGVKd(3);
define__KLsimple_object_vectorGVKd(16);
define__KLsimple_object_vectorGVKd(1);
define__KLsimple_object_vectorGVKd(4);
define__KLsimple_object_vectorGVKd(0);
define__KLsimple_object_vectorGVKd(2);
define__KLsimple_object_vectorGVKd(256);

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

typedef struct {
  dylan_value wrapper;
} _KLstringGVKd;

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

typedef struct {
  dylan_value wrapper;
} _KLintegerGVKd;

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

typedef struct {
  dylan_value wrapper;
} _KLcharacterGVKd;

#define  define__KLkeyword_closure_methodGVKe(nrepeated) \
  typedef struct { \
    dylan_value wrapper; \
    dylan_value xep_; \
    dylan_value function_signature_; \
    dylan_value mep_; \
    dylan_value iep_; \
    dylan_value keyword_specifiers_; \
    dylan_value environment_size_; \
    dylan_value environment_element_[nrepeated+1]; \
  } _KLkeyword_closure_methodGVKe_##nrepeated;
define__KLkeyword_closure_methodGVKe(0);

typedef struct {
  dylan_value wrapper;
  dylan_value instanceQ_iep_;
  dylan_value union_type1_;
  dylan_value union_type2_;
} _KLunionGVKe;

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

typedef struct {
  dylan_value wrapper;
  dylan_value xep_;
  dylan_value function_signature_;
  dylan_value mep_;
  dylan_value iep_;
  dylan_value keyword_specifiers_;
} _KLkeyword_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 _KLclassGVKd KLsealed_generic_functionGVKe;
extern _KLmm_wrapperGVKi_0 KLsealed_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 _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLclassGVKd KLkeyword_signatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLkeyword_signatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_256 KDsignature_LobjectG_typesVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLsimple_object_vectorGVKd_2 KDsignature_LstringG_typesVKi;
extern _KLsymbolGVKd KJcount_;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLsymbolGVKd KJstart_;
extern _KLsymbolGVKd KJend_;
extern _KLclassGVKd KLstringGVKd;
extern _KLmm_wrapperGVKi_0 KLstringGVKdW;
extern _KLclassGVKd KLpairGVKd;
extern _KLmm_wrapperGVKi_0 KLpairGVKdW;
extern _KLclassGVKd KLintegerGVKd;
extern _KLmm_wrapperGVKi_0 KLintegerGVKdW;
extern _KLincremental_generic_functionGVKe KsizeVKd;
extern _KLfunction_classGVKi KLincremental_generic_functionGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLincremental_generic_functionGVKeW;
extern _KLincremental_generic_functionGVKe Kcopy_sequenceVKd;
extern _KLincremental_generic_functionGVKe KLVKd;
dylan_value KelementVKdMM3I (dylan_value, dylan_value, dylan_value, dylan_value);
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLsealed_generic_functionGVKe Kunsupplied_objectVKi;
extern _KLincremental_generic_functionGVKe KEVKd;
extern _KLincremental_generic_functionGVKe Ktype_for_copyVKd;
extern _KLsealed_generic_functionGVKe Kconcatenate_asVKd;
extern _KLincremental_generic_functionGVKe KAVKd;
dylan_value KmakeVKdMM13I (dylan_value, dylan_value, dylan_value, dylan_value);
dylan_value Kelement_range_errorVKeI (dylan_value, dylan_value);
dylan_value Kas_uppercaseVKdMM0I (dylan_value);
extern _KLincremental_generic_functionGVKe KasVKd;
extern _KLincremental_generic_functionGVKe Kelement_setterVKd;
extern _KLincremental_generic_functionGVKe KelementVKd;
extern _KLsymbolGVKd KJdefault_;
extern _KLincremental_generic_functionGVKe Kas_lowercaseVKd;
dylan_value KEEVKdI (dylan_value, dylan_value);
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_LbooleanG_typesVKi;
extern _KLclassGVKd KLcharacterGVKd;
extern _KLmm_wrapperGVKi_0 KLcharacterGVKdW;
extern _KLfunction_classGVKi KLkeyword_closure_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_closure_methodGVKeW;
extern _KLsimple_object_vectorGVKd_2 KDsignature_LfunctionG_typesVKi;
extern _KLclassGVKd KLunionGVKe;
extern _KLmm_wrapperGVKi_0 KLunionGVKeW;
dylan_value Kunion_instanceQVKiI (dylan_value, dylan_value);
extern _KLclassGVKd KLsingletonGVKd;
extern _KLmm_wrapperGVKi_0 KLsingletonGVKdW;
dylan_value Ksingleton_pointer_idQ_instanceQVKiI (dylan_value, dylan_value);
extern _KLfunction_classGVKi KLkeyword_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_methodGVKeW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_LintegerG_typesVKi;
extern dylan_value Dlowercase_asciiVKi;

/* Defined object declarations */

extern _KLsealed_generic_functionGVKe Kreplace_substringsVstrings;
extern _KLkeyword_methodGVKe Kreplace_substringsVstringsMM0;
dylan_value Kreplace_substringsVstringsMM0I (dylan_value, dylan_value, dylan_value, dylan_value, dylan_value, dylan_value, dylan_value, dylan_value);
static _KLpairGVKd K3;
static _KLkeyword_signatureAvaluesGVKi K4;
static _KLbyte_stringGVKd_18 K5;
static _KLsimple_object_vectorGVKd_3 K6;
static _KLsimple_object_vectorGVKd_4 K7;
static _KLsymbolGVKd KJignore_caseQ_;
static _KLbyte_stringGVKd_12 K9;
static _KLunionGVKe K10;
extern _KLsimple_methodGVKe Kmake_substring_positionerYPstringsVstringsMM0;
dylan_value Kmake_substring_positionerYPstringsVstringsMM0I (dylan_value, dylan_value);
static _KLkeyword_closure_methodGVKe_0 Kcompiled_matcherF16;
static dylan_value Kcompiled_matcherF16I (dylan_value, dylan_value, dylan_value, dylan_value);
dylan_value Kcompile_substringYPstringsVstringsMM0I (dylan_value, dylan_value);
extern _KLsimple_methodGVKe KPfind_substringYPstringsVstringsMM0;
dylan_value KPfind_substringYPstringsVstringsMM0I (dylan_value, dylan_value, dylan_value, dylan_value, dylan_value, dylan_value);
extern _KLsimple_methodGVKe KequalQYPstringsVstrings;
dylan_value KequalQYPstringsVstringsI (dylan_value char1_, dylan_value char2_, dylan_value case_sensitive_);
static _KLsignatureAvaluesGVKi K21;
static _KLsimple_object_vectorGVKd_3 K22;
static _KLsignatureAvaluesGVKi K23;
static _KLsimple_object_vectorGVKd_6 K24;
static _KLsimple_object_vectorGVKd_1 K25;
static _KLkeyword_signatureAvaluesGVKi K26;
static _KLsimple_object_vectorGVKd_4 K27;
static _KLsimple_object_vectorGVKd_2 K28;
static _KLsignatureAvaluesGVKi K29;
static _KLsimple_object_vectorGVKd_2 K30;
static _KLsingletonGVKd K31;
static _KLkeyword_signatureAvaluesGVKi K32;
static _KLsimple_object_vectorGVKd_8 K33;
static _KLsimple_object_vectorGVKd_4 K34;
extern _KLsealed_generic_functionGVKe Kcount_substringsVstrings;
extern _KLkeyword_methodGVKe Kcount_substringsVstringsMM0;
dylan_value Kcount_substringsVstringsMM0I (dylan_value, dylan_value, dylan_value, dylan_value, dylan_value, dylan_value);
static _KLpairGVKd K38;
static _KLkeyword_signatureAvaluesGVKi K39;
static _KLbyte_stringGVKd_16 K40;
static _KLsimple_object_vectorGVKd_3 K41;
extern _KLsealed_generic_functionGVKe Kfind_substringVstrings;
extern _KLkeyword_methodGVKe Kfind_substringVstringsMM0;
dylan_value Kfind_substringVstringsMM0I (dylan_value big_, dylan_value pattern_, dylan_value Urest_, dylan_value start_, dylan_value big_end_, dylan_value ignore_caseQ_);
static _KLpairGVKd K45;
static _KLkeyword_signatureAvaluesGVKi K46;
static _KLbyte_stringGVKd_14 K47;
static _KLkeyword_signatureAvaluesGVKi K48;
static _KLsimple_object_vectorGVKd_6 K49;
static _KLsimple_object_vectorGVKd_2 K50;
static _KLsimple_object_vectorGVKd_3 K51;
static _KLkeyword_signatureAvaluesGVKi K52;
static _KLsimple_object_vectorGVKd_3 K53;

/* Indirection variables */

static dylan_value IKJignore_caseQ_ = &KJignore_caseQ_;

/* Variables */

dylan_value make_substring_positionerYPstringsVstrings = &Kmake_substring_positionerYPstringsVstringsMM0;
dylan_value find_substringVstrings = &Kfind_substringVstrings;
dylan_value count_substringsVstrings = &Kcount_substringsVstrings;
dylan_value replace_substringsVstrings = &Kreplace_substringsVstrings;
dylan_value Pfind_substringYPstringsVstrings = &KPfind_substringYPstringsVstringsMM0;

/* Objects */

_KLsealed_generic_functionGVKe Kreplace_substringsVstrings = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_optional_xep_3,
  &K4,
  &KPfalseVKi,
  &K5,
  &K3,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLkeyword_methodGVKe Kreplace_substringsVstringsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_8,
  &K32,
  &key_mep_8,
  &Kreplace_substringsVstringsMM0I,
  &K33
};

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

static _KLkeyword_signatureAvaluesGVKi K4 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817613,
  &K6,
  &K7,
  &KDsignature_LobjectG_typesVKi,
  &KDsignature_LstringG_typesVKi
};

static _KLbyte_stringGVKd_18 K5 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 73,
  "replace-substrings"
};

static _KLsimple_object_vectorGVKd_3 K6 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KLstringGVKd,
  &KLstringGVKd,
  &KLstringGVKd
};

static _KLsimple_object_vectorGVKd_4 K7 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 17,
  &KJcount_,
  &KJstart_,
  &KJend_,
  &KJignore_caseQ_
};

static _KLsymbolGVKd KJignore_caseQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K9
};

static _KLbyte_stringGVKd_12 K9 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 49,
  "ignore-case?"
};

static _KLunionGVKe K10 = {
  &KLunionGVKeW /* wrapper */,
  &Kunion_instanceQVKiI,
  &K31,
  &KLintegerGVKd
};

_KLsimple_methodGVKe Kmake_substring_positionerYPstringsVstringsMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_2,
  &K29,
  &Kmake_substring_positionerYPstringsVstringsMM0I
};

static _KLkeyword_closure_methodGVKe_0 Kcompiled_matcherF16 = {
  &KLkeyword_closure_methodGVKeW /* wrapper */,
  &rest_key_xep_4,
  &K26,
  &key_mep_4,
  &Kcompiled_matcherF16I,
  &K27,
  (dylan_value) 1
};

_KLsimple_methodGVKe KPfind_substringYPstringsVstringsMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_6,
  &K23,
  &KPfind_substringYPstringsVstringsMM0I
};

_KLsimple_methodGVKe KequalQYPstringsVstrings = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_3,
  &K21,
  &KequalQYPstringsVstringsI
};

static _KLsignatureAvaluesGVKi K21 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555469,
  &K22,
  &KDsignature_LbooleanG_typesVKi
};

static _KLsimple_object_vectorGVKd_3 K22 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KLcharacterGVKd,
  &KLcharacterGVKd,
  &KLbooleanGVKd
};

static _KLsignatureAvaluesGVKi K23 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555481,
  &K24,
  &K25
};

static _KLsimple_object_vectorGVKd_6 K24 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 25,
  &KLstringGVKd,
  &KLbyte_stringGVKd,
  &KLintegerGVKd,
  &KLintegerGVKd,
  &KLbooleanGVKd,
  &KLsimple_object_vectorGVKd
};

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

static _KLkeyword_signatureAvaluesGVKi K26 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817605,
  &KDsignature_LstringG_typesVKi,
  &K28,
  &KDsignature_LobjectG_typesVKi,
  &K25
};

static _KLsimple_object_vectorGVKd_4 K27 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 17,
  &KJstart_,
  (dylan_value) 1,
  &KJend_,
  &KPunboundVKi
};

static _KLsimple_object_vectorGVKd_2 K28 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KJstart_,
  &KJend_
};

static _KLsignatureAvaluesGVKi K29 = {
  &KLsignatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33555465,
  &K30,
  &KDsignature_LfunctionG_typesVKi
};

static _KLsimple_object_vectorGVKd_2 K30 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KLbyte_stringGVKd,
  &KLbooleanGVKd
};

static _KLsingletonGVKd K31 = {
  &KLsingletonGVKdW /* wrapper */,
  &Ksingleton_pointer_idQ_instanceQVKiI,
  &KPfalseVKi
};

static _KLkeyword_signatureAvaluesGVKi K32 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817613,
  &K6,
  &K7,
  &K34,
  &KDsignature_LstringG_typesVKi
};

static _KLsimple_object_vectorGVKd_8 K33 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 33,
  &KJcount_,
  &KPfalseVKi,
  &KJstart_,
  (dylan_value) 1,
  &KJend_,
  &KPunboundVKi,
  &KJignore_caseQ_,
  &KPfalseVKi
};

static _KLsimple_object_vectorGVKd_4 K34 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 17,
  &K10,
  &KLintegerGVKd,
  &KLintegerGVKd,
  &KLbooleanGVKd
};

_KLsealed_generic_functionGVKe Kcount_substringsVstrings = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_optional_xep_2,
  &K39,
  &KPfalseVKi,
  &K40,
  &K38,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLkeyword_methodGVKe Kcount_substringsVstringsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_6,
  &K52,
  &key_mep_6,
  &Kcount_substringsVstringsMM0I,
  &K49
};

static _KLpairGVKd K38 = {
  &KLpairGVKdW /* wrapper */,
  &Kcount_substringsVstringsMM0,
  &KPempty_listVKi
};

static _KLkeyword_signatureAvaluesGVKi K39 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &KDsignature_LstringG_typesVKi,
  &K41,
  &KDsignature_LobjectG_typesVKi,
  &KDsignature_LintegerG_typesVKi
};

static _KLbyte_stringGVKd_16 K40 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 65,
  "count-substrings"
};

static _KLsimple_object_vectorGVKd_3 K41 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KJstart_,
  &KJend_,
  &KJignore_caseQ_
};

_KLsealed_generic_functionGVKe Kfind_substringVstrings = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_optional_xep_2,
  &K46,
  &KPfalseVKi,
  &K47,
  &K45,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLkeyword_methodGVKe Kfind_substringVstringsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_6,
  &K48,
  &key_mep_6,
  &Kfind_substringVstringsMM0I,
  &K49
};

static _KLpairGVKd K45 = {
  &KLpairGVKdW /* wrapper */,
  &Kfind_substringVstringsMM0,
  &KPempty_listVKi
};

static _KLkeyword_signatureAvaluesGVKi K46 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &KDsignature_LstringG_typesVKi,
  &K41,
  &KDsignature_LobjectG_typesVKi,
  &K25
};

static _KLbyte_stringGVKd_14 K47 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (dylan_value) 57,
  "find-substring"
};

static _KLkeyword_signatureAvaluesGVKi K48 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &K50,
  &K41,
  &K51,
  &K25
};

static _KLsimple_object_vectorGVKd_6 K49 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 25,
  &KJstart_,
  (dylan_value) 1,
  &KJend_,
  &KPunboundVKi,
  &KJignore_caseQ_,
  &KPfalseVKi
};

static _KLsimple_object_vectorGVKd_2 K50 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 9,
  &KLstringGVKd,
  &KLbyte_stringGVKd
};

static _KLsimple_object_vectorGVKd_3 K51 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KLobjectGVKd,
  &KLobjectGVKd,
  &KLbooleanGVKd
};

static _KLkeyword_signatureAvaluesGVKi K52 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (dylan_value) 33817609,
  &KDsignature_LstringG_typesVKi,
  &K41,
  &K53,
  &KDsignature_LintegerG_typesVKi
};

static _KLsimple_object_vectorGVKd_3 K53 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (dylan_value) 13,
  &KLintegerGVKd,
  &KLintegerGVKd,
  &KLbooleanGVKd
};

/* Code */

dylan_value Kreplace_substringsVstringsMM0I (dylan_value big_, dylan_value pattern_, dylan_value replacement_, dylan_value Urest_, dylan_value count_, dylan_value start_, dylan_value Uend_, dylan_value ignore_caseQ_) {
  dylan_value countF9;
  dylan_value startF10;
  dylan_value T11;
  dylan_value T12;
  dylan_value UendF13;
  dylan_value ignore_caseQF14;
  dylan_value positionerF15;
  dylan_value T16;
  dylan_value T17;
  dylan_value T18;
  dylan_value T19;
  dylan_value result_stringF20;
  dylan_value donePexit_0_;
  dylan_value T22;
  dylan_value marksF23;
  dylan_value T24;
  dylan_value chunk_;
  dylan_value T26;
  dylan_value T27;
  dylan_value T28;
  dylan_value T29;
  dylan_value T30;
  dylan_value T31;
  dylan_value T32_0;
  dylan_value result_stringF33;
  dylan_value T34;
  dylan_value T35;
  dylan_value index_;
  dylan_value T37;
  dylan_value T38;
  dylan_value T39;
  dylan_value num_matches_;
  dylan_value T41;
  dylan_value T42;
  _KLsimple_object_vectorGVKd_2 T43 = {&KLsimple_object_vectorGVKdW, (dylan_value) 9};
  dylan_value T44;
  dylan_value T45;
  dylan_value T46;
  dylan_value T47;
  _KLsimple_object_vectorGVKd_4 T48 = {&KLsimple_object_vectorGVKdW, (dylan_value) 17};
  _KLsimple_object_vectorGVKd_2 T49 = {&KLsimple_object_vectorGVKdW, (dylan_value) 9};
  dylan_value T50;
  dylan_value T51_0;
  dylan_value T52;
  dylan_value T53;
  _KLsimple_object_vectorGVKd_2 T54 = {&KLsimple_object_vectorGVKdW, (dylan_value) 9};
  _KLsimple_object_vectorGVKd_1 T55 = {&KLsimple_object_vectorGVKdW, (dylan_value) 5};
  dylan_value T56;
  dylan_value T57_0;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  primitive_type_check(count_, &K10);
  countF9 = count_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  primitive_type_check(start_, &KLintegerGVKd);
  startF10 = start_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  T16 = primitive_idQ(Uend_,&KPunboundVKi);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  if (T16 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:226
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T11 = CONGRUENT_CALL1(big_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
    T12 = T11;
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
    primitive_type_check(T12, &KLintegerGVKd);
    T17 = T12;
    UendF13 = T17;
  } else {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
    primitive_type_check(Uend_, &KLintegerGVKd);
    T18 = Uend_;
    UendF13 = T18;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  primitive_type_check(ignore_caseQ_, &KLbooleanGVKd);
  ignore_caseQF14 = ignore_caseQ_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:229
  T19 = primitive_not(ignore_caseQF14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:229
  positionerF15 = CALL2(&Kmake_substring_positionerYPstringsVstringsMM0, pattern_, T19);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T43.vector_element_[0] = &KJend_;
  T43.vector_element_[1] = startF10;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  CONGRUENT_CALL_PROLOG(&Kcopy_sequenceVKd, 2);
  result_stringF20 = CONGRUENT_CALL2(big_, &T43);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  result_stringF33 = result_stringF20;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  index_ = startF10;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  num_matches_ = (dylan_value) 1;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
L0: ;
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
    T44 = primitive_not(countF9);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
    if (countF9 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T41 = num_matches_;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&KLVKd, 2);
      T29 = CONGRUENT_CALL2(T41, countF9);
      T30 = T29;
    } else {
      T30 = T44;
    }
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
    if (T30 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T39 = index_;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T22 = CALL5(positionerF15, big_, &KJstart_, T39, &KJend_, UendF13);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      marksF23 = MV_GET_REST_AT(T22, 0);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T45 = KelementVKdMM3I(marksF23, (dylan_value) 1, &KPempty_vectorVKi, &Kunsupplied_objectVKi);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&KEVKd, 2);
      T24 = CONGRUENT_CALL2(T45, &KPfalseVKi);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      if (T24 != &KPfalseVKi) {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
        T46 = MV_SET_REST_AT(&KPempty_vectorVKi, 0);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
        T46;
        goto L1;
      }
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T47 = KelementVKdMM3I(marksF23, (dylan_value) 1, &KPempty_vectorVKi, &Kunsupplied_objectVKi);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T38 = index_;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T48.vector_element_[0] = &KJstart_;
      T48.vector_element_[1] = T38;
      T48.vector_element_[2] = &KJend_;
      T48.vector_element_[3] = T47;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&Kcopy_sequenceVKd, 2);
      chunk_ = CONGRUENT_CALL2(big_, &T48);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T35 = result_stringF33;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T49.vector_element_[0] = chunk_;
      T49.vector_element_[1] = replacement_;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&Ktype_for_copyVKd, 1);
      T50 = CONGRUENT_CALL1(T35);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T51_0 = APPLY3(&Kconcatenate_asVKd, T50, T35, &T49);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T52 = T51_0;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      result_stringF33 = T52;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T53 = KelementVKdMM3I(marksF23, (dylan_value) 1, &KPempty_vectorVKi, &Kunsupplied_objectVKi);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
      T26 = CONGRUENT_CALL1(pattern_);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&KAVKd, 2);
      T27 = CONGRUENT_CALL2(T53, T26);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      index_ = T27;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      T42 = num_matches_;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      CONGRUENT_CALL_PROLOG(&KAVKd, 2);
      T28 = CONGRUENT_CALL2(T42, (dylan_value) 5);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      num_matches_ = T28;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
      goto L0;
    }
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  L1: ;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T37 = index_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T54.vector_element_[0] = &KJstart_;
  T54.vector_element_[1] = T37;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  CONGRUENT_CALL_PROLOG(&Kcopy_sequenceVKd, 2);
  T31 = CONGRUENT_CALL2(big_, &T54);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T34 = result_stringF33;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T55.vector_element_[0] = T31;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  CONGRUENT_CALL_PROLOG(&Ktype_for_copyVKd, 1);
  T56 = CONGRUENT_CALL1(T34);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T57_0 = APPLY3(&Kconcatenate_asVKd, T56, T34, &T55);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:230
  T32_0 = T57_0;
  {
    MV_CHECK_TYPE_PROLOGUE(T57_0);
    primitive_type_check(T32_0, &KLstringGVKd);
    MV_CHECK_TYPE_EPILOGUE();
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:222
  MV_SET_COUNT(1);
  return(T32_0);
}

dylan_value Kmake_substring_positionerYPstringsVstringsMM0I (dylan_value pattern_, dylan_value case_sensitive_) {
  dylan_value compiled_pattern_;
  dylan_value T4;
  dylan_value T5_0;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:96
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:99
  compiled_pattern_ = Kcompile_substringYPstringsVstringsMM0I(pattern_, case_sensitive_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  T4 = MAKE_KEYWORD_CLOSURE_INITD(&Kcompiled_matcherF16, 3, compiled_pattern_, case_sensitive_, pattern_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:106
  T5_0 = T4;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:96
  MV_SET_COUNT(1);
  return(T5_0);
}

static dylan_value Kcompiled_matcherF16I (dylan_value big_, dylan_value Urest_, dylan_value start_, dylan_value big_end_) {
  dylan_value T5;
  dylan_value T6;
  dylan_value big_endF7;
  dylan_value T8_0;
  dylan_value T9;
  CAPTURE_KEYWORD_ENVIRONMENT

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  T9 = primitive_idQ(big_end_,&KPunboundVKi);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  if (T9 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:101
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T5 = CONGRUENT_CALL1(big_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
    T6 = T5;
    big_endF7 = T6;
  } else {
    big_endF7 = big_end_;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:103
  T8_0 = CALL6(&KPfind_substringYPstringsVstringsMM0, big_, CREF(2), start_, big_endF7, CREF(1), CREF(0));
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  MV_SET_COUNT(1);
  return(T8_0);
}

dylan_value Kcompile_substringYPstringsVstringsMM0I (dylan_value pattern_, dylan_value case_sensitive_) {
  DWORD indexF3T, indexF3;
  dylan_value skip_T, skip_;
  dylan_value T5;
  dylan_value T6;
  dylan_value T7_0;
  dylan_value T8_0;
  dylan_value T9;
  DWORD T10;
  dylan_value T11;
  dylan_value T12_0;
  dylan_value result_;
  DWORD T14;
  dylan_value T15;
  dylan_value T16;
  dylan_value T17;
  dylan_value T18;
  DBCHR T19;
  dylan_value T20_0;
  dylan_value T21;
  DBCHR T22;
  DWORD T23;
  DWORD T24;
  dylan_value T25;
  DSINT T26;
  dylan_value T27;
  dylan_value T28;
  DBCHR T29;
  dylan_value T30_0;
  dylan_value T31;
  DBCHR T32;
  DWORD T33;
  DWORD T34;
  DBCHR T35;
  DSINT T36;
  DWORD T37;
  DWORD T38;
  dylan_value T39;
  dylan_value T40;
  DBCHR T41;
  dylan_value T42;
  dylan_value T43_0;
  dylan_value T44;
  dylan_value T45;
  dylan_value T46;
  DWORD T47;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:195
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:198
  T9 = SLOT_VALUE_INITD(pattern_, 0);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:199
  T10 = primitive_cast_integer_as_raw(T9);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:199
  T11 = primitive_machine_word_less_thanQ(T10,13);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:199
  if (T11 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:200
    T12_0 = KmakeVKdMM13I(&KLsimple_object_vectorGVKd, &KPempty_vectorVKi, &KPfalseVKi, (dylan_value) 1);
    T8_0 = T12_0;
  } else {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:202
    result_ = KmakeVKdMM13I(&KLsimple_object_vectorGVKd, &KPempty_vectorVKi, T9, (dylan_value) 1025);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
    T14 = primitive_machine_word_subtract_signal_overflow(T10,4);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:204
    T15 = primitive_cast_raw_as_integer(T14);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
    indexF3T = 1;
    skip_T = T15;
  L0: ;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
      indexF3 = indexF3T;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
      T17 = primitive_cast_raw_as_integer(indexF3);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
      skip_ = skip_T;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
      T16 = primitive_machine_word_less_thanQ(indexF3,T14);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
      if (T16 != &KPfalseVKi) {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:205
        if (case_sensitive_ != &KPfalseVKi) {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          T18 = primitive_machine_word_unsigned_less_thanQ(indexF3,T10);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          if (T18 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
            T19 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, indexF3);
            T22 = T19;
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
            T20_0 = Kelement_range_errorVKeI(pattern_, T17);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
            T21 = T20_0;
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
            T26 = primitive_byte_character_as_raw(T21);
            T22 = T26;
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          T23 = primitive_machine_word_shift_left_signal_overflow(T22,2);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          T24 = primitive_machine_word_logior(T23,1);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          T25 = primitive_cast_raw_as_integer(T24);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          T27 = primitive_machine_word_unsigned_less_thanQ(T24,1025);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
          if (T27 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
            REPEATED_DYLAN_VALUE_SLOT_VALUE_TAGGED_SETTER(skip_, result_, 1, T24);
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
            Kelement_range_errorVKeI(result_, T25);
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:206
        } else {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T28 = primitive_machine_word_unsigned_less_thanQ(indexF3,T10);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          if (T28 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
            T29 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, indexF3);
            T32 = T29;
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
            T30_0 = Kelement_range_errorVKeI(pattern_, T17);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
            T31 = T30_0;
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
            T36 = primitive_byte_character_as_raw(T31);
            T32 = T36;
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T33 = primitive_machine_word_shift_left_signal_overflow(T32,2);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T34 = primitive_machine_word_logior(T33,1);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T35 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(Dlowercase_asciiVKi, 1, T34);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T37 = primitive_machine_word_shift_left_signal_overflow(T35,2);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T38 = primitive_machine_word_logior(T37,1);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T39 = primitive_cast_raw_as_integer(T38);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          T40 = primitive_machine_word_unsigned_less_thanQ(T38,1025);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          if (T40 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
            REPEATED_DYLAN_VALUE_SLOT_VALUE_TAGGED_SETTER(skip_, result_, 1, T38);
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
            Kelement_range_errorVKeI(result_, T39);
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:208
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
          if (T28 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
            T41 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, indexF3);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
            T42 = primitive_raw_as_byte_character(T41);
            T45 = T42;
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
            T43_0 = Kelement_range_errorVKeI(pattern_, T17);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
            T44 = T43_0;
            T45 = T44;
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
          T46 = Kas_uppercaseVKdMM0I(T45);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
          CONGRUENT_CALL_PROLOG(&KasVKd, 2);
          T5 = CONGRUENT_CALL2(&KLintegerGVKd, T46);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:209
          CONGRUENT_CALL_PROLOG(&Kelement_setterVKd, 3);
          CONGRUENT_CALL3(skip_, result_, T5);
        }
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:205
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
        T47 = primitive_machine_word_add_signal_overflow(indexF3,4);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
        CONGRUENT_CALL_PROLOG(&KAVKd, 2);
        T6 = CONGRUENT_CALL2(skip_, (dylan_value) -3);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
        indexF3T = T47;
        skip_T = T6;
        goto L0;
      }
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:203
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:212
    T7_0 = result_;
    T8_0 = T7_0;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:199
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:195
  MV_SET_COUNT(1);
  return(T8_0);
}

dylan_value KPfind_substringYPstringsVstringsMM0I (dylan_value big_, dylan_value pattern_, dylan_value start_, dylan_value big_end_, dylan_value case_sensitive_, dylan_value compiled_pattern_) {
  dylan_value T7_0;
  dylan_value key_T, key_;
  dylan_value T9;
  dylan_value T10;
  dylan_value T11;
  dylan_value T12;
  dylan_value T13;
  dylan_value T14;
  dylan_value T15;
  dylan_value T16;
  dylan_value T17;
  dylan_value T18_0;
  dylan_value T19_0;
  dylan_value T20_0;
  dylan_value T21_0;
  dylan_value T22_0;
  dylan_value T23_0;
  dylan_value T24;
  dylan_value T25;
  dylan_value T26;
  DWORD T27;
  dylan_value T28;
  DBCHR T29;
  dylan_value T30;
  dylan_value T31_0;
  dylan_value T32;
  dylan_value T33;
  dylan_value T34;
  dylan_value T35;
  dylan_value T36;
  dylan_value T37;
  dylan_value T38;
  dylan_value T39;
  dylan_value T40;
  dylan_value T41;
  dylan_value T42;
  dylan_value iF43T, iF43;
  dylan_value T44;
  DWORD T45;
  dylan_value T46;
  DBCHR T47;
  dylan_value T48;
  dylan_value T49_0;
  dylan_value T50;
  dylan_value T51;
  dylan_value T52;
  DBCHR T53;
  dylan_value T54;
  dylan_value T55_0;
  dylan_value T56;
  dylan_value T57;
  DWORD T58;
  DWORD T59;
  dylan_value T60;
  DWORD T61;
  DWORD T62;
  dylan_value T63;
  dylan_value T64;
  DBCHR T65;
  dylan_value T66;
  dylan_value T67_0;
  dylan_value T68;
  dylan_value T69;
  DWORD T70;
  DWORD T71;
  DWORD T72;
  dylan_value char_;
  dylan_value T74;
  DWORD pat_key_T, pat_key_;
  dylan_value big_key_T, big_key_;
  dylan_value T77;
  dylan_value T78;
  dylan_value T79;
  dylan_value T80;
  dylan_value T81;
  dylan_value T82;
  dylan_value incr_;
  dylan_value T84;
  dylan_value T85;
  dylan_value T86;
  DWORD T87;
  dylan_value T88;
  dylan_value T89;
  DBCHR T90;
  dylan_value T91;
  dylan_value T92_0;
  dylan_value T93;
  dylan_value T94;
  DWORD T95;
  dylan_value T96;
  DWORD T97;
  dylan_value T98;
  DWORD indexF99;
  _KLsimple_object_vectorGVKd_2 T100 = {&KLsimple_object_vectorGVKdW, (dylan_value) 9};
  DWORD T101;
  DWORD T102;
  DWORD T103;
  dylan_value T104;
  DWORD indexF105T, indexF105;
  dylan_value T106_0;
  dylan_value T107;
  DWORD T108;
  dylan_value T109;
  dylan_value T110;
  dylan_value T111;
  dylan_value T112_0;
  dylan_value T113_0;
  dylan_value T114_0;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:132
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:137
  T24 = SLOT_VALUE_INITD(pattern_, 0);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
  T25 = primitive_idQ(T24,(dylan_value) 1);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
  if (T25 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:140
    T7_0 = start_;
    T23_0 = T7_0;
  } else {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
    T26 = primitive_idQ(T24,(dylan_value) 5);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
    if (T26 != &KPfalseVKi) {
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
      T27 = primitive_cast_integer_as_raw(T24);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
      T28 = primitive_machine_word_unsigned_less_thanQ(1,T27);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
      if (T28 != &KPfalseVKi) {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
        T29 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, 1);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
        T30 = primitive_raw_as_byte_character(T29);
        T33 = T30;
      } else {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
        T31_0 = Kelement_range_errorVKeI(pattern_, (dylan_value) 1);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
        T32 = T31_0;
        T33 = T32;
      }
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:142
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
      iF43T = start_;
    L0: ;
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
        iF43 = iF43T;
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:144
        CONGRUENT_CALL_PROLOG(&KLVKd, 2);
        T34 = CONGRUENT_CALL2(iF43, big_end_);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:144
        if (T34 != &KPfalseVKi) {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
          CONGRUENT_CALL_PROLOG(&KelementVKd, 3);
          T35 = CONGRUENT_CALL3(big_, iF43, &KPempty_vectorVKi);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
          T36 = CALL3(&KequalQYPstringsVstrings, T35, T33, case_sensitive_);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
          if (T36 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
            T37 = iF43;
            MV_SET_ELT(0, iF43);
            MV_SET_COUNT(1);
            T39 = T37;
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
            CONGRUENT_CALL_PROLOG(&KAVKd, 2);
            T38 = CONGRUENT_CALL2(iF43, (dylan_value) 5);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
            iF43T = T38;
            goto L0;
            T39 = T42;
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
          T41 = T39;
        } else {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:144
          T40 = &KPfalseVKi;
          MV_SET_ELT(0, &KPfalseVKi);
          MV_SET_COUNT(1);
          T41 = T40;
        }
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:144
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:145
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:144
      T113_0 = T41;
      {
        MV_CHECK_TYPE_PROLOGUE(T41);
        primitive_type_check(T113_0, &K10);
        MV_CHECK_TYPE_EPILOGUE();
      }
      T22_0 = T113_0;
    } else {
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
      T44 = primitive_idQ(T24,(dylan_value) 9);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
      if (T44 != &KPfalseVKi) {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
        T45 = primitive_cast_integer_as_raw(T24);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
        T46 = primitive_machine_word_unsigned_less_thanQ(1,T45);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
        if (T46 != &KPfalseVKi) {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
          T47 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, 1);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
          T48 = primitive_raw_as_byte_character(T47);
          T51 = T48;
        } else {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
          T49_0 = Kelement_range_errorVKeI(pattern_, (dylan_value) 1);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
          T50 = T49_0;
          T51 = T50;
        }
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:149
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
        T52 = primitive_machine_word_unsigned_less_thanQ(5,T45);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
        if (T52 != &KPfalseVKi) {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
          T53 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, 5);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
          T54 = primitive_raw_as_byte_character(T53);
          T57 = T54;
        } else {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
          T55_0 = Kelement_range_errorVKeI(pattern_, (dylan_value) 5);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
          T56 = T55_0;
          T57 = T56;
        }
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:150
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
        T58 = primitive_cast_integer_as_raw(big_end_);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
        T59 = primitive_machine_word_subtract_signal_overflow(T58,4);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
        T60 = primitive_cast_raw_as_integer(T59);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
        key_T = start_;
      L1: ;
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
          key_ = key_T;
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
          CONGRUENT_CALL_PROLOG(&KLVKd, 2);
          T9 = CONGRUENT_CALL2(key_, T60);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
          if (T9 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:152
            CONGRUENT_CALL_PROLOG(&KelementVKd, 3);
            T11 = CONGRUENT_CALL3(big_, key_, &KPempty_vectorVKi);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:152
            T12 = CALL3(&KequalQYPstringsVstrings, T11, T51, case_sensitive_);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:152
            if (T12 != &KPfalseVKi) {
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:153
              CONGRUENT_CALL_PROLOG(&KAVKd, 2);
              T13 = CONGRUENT_CALL2(key_, (dylan_value) 5);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:153
              CONGRUENT_CALL_PROLOG(&KelementVKd, 3);
              T14 = CONGRUENT_CALL3(big_, T13, &KPempty_vectorVKi);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:153
              T15 = CALL3(&KequalQYPstringsVstrings, T14, T57, case_sensitive_);
              T16 = T15;
            } else {
              T16 = &KPfalseVKi;
            }
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:152
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
            if (T16 == &KPfalseVKi) {
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
              CONGRUENT_CALL_PROLOG(&KAVKd, 2);
              T10 = CONGRUENT_CALL2(key_, (dylan_value) 5);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
              key_T = T10;
              goto L1;
            }
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:155
          CONGRUENT_CALL_PROLOG(&KLVKd, 2);
          T17 = CONGRUENT_CALL2(key_, T60);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:155
          if (T17 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:155
            T18_0 = key_;
            T20_0 = T18_0;
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:155
            T19_0 = &KPfalseVKi;
            T20_0 = T19_0;
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:155
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:151
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:155
        T114_0 = T20_0;
        {
          MV_CHECK_TYPE_PROLOGUE(T20_0);
          primitive_type_check(T114_0, &K10);
          MV_CHECK_TYPE_EPILOGUE();
        }
        T21_0 = T114_0;
      } else {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:158
        T61 = primitive_cast_integer_as_raw(T24);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:158
        T62 = primitive_machine_word_subtract_signal_overflow(T61,4);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:158
        T63 = primitive_cast_raw_as_integer(T62);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
        T64 = primitive_machine_word_unsigned_less_thanQ(T62,T61);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
        if (T64 != &KPfalseVKi) {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
          T65 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, T62);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
          T66 = primitive_raw_as_byte_character(T65);
          T69 = T66;
        } else {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
          T67_0 = Kelement_range_errorVKeI(pattern_, T63);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
          T68 = T67_0;
          T69 = T68;
        }
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:159
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:161
        T70 = primitive_cast_integer_as_raw(start_);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:161
        T71 = primitive_machine_word_logxor(T62,1);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:161
        T72 = primitive_machine_word_add_signal_overflow(T70,T71);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:173
        indexF105T = T72;
      L2: ;
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:181
          indexF105 = indexF105T;
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:173
          indexF99 = indexF105;
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:162
          T107 = primitive_cast_raw_as_integer(indexF99);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:162
          T87 = primitive_cast_integer_as_raw(big_end_);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:162
          T88 = primitive_machine_word_less_thanQ(indexF99,T87);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:162
          if (T88 != &KPfalseVKi) {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:163
            CONGRUENT_CALL_PROLOG(&KelementVKd, 3);
            char_ = CONGRUENT_CALL3(big_, T107, &KPempty_vectorVKi);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:164
            T74 = CALL3(&KequalQYPstringsVstrings, char_, T69, case_sensitive_);
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:164
            if (T74 != &KPfalseVKi) {
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:167
              T108 = primitive_machine_word_subtract_signal_overflow(indexF99,T71);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:167
              T109 = primitive_cast_raw_as_integer(T108);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
              pat_key_T = 1;
              big_key_T = T109;
            L3: ;
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                pat_key_ = pat_key_T;
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                T111 = primitive_cast_raw_as_integer(pat_key_);
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                big_key_ = big_key_T;
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                T110 = primitive_machine_word_less_thanQ(pat_key_,T62);
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                if (T110 != &KPfalseVKi) {
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                  CONGRUENT_CALL_PROLOG(&KelementVKd, 3);
                  T78 = CONGRUENT_CALL3(big_, big_key_, &KPempty_vectorVKi);
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                  T89 = primitive_machine_word_unsigned_less_thanQ(pat_key_,T61);
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                  if (T89 != &KPfalseVKi) {
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                    T90 = REPEATED_DBCHR_SLOT_VALUE_TAGGED(pattern_, 1, pat_key_);
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                    T91 = primitive_raw_as_byte_character(T90);
                    T94 = T91;
                  } else {
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                    T92_0 = Kelement_range_errorVKeI(pattern_, T111);
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                    T93 = T92_0;
                    T94 = T93;
                  }
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:168
                  T79 = CALL3(&KequalQYPstringsVstrings, T78, T94, case_sensitive_);
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                  if (T79 != &KPfalseVKi) {
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                    T95 = primitive_machine_word_add_signal_overflow(pat_key_,4);
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                    CONGRUENT_CALL_PROLOG(&KAVKd, 2);
                    T77 = CONGRUENT_CALL2(big_key_, (dylan_value) 5);
                    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                    pat_key_T = T95;
                    big_key_T = T77;
                    goto L3;
                  }
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                }
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:170
                T96 = primitive_idQ(T111,T63);
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:170
                if (T96 != &KPfalseVKi) {
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:171
                  T112_0 = T109;
                  T80 = T112_0;
                  MV_SET_COUNT(1);
                } else {
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:173
                  T97 = primitive_machine_word_add_signal_overflow(indexF99,4);
                  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:173
                  indexF105T = T97;
                  goto L2;
                  T80 = T98;
                }
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:170
                // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:166
              T84 = T80;
            } else {
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:180
              CONGRUENT_CALL_PROLOG(&KasVKd, 2);
              T81 = CONGRUENT_CALL2(&KLintegerGVKd, char_);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:180
              T100.vector_element_[0] = &KJdefault_;
              T100.vector_element_[1] = T24;
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:180
              CONGRUENT_CALL_PROLOG(&KelementVKd, 3);
              T82 = CONGRUENT_CALL3(compiled_pattern_, T81, &T100);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:179
              primitive_type_check(T82, &KLintegerGVKd);
              incr_ = T82;
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:181
              T101 = primitive_cast_integer_as_raw(incr_);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:181
              T102 = primitive_machine_word_logxor(T101,1);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:181
              T103 = primitive_machine_word_add_signal_overflow(indexF99,T102);
              // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:181
              indexF105T = T103;
              goto L2;
              T84 = T104;
            }
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:164
            T86 = T84;
          } else {
            // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:162
            T85 = &KPfalseVKi;
            MV_SET_ELT(0, &KPfalseVKi);
            MV_SET_COUNT(1);
            T86 = T85;
          }
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:162
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:173
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:161
        T106_0 = T86;
        T21_0 = T106_0;
      }
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
      T22_0 = T21_0;
    }
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
    T23_0 = T22_0;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:138
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:132
  MV_SET_COUNT(1);
  return(T23_0);
}

dylan_value KequalQYPstringsVstringsI (dylan_value char1_, dylan_value char2_, dylan_value case_sensitive_) {
  dylan_value T3_0;
  dylan_value T4;
  dylan_value T5_0;
  dylan_value T6;
  dylan_value T7;
  dylan_value T8_0;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:109
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:112
  if (case_sensitive_ != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:113
    T4 = primitive_idQ(char1_,char2_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:113
    T5_0 = T4;
    T3_0 = T5_0;
  } else {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:115
    CONGRUENT_CALL_PROLOG(&Kas_lowercaseVKd, 1);
    T6 = CONGRUENT_CALL1(char1_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:115
    CONGRUENT_CALL_PROLOG(&Kas_lowercaseVKd, 1);
    T7 = CONGRUENT_CALL1(char2_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:115
    T8_0 = KEEVKdI(T6, T7);
    T3_0 = T8_0;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:112
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:109
  MV_SET_COUNT(1);
  return(T3_0);
}

dylan_value Kcount_substringsVstringsMM0I (dylan_value big_, dylan_value pattern_, dylan_value Urest_, dylan_value start_, dylan_value epos_, dylan_value ignore_caseQ_) {
  dylan_value startF7;
  dylan_value T8;
  dylan_value T9;
  dylan_value eposF10;
  dylan_value ignore_caseQF11;
  dylan_value patlen_;
  dylan_value T13;
  dylan_value T14_0;
  dylan_value T15_0;
  dylan_value T16;
  dylan_value T17;
  dylan_value T18;
  dylan_value T19;
  dylan_value T20;
  dylan_value index_;
  dylan_value T22;
  dylan_value T23;
  dylan_value T24;
  dylan_value T25;
  dylan_value T26;
  dylan_value T27;
  dylan_value T28;
  dylan_value T29;
  dylan_value bposF30T, bposF30;
  dylan_value countF31T, countF31;
  dylan_value T32_0;
  dylan_value T33_0;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  primitive_type_check(start_, &KLintegerGVKd);
  startF7 = start_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  T16 = primitive_idQ(epos_,&KPunboundVKi);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  if (T16 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:74
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T8 = CONGRUENT_CALL1(big_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
    T9 = T8;
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
    primitive_type_check(T9, &KLintegerGVKd);
    T17 = T9;
    eposF10 = T17;
  } else {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
    primitive_type_check(epos_, &KLintegerGVKd);
    T18 = epos_;
    eposF10 = T18;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  primitive_type_check(ignore_caseQ_, &KLbooleanGVKd);
  ignore_caseQF11 = ignore_caseQ_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:77
  CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
  patlen_ = CONGRUENT_CALL1(pattern_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:78
  T19 = primitive_idQ(patlen_,(dylan_value) 1);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:78
  if (T19 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:79
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T13 = CONGRUENT_CALL1(big_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:79
    CONGRUENT_CALL_PROLOG(&KAVKd, 2);
    T14_0 = CONGRUENT_CALL2(T13, (dylan_value) 5);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:79
    T32_0 = T14_0;
    {
      MV_CHECK_TYPE_PROLOGUE(T14_0);
      primitive_type_check(T32_0, &KLintegerGVKd);
      MV_CHECK_TYPE_EPILOGUE();
    }
    T15_0 = T32_0;
  } else {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
    bposF30T = startF7;
    countF31T = (dylan_value) 1;
  L0: ;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
      bposF30 = bposF30T;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
      countF31 = countF31T;
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:82
      CONGRUENT_CALL_PROLOG(&KLVKd, 2);
      T20 = CONGRUENT_CALL2(bposF30, eposF10);
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:82
      if (T20 != &KPfalseVKi) {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:83
        index_ = CALL8(&Kfind_substringVstrings, big_, pattern_, &KJstart_, bposF30, &KJend_, eposF10, IKJignore_caseQ_, ignore_caseQF11);
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:85
        if (index_ != &KPfalseVKi) {
          T28 = index_;
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
          CONGRUENT_CALL_PROLOG(&KAVKd, 2);
          T22 = CONGRUENT_CALL2(T28, patlen_);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
          CONGRUENT_CALL_PROLOG(&KAVKd, 2);
          T23 = CONGRUENT_CALL2(countF31, (dylan_value) 5);
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
          bposF30T = T22;
          countF31T = T23;
          goto L0;
          T25 = T29;
        } else {
          // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:87
          T24 = countF31;
          MV_SET_ELT(0, countF31);
          MV_SET_COUNT(1);
          T25 = T24;
        }
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:85
        T27 = T25;
      } else {
        // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:89
        T26 = countF31;
        MV_SET_ELT(0, countF31);
        MV_SET_COUNT(1);
        T27 = T26;
      }
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:82
      // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:86
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:82
    T33_0 = T27;
    {
      MV_CHECK_TYPE_PROLOGUE(T27);
      primitive_type_check(T33_0, &KLintegerGVKd);
      MV_CHECK_TYPE_EPILOGUE();
    }
    T15_0 = T33_0;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:78
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:71
  MV_SET_COUNT(1);
  return(T15_0);
}

dylan_value Kfind_substringVstringsMM0I (dylan_value big_, dylan_value pattern_, dylan_value Urest_, dylan_value start_, dylan_value big_end_, dylan_value ignore_caseQ_) {
  dylan_value T7;
  dylan_value T8;
  dylan_value big_endF9;
  dylan_value ignore_caseQF10;
  dylan_value compiled_pattern_;
  dylan_value T12_0;
  dylan_value T13;
  dylan_value T14;
  dylan_value T15;

  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  T13 = primitive_idQ(big_end_,&KPunboundVKi);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  if (T13 != &KPfalseVKi) {
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:58
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T7 = CONGRUENT_CALL1(big_);
    // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
    T8 = T7;
    big_endF9 = T8;
  } else {
    big_endF9 = big_end_;
  }
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  primitive_type_check(ignore_caseQ_, &KLbooleanGVKd);
  ignore_caseQF10 = ignore_caseQ_;
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:61
  T14 = primitive_not(ignore_caseQF10);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:61
  compiled_pattern_ = Kcompile_substringYPstringsVstringsMM0I(pattern_, T14);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:62
  T15 = primitive_not(ignore_caseQF10);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:62
  T12_0 = CALL6(&KPfind_substringYPstringsVstringsMM0, big_, pattern_, start_, big_endF9, T15, compiled_pattern_);
  // /home/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  MV_SET_COUNT(1);
  return(T12_0);
}


/* SYSTEM INIT CODE */

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

    T0 = KPresolve_symbolVKiI(&KJignore_caseQ_);
    if (T0 != &KJignore_caseQ_) {
      primitive_repeated_slot_value_setter(T0, &K49, 1, 4);
      IKJignore_caseQ_ = T0;
      primitive_repeated_slot_value_setter(T0, &K41, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K33, 1, 6);
      primitive_repeated_slot_value_setter(T0, &K7, 1, 3);
    }
  }
  return;
}

/* USER INIT CODE */

void _Init_strings__X_substring_search_for_user () {
  return;
}


/* eof */
