#include "run-time.h"

/* Typedefs for referenced classes */

typedef struct {
  D wrapper;
  D instanceQ_iep_;
  D debug_name_;
  D class_implementation_class_;
  D class_subtype_bit_;
  D class_module_;
} _KLclassGVKd;

#define  define__KLmm_wrapperGVKi(nrepeated) \
  typedef struct { \
    D wrapper; \
    D mm_wrapper_implementation_class_; \
    D mm_wrapper_subtype_mask_; \
    DWORD mm_wrapper_fixed_part_; \
    DWORD mm_wrapper_variable_part_; \
    D mm_wrapper_number_patterns_; \
    DWORD mm_wrapper_pattern_element_[nrepeated+1]; \
  } _KLmm_wrapperGVKi_##nrepeated;
define__KLmm_wrapperGVKi(1);
define__KLmm_wrapperGVKi(0);

typedef struct {
  D wrapper;
} _KLobjectGVKd;

typedef struct {
  D wrapper;
} _KLunboundGVKe;

typedef struct {
  D wrapper;
} _KLbooleanGVKd;

typedef struct {
  D wrapper;
  D xep_;
  D function_signature_;
  D Pgf_cache_;
  D debug_name_;
  D generic_function_methods_;
  D discriminator_;
} _KLsealed_generic_functionGVKe;

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

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

#define  define__KLbyte_stringGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D 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 {
  D wrapper;
  D signature_properties_;
  D signature_required_;
  D signature_keys_;
  D signature_key_types_;
  D signature_values_;
} _KLkeyword_signatureAvaluesGVKi;

#define  define__KLsimple_object_vectorGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D size_; \
    D vector_element_[nrepeated+1]; \
  } _KLsimple_object_vectorGVKd_##nrepeated;
define__KLsimple_object_vectorGVKd(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 {
  D wrapper;
  D symbol_name_;
} _KLsymbolGVKd;

typedef struct {
  D wrapper;
} _KLstringGVKd;

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

typedef struct {
  D wrapper;
} _KLintegerGVKd;

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

typedef struct {
  D wrapper;
  D instanceQ_iep_;
  D debug_name_;
  D class_implementation_class_;
  D class_subtype_bit_;
  D class_module_;
} _KLfunction_classGVKi;

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

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

typedef struct {
  D wrapper;
} _KLcharacterGVKd;

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

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

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

typedef struct {
  D wrapper;
  D xep_;
  D function_signature_;
  D mep_;
  D iep_;
  D 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;
D KelementVKdMM11I (D, D, D, D);
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;
D KmakeVKdMM23I (D, D, D, D);
D Kelement_range_errorVKeI (D, D);
D Kas_uppercaseVKdMM0I (D);
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;
D KEEVKdI (D, D);
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;
D Kunion_instanceQVKiI (D, D);
extern _KLclassGVKd KLsingletonGVKd;
extern _KLmm_wrapperGVKi_0 KLsingletonGVKdW;
D Ksingleton_pointer_idQ_instanceQVKiI (D, D);
extern _KLfunction_classGVKi KLkeyword_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_methodGVKeW;
extern _KLsimple_object_vectorGVKd_16 KDsignature_LintegerG_typesVKi;
extern D Dlowercase_asciiVKi;

/* Defined object declarations */

extern _KLsealed_generic_functionGVKe Kreplace_substringsVstrings;
extern _KLkeyword_methodGVKe Kreplace_substringsVstringsMM0;
D Kreplace_substringsVstringsMM0I (D, D, D, D, D, D, D, D);
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;
D Kmake_substring_positionerYPstringsVstringsMM0I (D, D);
static _KLkeyword_closure_methodGVKe_0 Kcompiled_matcherF16;
static D Kcompiled_matcherF16I (D, D, D, D);
D Kcompile_substringYPstringsVstringsMM0I (D, D);
extern _KLsimple_methodGVKe KPfind_substringYPstringsVstringsMM0;
D KPfind_substringYPstringsVstringsMM0I (D, D, D, D, D, D);
extern _KLsimple_methodGVKe KequalQYPstringsVstrings;
D KequalQYPstringsVstringsI (D char1_, D char2_, D 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;
D Kcount_substringsVstringsMM0I (D, D, D, D, D, D);
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;
D Kfind_substringVstringsMM0I (D big_, D pattern_, D Urest_, D start_, D big_end_, D 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 D IKJignore_caseQ_ = &KJignore_caseQ_;

/* Variables */

D make_substring_positionerYPstringsVstrings = &Kmake_substring_positionerYPstringsVstringsMM0;
D find_substringVstrings = &Kfind_substringVstrings;
D count_substringsVstrings = &Kcount_substringsVstrings;
D replace_substringsVstrings = &Kreplace_substringsVstrings;
D 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 */,
  (D) 33817613,
  &K6,
  &K7,
  &KDsignature_LobjectG_typesVKi,
  &KDsignature_LstringG_typesVKi
};

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

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

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

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

static _KLbyte_stringGVKd_12 K9 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 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,
  (D) 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 */,
  (D) 33555469,
  &K22,
  &KDsignature_LbooleanG_typesVKi
};

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

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

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

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

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

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

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

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

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

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

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

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

static _KLsimple_object_vectorGVKd_4 K34 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 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 */,
  (D) 33817609,
  &KDsignature_LstringG_typesVKi,
  &K41,
  &KDsignature_LobjectG_typesVKi,
  &KDsignature_LintegerG_typesVKi
};

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

static _KLsimple_object_vectorGVKd_3 K41 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 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 */,
  (D) 33817609,
  &KDsignature_LstringG_typesVKi,
  &K41,
  &KDsignature_LobjectG_typesVKi,
  &K25
};

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

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

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

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

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

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

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

/* Code */

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

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

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

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

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

  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  T9 = primitive_idQ(big_end_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  if (T9 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:101
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T5 = CONGRUENT_CALL1(big_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
    T6 = T5;
    big_endF7 = T6;
  } else {
    big_endF7 = big_end_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  // /Users/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));
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:100
  MV_SET_COUNT(1);
  return(T8_0);
}

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

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

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

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

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

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

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

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

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

  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  T13 = primitive_idQ(big_end_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  if (T13 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:58
    CONGRUENT_CALL_PROLOG(&KsizeVKd, 1);
    T7 = CONGRUENT_CALL1(big_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
    T8 = T7;
    big_endF9 = T8;
  } else {
    big_endF9 = big_end_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:55
  primitive_type_check(ignore_caseQ_, &KLbooleanGVKd);
  ignore_caseQF10 = ignore_caseQ_;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:61
  T14 = primitive_not(ignore_caseQF10);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:61
  compiled_pattern_ = Kcompile_substringYPstringsVstringsMM0I(pattern_, T14);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:62
  T15 = primitive_not(ignore_caseQF10);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/strings/substring-search.dylan:62
  T12_0 = CALL6(&KPfind_substringYPstringsVstringsMM0, big_, pattern_, start_, big_endF9, T15, compiled_pattern_);
  // /Users/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 D KPresolve_symbolVKiI(D);
  {
    D 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 */
