#include "run-time.h"

/* Typedefs for referenced classes */

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

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

typedef struct {
  D wrapper;
} _KLobjectGVKd;

typedef struct {
  D wrapper;
} _KLunboundGVKe;

typedef struct {
  D wrapper;
} _KLbooleanGVKd;

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

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

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

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

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

#define  define__KLsimple_object_vectorGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D size_; \
    D vector_element_[nrepeated+1]; \
  } _KLsimple_object_vectorGVKd_##nrepeated;
define__KLsimple_object_vectorGVKd(8);
define__KLsimple_object_vectorGVKd(5);
define__KLsimple_object_vectorGVKd(6);
define__KLsimple_object_vectorGVKd(3);
define__KLsimple_object_vectorGVKd(10);
define__KLsimple_object_vectorGVKd(1);
define__KLsimple_object_vectorGVKd(4);
define__KLsimple_object_vectorGVKd(256);
define__KLsimple_object_vectorGVKd(2);
define__KLsimple_object_vectorGVKd(0);

#define  define__KLbyte_stringGVKd(nrepeated) \
  typedef struct { \
    D wrapper; \
    D size_; \
    char string_element_[nrepeated+1]; \
  } _KLbyte_stringGVKd_##nrepeated;
define__KLbyte_stringGVKd(24);
define__KLbyte_stringGVKd(20);
define__KLbyte_stringGVKd(10);
define__KLbyte_stringGVKd(23);
define__KLbyte_stringGVKd(21);
define__KLbyte_stringGVKd(28);
define__KLbyte_stringGVKd(18);
define__KLbyte_stringGVKd(7);
define__KLbyte_stringGVKd(19);
define__KLbyte_stringGVKd(16);
define__KLbyte_stringGVKd(12);
define__KLbyte_stringGVKd(9);
define__KLbyte_stringGVKd(17);
define__KLbyte_stringGVKd(6);
define__KLbyte_stringGVKd(14);
define__KLbyte_stringGVKd(8);

typedef struct {
  D wrapper;
  D signature_properties_;
  D signature_required_;
} _KLsignatureGVKe;

typedef struct {
  D wrapper;
  D class_properties_;
  D iclass_class_;
  D class_mm_wrapper_;
  D repeated_slot_descriptor_;
  D instance_slot_descriptors_;
  D iclass_dispatch_key_;
  D class_constructor_;
  D direct_superclasses_;
  D class_rcpl_vector_;
  D class_rcpl_position_;
  D class_rcpl_other_positions_;
  D class_known_joint_;
  D iclass_dependent_generics_;
  D iclass_subclass_dependent_generics_;
  D direct_subclasses_;
  D direct_methods_;
  D direct_slot_descriptors_;
  D slot_descriptors_;
  D direct_inherited_slot_descriptors_;
  D direct_initialization_argument_descriptors_;
  D class_slot_descriptors_;
  D defaulted_initialization_arguments_slot_;
  D class_slot_storage_;
} _KLimplementation_classGVKe;

typedef struct {
  D wrapper;
  D slot_descriptor_properties_;
  D init_data_slot_;
  D slot_owner_;
  D init_keyword_;
  D slot_getter_;
  D slot_setter_;
  D slot_type_;
} _KLinstance_slot_descriptorGVKe;

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 xep_;
} _KLfunctionGVKd;

typedef struct {
  D wrapper;
  D signature_properties_;
  D signature_required_;
} _KLobject_signatureGVKe;

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

typedef struct {
  D wrapper;
  D xep_;
  D method_slot_descriptor_;
} _KLgetter_methodGVKi;

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

typedef struct {
  D wrapper;
  D element_type_;
  D table_vector_;
  D initial_entries_;
  D grow_size_function_;
  D weakQ_;
} _KLtableGVKd;

typedef struct {
  D wrapper;
  D element_type_;
  D table_vector_;
  D initial_entries_;
  D grow_size_function_;
  D weakQ_;
} _KLobject_tableGVKd;

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

#define  define__KLsimple_closure_methodGVKi(nrepeated) \
  typedef struct { \
    D wrapper; \
    D xep_; \
    D function_signature_; \
    D mep_; \
    D environment_size_; \
    D environment_element_[nrepeated+1]; \
  } _KLsimple_closure_methodGVKi_##nrepeated;
define__KLsimple_closure_methodGVKi(0);

typedef struct {
  D wrapper;
  D synchronization_name_;
} _KLlockGYthreadsVdylan;

typedef struct {
  D wrapper;
  D handle1_;
  D synchronization_name_;
} _KLsimple_lock_iGYthreads_internalVdylan;

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;

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

typedef struct {
  D wrapper;
  D handle1_;
  D handle2_;
  D priority_;
  D thread_name_;
  D function_;
  D function_results_;
} _KLthreadGYthreadsVdylan;

typedef struct {
  D wrapper;
  D synchronization_;
} _KLtimeout_expiredGYthreadsVdylan;

typedef struct {
  D wrapper;
  D signature_properties_;
  D signature_required_;
  D signature_keys_;
  D signature_key_types_;
} _KLkeyword_signatureGVKe;

typedef struct {
  D wrapper;
  D instanceQ_iep_;
} _KLtypeGVKd;

typedef struct {
  D wrapper;
  D xep_;
  D method_slot_descriptor_;
} _KLsetter_methodGVKi;

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


/* Typedefs for defined classes */

typedef struct {
  D wrapper;
  D channel_messageQ_;
  D channel_receiverQ_;
  D channel_callback_;
} _KLchannel_objectGVchannels;

typedef struct {
  D wrapper;
  D channel_messageQ_;
  D channel_receiverQ_;
  D channel_callback_;
  D channel_lock_;
  D channel_receivers_;
  D channel_mapper_;
} _KLchannelGVchannels;

typedef struct {
  D wrapper;
  D channel_messageQ_;
  D channel_receiverQ_;
  D channel_callback_;
  D receiver_key_;
  D receiver_message_type_;
} _KLreceiverGVchannels;


/* Referenced object declarations */

D KPadd_classVKeI (D);
extern _KLclassGVKd KLclassGVKd;
extern _KLmm_wrapperGVKi_0 KLclassGVKdW;
extern _KLclassGVKd KLmm_wrapperGVKi;
extern _KLmm_wrapperGVKi_1 KLmm_wrapperGVKiW;
extern _KLclassGVKd KLobjectGVKd;
extern _KLmm_wrapperGVKi_0 KLobjectGVKdW;
extern _KLunboundGVKe KPunboundVKi;
extern _KLclassGVKd KLunboundGVKe;
extern _KLmm_wrapperGVKi_0 KLunboundGVKeW;
extern _KLbooleanGVKd KPtrueVKi;
extern _KLclassGVKd KLbooleanGVKd;
extern _KLmm_wrapperGVKi_0 KLbooleanGVKdW;
extern _KLbooleanGVKd KPfalseVKi;
extern _KLfunction_classGVKi KLincremental_generic_functionGVKe;
extern _KLclassGVKd KLfunction_classGVKi;
extern _KLmm_wrapperGVKi_0 KLfunction_classGVKiW;
extern _KLmm_wrapperGVKi_0 KLincremental_generic_functionGVKeW;
extern _KLempty_listGVKd KPempty_listVKi;
extern _KLclassGVKd KLempty_listGVKd;
extern _KLmm_wrapperGVKi_0 KLempty_listGVKdW;
extern _KLabsent_engine_nodeGVKg RSINGULAR_Labsent_engine_nodeG;
extern _KLclassGVKd KLabsent_engine_nodeGVKg;
extern _KLmm_wrapperGVKi_0 KLabsent_engine_nodeGVKgW;
extern _KLmoduleGVKe Kchannels_moduleYdylan_userVchannels;
extern _KLclassGVKd KLmoduleGVKe;
extern _KLmm_wrapperGVKi_0 KLmoduleGVKeW;
extern _KLsimple_object_vectorGVKd_0 KPempty_vectorVKi;
extern _KLclassGVKd KLsimple_object_vectorGVKd;
extern _KLmm_wrapperGVKi_0 KLsimple_object_vectorGVKdW;
extern _KLclassGVKd KLbyte_stringGVKd;
extern _KLmm_wrapperGVKi_0 KLbyte_stringGVKdW;
extern _KLclassGVKd KLsignatureGVKe;
extern _KLmm_wrapperGVKi_0 KLsignatureGVKeW;
extern _KLclassGVKd KLimplementation_classGVKe;
extern _KLmm_wrapperGVKi_0 KLimplementation_classGVKeW;
extern _KLclassGVKd KLinstance_slot_descriptorGVKe;
extern _KLmm_wrapperGVKi_0 KLinstance_slot_descriptorGVKeW;
extern _KLsealed_generic_functionGVKe KdoVKd;
extern _KLclassGVKd KLsealed_generic_functionGVKe;
extern _KLmm_wrapperGVKi_0 KLsealed_generic_functionGVKeW;
extern _KLclassGVKd KLfunctionGVKd;
extern _KLmm_wrapperGVKi_0 KLfunctionGVKdW;
extern _KLobject_signatureGVKe KDsignature_LobjectG_object_rest_value_1VKi;
extern _KLclassGVKd KLobject_signatureGVKe;
extern _KLmm_wrapperGVKi_0 KLobject_signatureGVKeW;
extern _KLclassGVKd KLpairGVKd;
extern _KLmm_wrapperGVKi_0 KLpairGVKdW;
extern _KLclassGVKd KLgetter_methodGVKi;
extern _KLmm_wrapperGVKi_0 KLgetter_methodGVKiW;
extern _KLclassGVKd KLsymbolGVKd;
extern _KLmm_wrapperGVKi_0 KLsymbolGVKdW;
extern _KLclassGVKd KLtableGVKd;
extern _KLmm_wrapperGVKi_0 KLtableGVKdW;
D KLobject_tableGZ32ZconstructorVKiMM0I (D, D, D, D, D, D);
extern _KLclassGVKd KLobject_tableGVKd;
extern _KLmm_wrapperGVKi_0 KLobject_tableGVKdW;
extern _KLsimple_methodGVKe Kdefault_grow_sizeVKe;
extern _KLfunction_classGVKi KLsimple_methodGVKe;
extern _KLmm_wrapperGVKi_0 KLsimple_methodGVKeW;
extern _KLfunction_classGVKi KLsimple_closure_methodGVKi;
extern _KLmm_wrapperGVKi_0 KLsimple_closure_methodGVKiW;
extern _KLclassGVKd KLlockGYthreadsVdylan;
extern _KLmm_wrapperGVKi_0 KLlockGYthreadsVdylanW;
D KLsimple_lock_iGZ32ZconstructorYthreads_internalVdylanMM0I (D, D, D);
extern _KLclassGVKd KLsimple_lock_iGYthreads_internalVdylan;
extern _KLmm_wrapperGVKi_1 KLsimple_lock_iGYthreads_internalVdylanW;
extern _KLincremental_generic_functionGVKe KinitializeVKd;
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 _KLclassGVKd KLkeyword_signatureAvaluesGVKi;
extern _KLmm_wrapperGVKi_0 KLkeyword_signatureAvaluesGVKiW;
extern _KLsimple_object_vectorGVKd_2 KDsignature_LclassG_typesVKi;
extern _KLsimple_object_vectorGVKd_256 KDsignature_LobjectG_typesVKi;
D Kclass_instanceQ_rcpl_single_smallVKiI (D, D);
extern _KLincremental_generic_functionGVKe KownedQYthreadsVdylan;
extern _KLsymbolGVKd KJname_;
extern _KLsymbolGVKd KJfunction_;
extern _KLincremental_generic_functionGVKe KmakeVKd;
extern _KLclassGVKd KLthreadGYthreadsVdylan;
extern _KLmm_wrapperGVKi_1 KLthreadGYthreadsVdylanW;
extern _KLincremental_generic_functionGVKe Kwait_forYthreadsVdylan;
extern _KLincremental_generic_functionGVKe Kremove_keyXVKd;
extern _KLincremental_generic_functionGVKe KreleaseYthreadsVdylan;
extern _KLsymbolGVKd KJsynchronization_;
extern _KLclassGVKd KLtimeout_expiredGYthreadsVdylan;
extern _KLmm_wrapperGVKi_0 KLtimeout_expiredGYthreadsVdylanW;
D KsignalVKdMM0I (D, D);
extern _KLclassGVKd KLkeyword_signatureGVKe;
extern _KLmm_wrapperGVKi_0 KLkeyword_signatureGVKeW;
extern _KLincremental_generic_functionGVKe KEVKd;
extern _KLsymbolGVKd KJkey_;
extern _KLincremental_generic_functionGVKe Kelement_setterVKd;
extern _KLclassGVKd KLtypeGVKd;
extern _KLmm_wrapperGVKi_0 KLtypeGVKdW;
extern _KLobject_signatureGVKe KDsignature_LobjectG_object_rest_value_2VKi;
extern _KLclassGVKd KLsetter_methodGVKi;
extern _KLmm_wrapperGVKi_0 KLsetter_methodGVKiW;
D KerrorVKdMM1I (D, D);
D Kclass_instanceQ_initialVKiI (D, D);
D Kconcatenate_asVKdMM4I (D, D, D);
extern _KLclassGVKd KLlistGVKd;
extern _KLmm_wrapperGVKi_0 KLlistGVKdW;
D KapplyVKdI (D, D);
D Kconcatenate_2VKeMM1I (D, D);
extern _KLsealed_generic_functionGVKe KerrorVKd;
extern D DunsuppliedYcommon_extensionsVcommon_dylan;

/* Defined object declarations */

extern _KLclassGVKd KLchannel_objectGVchannels;
extern _KLmm_wrapperGVKi_0 KLchannel_objectGVchannelsW;
extern _KLincremental_generic_functionGVKe Ktune_outVchannels;
extern _KLsimple_methodGVKe Ktune_outVchannelsMM0;
D Ktune_outVchannelsMM0I (D, D);
static _KLpairGVKd K6;
static _KLsignatureGVKe K7;
static _KLbyte_stringGVKd_8 K8;
static _KLsimple_object_vectorGVKd_2 K9;
extern _KLclassGVKd KLchannelGVchannels;
extern _KLmm_wrapperGVKi_0 KLchannelGVchannelsW;
static _KLimplementation_classGVKe K12;
static _KLsimple_object_vectorGVKd_6 K13;
extern _KLkeyword_methodGVKe KLchannelGZ32ZconstructorVchannelsMM0;
D KLchannelGZ32ZconstructorVchannelsMM0I (D, D, D, D, D, D, D);
static _KLsimple_object_vectorGVKd_1 K16;
static _KLsimple_object_vectorGVKd_6 K17;
static _KLsimple_object_vectorGVKd_3 K18;
extern _KLinstance_slot_descriptorGVKe Kchannel_lockVchannelsHLchannelG;
extern _KLinstance_slot_descriptorGVKe Kchannel_receiversVchannelsHLchannelG;
extern _KLinstance_slot_descriptorGVKe Kchannel_mapperVchannelsHLchannelG;
static _KLsymbolGVKd KJmapper_;
extern _KLsealed_generic_functionGVKe Kchannel_mapperVchannels;
extern _KLgetter_methodGVKi Kchannel_mapperVchannelsMM0;
static _KLpairGVKd K25;
static _KLbyte_stringGVKd_14 K26;
static _KLbyte_stringGVKd_6 K27;
static _KLsimple_closure_methodGVKi_0 K36;
static D K36I ();
static _KLsymbolGVKd KJreceivers_;
extern _KLsealed_generic_functionGVKe Kchannel_receiversVchannels;
extern _KLgetter_methodGVKi Kchannel_receiversVchannelsMM0;
static _KLpairGVKd K33;
static _KLbyte_stringGVKd_17 K34;
static _KLbyte_stringGVKd_9 K35;
static _KLsignatureGVKe K37;
static _KLsimple_closure_methodGVKi_0 K44;
static D K44I ();
extern _KLsealed_generic_functionGVKe Kchannel_lockVchannels;
extern _KLgetter_methodGVKi Kchannel_lockVchannelsMM0;
static _KLpairGVKd K42;
static _KLbyte_stringGVKd_12 K43;
static D K54I ();
static D K53I ();
static D K52I ();
static _KLunionGVKe K48;
static D K50I ();
static _KLsingletonGVKd K51;
static _KLkeyword_signatureAvaluesGVKi K55;
static _KLsimple_object_vectorGVKd_10 K56;
static _KLsymbolGVKd KJmessageQ_;
static _KLsymbolGVKd KJreceiverQ_;
static _KLsymbolGVKd KJcallback_;
static _KLbyte_stringGVKd_8 K60;
static _KLbyte_stringGVKd_9 K61;
static _KLbyte_stringGVKd_8 K62;
static _KLsimple_object_vectorGVKd_5 K63;
static _KLsimple_object_vectorGVKd_1 K64;
extern _KLinstance_slot_descriptorGVKe Kchannel_messageQVchannelsHLchannel_objectG;
extern _KLinstance_slot_descriptorGVKe Kchannel_receiverQVchannelsHLchannel_objectG;
extern _KLinstance_slot_descriptorGVKe Kchannel_callbackVchannelsHLchannel_objectG;
extern _KLsealed_generic_functionGVKe Kchannel_callbackVchannels;
extern _KLgetter_methodGVKi Kchannel_callbackVchannelsMM0;
static _KLpairGVKd K70;
static _KLbyte_stringGVKd_16 K71;
static _KLsimple_closure_methodGVKi_0 K78;
static D K78I ();
extern _KLsealed_generic_functionGVKe Kchannel_receiverQVchannels;
extern _KLgetter_methodGVKi Kchannel_receiverQVchannelsMM0;
static _KLpairGVKd K76;
static _KLbyte_stringGVKd_17 K77;
static _KLsimple_closure_methodGVKi_0 K85;
static D K85I ();
extern _KLsealed_generic_functionGVKe Kchannel_messageQVchannels;
extern _KLgetter_methodGVKi Kchannel_messageQVchannelsMM0;
static _KLpairGVKd K83;
static _KLbyte_stringGVKd_16 K84;
static _KLbyte_stringGVKd_9 K86;
static _KLsimple_closure_methodGVKi_0 Kanonymous_of_tune_outF90;
static D Kanonymous_of_tune_outF90I ();
static _KLbyte_stringGVKd_19 K89;
static _KLsignatureGVKe K91;
extern _KLincremental_generic_functionGVKe Ktune_inVchannels;
extern _KLkeyword_methodGVKe Ktune_inVchannelsMM0;
D Ktune_inVchannelsMM0I (D, D, D, D);
static _KLpairGVKd K95;
static _KLkeyword_signatureGVKe K96;
static _KLbyte_stringGVKd_7 K97;
static _KLsimple_closure_methodGVKi_0 Kanonymous_of_tune_inF139;
static D Kanonymous_of_tune_inF139I ();
extern _KLclassGVKd KLreceiverGVchannels;
extern _KLmm_wrapperGVKi_0 KLreceiverGVchannelsW;
static _KLbyte_stringGVKd_18 K102;
static _KLimplementation_classGVKe K103;
static _KLsimple_object_vectorGVKd_5 K104;
extern _KLkeyword_methodGVKe KLreceiverGZ32ZconstructorVchannelsMM0;
D KLreceiverGZ32ZconstructorVchannelsMM0I (D, D, D, D, D, D, D);
static _KLsimple_object_vectorGVKd_6 K107;
static _KLsimple_object_vectorGVKd_2 K108;
extern _KLinstance_slot_descriptorGVKe Kreceiver_keyVchannelsHLreceiverG;
extern _KLinstance_slot_descriptorGVKe Kreceiver_message_typeVchannelsHLreceiverG;
static _KLsymbolGVKd KJmessage_type_;
extern _KLsealed_generic_functionGVKe Kreceiver_message_typeVchannels;
extern _KLsealed_generic_functionGVKe Kreceiver_message_type_setterVchannels;
extern _KLsetter_methodGVKi Kreceiver_message_type_setterVchannelsMM0;
static _KLpairGVKd K115;
static _KLbyte_stringGVKd_28 K116;
extern _KLgetter_methodGVKi Kreceiver_message_typeVchannelsMM0;
static _KLpairGVKd K118;
static _KLbyte_stringGVKd_21 K119;
static _KLbyte_stringGVKd_12 K120;
extern _KLsealed_generic_functionGVKe Kreceiver_keyVchannels;
extern _KLsealed_generic_functionGVKe Kreceiver_key_setterVchannels;
extern _KLsetter_methodGVKi Kreceiver_key_setterVchannelsMM0;
static _KLpairGVKd K124;
static _KLbyte_stringGVKd_19 K125;
extern _KLgetter_methodGVKi Kreceiver_keyVchannelsMM0;
static _KLpairGVKd K127;
static _KLbyte_stringGVKd_12 K128;
static D K133I ();
static D K132I ();
static _KLbyte_stringGVKd_23 K131;
static _KLkeyword_signatureAvaluesGVKi K134;
static _KLsimple_object_vectorGVKd_10 K135;
static _KLsimple_object_vectorGVKd_5 K136;
static _KLsimple_object_vectorGVKd_1 K137;
static _KLbyte_stringGVKd_10 K138;
static _KLkeyword_signatureGVKe K140;
static _KLsimple_object_vectorGVKd_2 K141;
static _KLsimple_object_vectorGVKd_1 K142;
extern _KLincremental_generic_functionGVKe Koverride_channelVchannels;
extern _KLkeyword_methodGVKe Koverride_channelVchannelsMM0;
D Koverride_channelVchannelsMM0I (D, D, D, D, D, D);
static _KLpairGVKd K146;
static _KLkeyword_signatureAvaluesGVKi K147;
static _KLbyte_stringGVKd_16 K148;
static _KLsimple_object_vectorGVKd_4 K149;
D Kany_suppliedQVchannelsMM0I (D);
static _KLsimple_object_vectorGVKd_8 K151;
extern _KLincremental_generic_functionGVKe KbroadcastVchannels;
extern _KLsimple_methodGVKe KbroadcastVchannelsMM0;
D KbroadcastVchannelsMM0I (D, D, D);
static _KLpairGVKd K155;
static _KLsignatureGVKe K156;
static _KLbyte_stringGVKd_9 K157;
static _KLsimple_closure_methodGVKi_0 Kdo_receiverF164;
static D Kdo_receiverF164I (D);
static _KLsimple_closure_methodGVKi_0 Kanonymous_of_broadcastF163;
static D Kanonymous_of_broadcastF163I ();
static _KLbyte_stringGVKd_20 K162;
static _KLsimple_closure_methodGVKi_0 Kanonymous_of_broadcastF168;
static D Kanonymous_of_broadcastF168I (D);
static _KLbyte_stringGVKd_24 K167;
static _KLsignatureGVKe K169;
static _KLsignatureGVKe K170;
static _KLimplementation_classGVKe K171;
static _KLsimple_object_vectorGVKd_3 K172;
extern _KLkeyword_methodGVKe KLchannel_objectGZ32ZconstructorVchannelsMM0;
D KLchannel_objectGZ32ZconstructorVchannelsMM0I (D, D, D, D, D);
static _KLsimple_object_vectorGVKd_1 K175;
static _KLsimple_object_vectorGVKd_6 K176;
static D K180I ();
static D K179I ();
static _KLkeyword_signatureAvaluesGVKi K181;
static _KLsimple_object_vectorGVKd_6 K182;
static _KLsimple_object_vectorGVKd_3 K183;
static _KLbyte_stringGVKd_16 K184;
static _KLpairGVKd K185;
static _KLpairGVKd K186;

/* Indirection variables */

static D IKJmapper_ = &KJmapper_;
static D IKJreceivers_ = &KJreceivers_;
static D IKJmessageQ_ = &KJmessageQ_;
static D IKJreceiverQ_ = &KJreceiverQ_;
static D IKJcallback_ = &KJcallback_;
static D IKJmessage_type_ = &KJmessage_type_;

/* Variables */

D Lchannel_objectGVchannels = &KLchannel_objectGVchannels;
D LchannelGVchannels = &KLchannelGVchannels;
D LreceiverGVchannels = &KLreceiverGVchannels;
D broadcastVchannels = &KbroadcastVchannels;
D override_channelVchannels = &Koverride_channelVchannels;
D tune_inVchannels = &Ktune_inVchannels;
D tune_outVchannels = &Ktune_outVchannels;

/* Objects */

_KLclassGVKd KLchannel_objectGVchannels = {
  &KLclassGVKdW /* wrapper */,
  &Kclass_instanceQ_rcpl_single_smallVKiI,
  &K184,
  &K171,
  (D) 1,
  &Kchannels_moduleYdylan_userVchannels
};

_KLmm_wrapperGVKi_0 KLchannel_objectGVchannelsW = {
  &KLmm_wrapperGVKiW /* wrapper */,
  &K171,
  (D) 1,
  13,
  33554439,
  (D) 1
};

_KLincremental_generic_functionGVKe Ktune_outVchannels = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_xep_2,
  &K7,
  (D) 1,
  &K8,
  &K6,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kchannels_moduleYdylan_userVchannels,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLsimple_methodGVKe Ktune_outVchannelsMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &xep_2,
  &K7,
  &Ktune_outVchannelsMM0I
};

static _KLpairGVKd K6 = {
  &KLpairGVKdW /* wrapper */,
  &Ktune_outVchannelsMM0,
  &KPempty_listVKi
};

static _KLsignatureGVKe K7 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 41943049,
  &K9
};

static _KLbyte_stringGVKd_8 K8 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 33,
  "tune-out"
};

static _KLsimple_object_vectorGVKd_2 K9 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 9,
  &KLchannelGVchannels,
  &KLobjectGVKd
};

_KLclassGVKd KLchannelGVchannels = {
  &KLclassGVKdW /* wrapper */,
  &Kclass_instanceQ_rcpl_single_smallVKiI,
  &K86,
  &K12,
  (D) 1,
  &Kchannels_moduleYdylan_userVchannels
};

_KLmm_wrapperGVKi_0 KLchannelGVchannelsW = {
  &KLmm_wrapperGVKiW /* wrapper */,
  &K12,
  (D) 1,
  25,
  33554439,
  (D) 1
};

static _KLimplementation_classGVKe K12 = {
  &KLimplementation_classGVKeW /* wrapper */,
  (D) 375390233,
  &KLchannelGVchannels,
  &KLchannelGVchannelsW,
  &KPfalseVKi,
  &K13,
  (D) -3,
  &KLchannelGZ32ZconstructorVchannelsMM0,
  &K16,
  &K17,
  (D) 9,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_listVKi,
  &KPempty_listVKi,
  &KPempty_listVKi,
  &KPempty_vectorVKi,
  &K18,
  &K13,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi
};

static _KLsimple_object_vectorGVKd_6 K13 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 25,
  &Kchannel_messageQVchannelsHLchannel_objectG,
  &Kchannel_receiverQVchannelsHLchannel_objectG,
  &Kchannel_callbackVchannelsHLchannel_objectG,
  &Kchannel_lockVchannelsHLchannelG,
  &Kchannel_receiversVchannelsHLchannelG,
  &Kchannel_mapperVchannelsHLchannelG
};

_KLkeyword_methodGVKe KLchannelGZ32ZconstructorVchannelsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_7,
  &K55,
  &key_mep_2,
  &KLchannelGZ32ZconstructorVchannelsMM0I,
  &K56
};

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

static _KLsimple_object_vectorGVKd_6 K17 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 25,
  &KLobjectGVKd,
  &KLchannel_objectGVchannels,
  &KLchannelGVchannels,
  &KPfalseVKi,
  &KPfalseVKi,
  &KPfalseVKi
};

static _KLsimple_object_vectorGVKd_3 K18 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 13,
  &Kchannel_lockVchannelsHLchannelG,
  &Kchannel_receiversVchannelsHLchannelG,
  &Kchannel_mapperVchannelsHLchannelG
};

_KLinstance_slot_descriptorGVKe Kchannel_lockVchannelsHLchannelG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 149,
  &K44,
  &KLchannelGVchannels,
  &KPfalseVKi,
  &Kchannel_lockVchannels,
  &KPfalseVKi,
  &KLlockGYthreadsVdylan
};

_KLinstance_slot_descriptorGVKe Kchannel_receiversVchannelsHLchannelG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 149,
  &K36,
  &KLchannelGVchannels,
  &KJreceivers_,
  &Kchannel_receiversVchannels,
  &KPfalseVKi,
  &KLtableGVKd
};

_KLinstance_slot_descriptorGVKe Kchannel_mapperVchannelsHLchannelG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 157,
  &KdoVKd,
  &KLchannelGVchannels,
  &KJmapper_,
  &Kchannel_mapperVchannels,
  &KPfalseVKi,
  &KLfunctionGVKd
};

static _KLsymbolGVKd KJmapper_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K27
};

_KLsealed_generic_functionGVKe Kchannel_mapperVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  (D) 1,
  &K26,
  &K25,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLgetter_methodGVKi Kchannel_mapperVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kchannel_mapperVchannelsHLchannelG
};

static _KLpairGVKd K25 = {
  &KLpairGVKdW /* wrapper */,
  &Kchannel_mapperVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_14 K26 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 57,
  "channel-mapper"
};

static _KLbyte_stringGVKd_6 K27 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 25,
  "mapper"
};

static _KLsimple_closure_methodGVKi_0 K36 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K37,
  &K36I,
  (D) 1
};

static _KLsymbolGVKd KJreceivers_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K35
};

_KLsealed_generic_functionGVKe Kchannel_receiversVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  (D) 1,
  &K34,
  &K33,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLgetter_methodGVKi Kchannel_receiversVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kchannel_receiversVchannelsHLchannelG
};

static _KLpairGVKd K33 = {
  &KLpairGVKdW /* wrapper */,
  &Kchannel_receiversVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_17 K34 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 69,
  "channel-receivers"
};

static _KLbyte_stringGVKd_9 K35 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 37,
  "receivers"
};

static _KLsignatureGVKe K37 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 41944065,
  &KPempty_vectorVKi
};

static _KLsimple_closure_methodGVKi_0 K44 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K37,
  &K44I,
  (D) 1
};

_KLsealed_generic_functionGVKe Kchannel_lockVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  (D) 1,
  &K43,
  &K42,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLgetter_methodGVKi Kchannel_lockVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kchannel_lockVchannelsHLchannelG
};

static _KLpairGVKd K42 = {
  &KLpairGVKdW /* wrapper */,
  &Kchannel_lockVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_12 K43 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 49,
  "channel-lock"
};

static _KLunionGVKe K48 = {
  &KLunionGVKeW /* wrapper */,
  &Kunion_instanceQVKiI,
  &K51,
  &KLfunctionGVKd
};

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

static _KLkeyword_signatureAvaluesGVKi K55 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (D) 35390469,
  &KDsignature_LclassG_typesVKi,
  &K63,
  &KDsignature_LobjectG_typesVKi,
  &K64
};

static _KLsimple_object_vectorGVKd_10 K56 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 41,
  &KJmessageQ_,
  &KPunboundVKi,
  &KJreceiverQ_,
  &KPunboundVKi,
  &KJcallback_,
  &KPfalseVKi,
  &KJreceivers_,
  &KPunboundVKi,
  &KJmapper_,
  &KdoVKd
};

static _KLsymbolGVKd KJmessageQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K62
};

static _KLsymbolGVKd KJreceiverQ_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K61
};

static _KLsymbolGVKd KJcallback_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K60
};

static _KLbyte_stringGVKd_8 K60 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 33,
  "callback"
};

static _KLbyte_stringGVKd_9 K61 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 37,
  "receiver?"
};

static _KLbyte_stringGVKd_8 K62 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 33,
  "message?"
};

static _KLsimple_object_vectorGVKd_5 K63 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 21,
  &KJmessageQ_,
  &KJreceiverQ_,
  &KJcallback_,
  &KJreceivers_,
  &KJmapper_
};

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

_KLinstance_slot_descriptorGVKe Kchannel_messageQVchannelsHLchannel_objectG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 149,
  &K85,
  &KLchannel_objectGVchannels,
  &KJmessageQ_,
  &Kchannel_messageQVchannels,
  &KPfalseVKi,
  &KLobjectGVKd
};

_KLinstance_slot_descriptorGVKe Kchannel_receiverQVchannelsHLchannel_objectG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 149,
  &K78,
  &KLchannel_objectGVchannels,
  &KJreceiverQ_,
  &Kchannel_receiverQVchannels,
  &KPfalseVKi,
  &KLobjectGVKd
};

_KLinstance_slot_descriptorGVKe Kchannel_callbackVchannelsHLchannel_objectG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 157,
  &KPfalseVKi,
  &KLchannel_objectGVchannels,
  &KJcallback_,
  &Kchannel_callbackVchannels,
  &KPfalseVKi,
  &K48
};

_KLsealed_generic_functionGVKe Kchannel_callbackVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  (D) 1,
  &K71,
  &K70,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLgetter_methodGVKi Kchannel_callbackVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kchannel_callbackVchannelsHLchannel_objectG
};

static _KLpairGVKd K70 = {
  &KLpairGVKdW /* wrapper */,
  &Kchannel_callbackVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_16 K71 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "channel-callback"
};

static _KLsimple_closure_methodGVKi_0 K78 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K37,
  &K78I,
  (D) 1
};

_KLsealed_generic_functionGVKe Kchannel_receiverQVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  (D) 1,
  &K77,
  &K76,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLgetter_methodGVKi Kchannel_receiverQVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kchannel_receiverQVchannelsHLchannel_objectG
};

static _KLpairGVKd K76 = {
  &KLpairGVKdW /* wrapper */,
  &Kchannel_receiverQVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_17 K77 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 69,
  "channel-receiver?"
};

static _KLsimple_closure_methodGVKi_0 K85 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K37,
  &K85I,
  (D) 1
};

_KLsealed_generic_functionGVKe Kchannel_messageQVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  (D) 1,
  &K84,
  &K83,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLgetter_methodGVKi Kchannel_messageQVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kchannel_messageQVchannelsHLchannel_objectG
};

static _KLpairGVKd K83 = {
  &KLpairGVKdW /* wrapper */,
  &Kchannel_messageQVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_16 K84 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "channel-message?"
};

static _KLbyte_stringGVKd_9 K86 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 37,
  "<channel>"
};

static _KLsimple_closure_methodGVKi_0 Kanonymous_of_tune_outF90 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K91,
  &Kanonymous_of_tune_outF90I,
  (D) 1
};

static _KLbyte_stringGVKd_19 K89 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 77,
  "Re-entrant tune-out"
};

static _KLsignatureGVKe K91 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 44040193,
  &KPempty_vectorVKi
};

_KLincremental_generic_functionGVKe Ktune_inVchannels = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_optional_xep_2,
  &K96,
  &KPfalseVKi,
  &K97,
  &K95,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kchannels_moduleYdylan_userVchannels,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLkeyword_methodGVKe Ktune_inVchannelsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_4,
  &K140,
  &key_mep_4,
  &Ktune_inVchannelsMM0I,
  &K141
};

static _KLpairGVKd K95 = {
  &KLpairGVKdW /* wrapper */,
  &Ktune_inVchannelsMM0,
  &KPempty_listVKi
};

static _KLkeyword_signatureGVKe K96 = {
  &KLkeyword_signatureGVKeW /* wrapper */,
  (D) 42729481,
  &K9,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi
};

static _KLbyte_stringGVKd_7 K97 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 29,
  "tune-in"
};

static _KLsimple_closure_methodGVKi_0 Kanonymous_of_tune_inF139 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K91,
  &Kanonymous_of_tune_inF139I,
  (D) 1
};

_KLclassGVKd KLreceiverGVchannels = {
  &KLclassGVKdW /* wrapper */,
  &Kclass_instanceQ_initialVKiI,
  &K138,
  &K103,
  (D) 1,
  &Kchannels_moduleYdylan_userVchannels
};

_KLmm_wrapperGVKi_0 KLreceiverGVchannelsW = {
  &KLmm_wrapperGVKiW /* wrapper */,
  &K103,
  (D) 1,
  21,
  33554439,
  (D) 1
};

static _KLbyte_stringGVKd_18 K102 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 73,
  "Re-entrant tune-in"
};

static _KLimplementation_classGVKe K103 = {
  &KLimplementation_classGVKeW /* wrapper */,
  (D) 527433749,
  &KLreceiverGVchannels,
  &KLreceiverGVchannelsW,
  &KPfalseVKi,
  &K104,
  (D) -3,
  &KLreceiverGZ32ZconstructorVchannelsMM0,
  &K16,
  &K107,
  (D) 9,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_listVKi,
  &KPempty_listVKi,
  &KPempty_listVKi,
  &KPempty_vectorVKi,
  &K108,
  &K104,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi
};

static _KLsimple_object_vectorGVKd_5 K104 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 21,
  &Kchannel_messageQVchannelsHLchannel_objectG,
  &Kchannel_receiverQVchannelsHLchannel_objectG,
  &Kchannel_callbackVchannelsHLchannel_objectG,
  &Kreceiver_keyVchannelsHLreceiverG,
  &Kreceiver_message_typeVchannelsHLreceiverG
};

_KLkeyword_methodGVKe KLreceiverGZ32ZconstructorVchannelsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_7,
  &K134,
  &key_mep_2,
  &KLreceiverGZ32ZconstructorVchannelsMM0I,
  &K135
};

static _KLsimple_object_vectorGVKd_6 K107 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 25,
  &KLobjectGVKd,
  &KLchannel_objectGVchannels,
  &KLreceiverGVchannels,
  &KPfalseVKi,
  &KPfalseVKi,
  &KPfalseVKi
};

static _KLsimple_object_vectorGVKd_2 K108 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 9,
  &Kreceiver_keyVchannelsHLreceiverG,
  &Kreceiver_message_typeVchannelsHLreceiverG
};

_KLinstance_slot_descriptorGVKe Kreceiver_keyVchannelsHLreceiverG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 193,
  &KPfalseVKi,
  &KLreceiverGVchannels,
  &KJkey_,
  &Kreceiver_keyVchannels,
  &Kreceiver_key_setterVchannels,
  &KLobjectGVKd
};

_KLinstance_slot_descriptorGVKe Kreceiver_message_typeVchannelsHLreceiverG = {
  &KLinstance_slot_descriptorGVKeW /* wrapper */,
  (D) 157,
  &KLobjectGVKd,
  &KLreceiverGVchannels,
  &KJmessage_type_,
  &Kreceiver_message_typeVchannels,
  &Kreceiver_message_type_setterVchannels,
  &KLtypeGVKd
};

static _KLsymbolGVKd KJmessage_type_ = {
  &KLsymbolGVKdW /* wrapper */,
  &K120
};

_KLsealed_generic_functionGVKe Kreceiver_message_typeVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  &KPfalseVKi,
  &K119,
  &K118,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLsealed_generic_functionGVKe Kreceiver_message_type_setterVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_2,
  &KDsignature_LobjectG_object_rest_value_2VKi,
  &KPfalseVKi,
  &K116,
  &K115,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLsetter_methodGVKi Kreceiver_message_type_setterVchannelsMM0 = {
  &KLsetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_setter_xep,
  &Kreceiver_message_typeVchannelsHLreceiverG
};

static _KLpairGVKd K115 = {
  &KLpairGVKdW /* wrapper */,
  &Kreceiver_message_type_setterVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_28 K116 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 113,
  "receiver-message-type-setter"
};

_KLgetter_methodGVKi Kreceiver_message_typeVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kreceiver_message_typeVchannelsHLreceiverG
};

static _KLpairGVKd K118 = {
  &KLpairGVKdW /* wrapper */,
  &Kreceiver_message_typeVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_21 K119 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 85,
  "receiver-message-type"
};

static _KLbyte_stringGVKd_12 K120 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 49,
  "message-type"
};

_KLsealed_generic_functionGVKe Kreceiver_keyVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_1,
  &KDsignature_LobjectG_object_rest_value_1VKi,
  &KPfalseVKi,
  &K128,
  &K127,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLsealed_generic_functionGVKe Kreceiver_key_setterVchannels = {
  &KLsealed_generic_functionGVKeW /* wrapper */,
  &gf_xep_2,
  &KDsignature_LobjectG_object_rest_value_2VKi,
  &KPfalseVKi,
  &K125,
  &K124,
  &RSINGULAR_Labsent_engine_nodeG
};

_KLsetter_methodGVKi Kreceiver_key_setterVchannelsMM0 = {
  &KLsetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_setter_xep,
  &Kreceiver_keyVchannelsHLreceiverG
};

static _KLpairGVKd K124 = {
  &KLpairGVKdW /* wrapper */,
  &Kreceiver_key_setterVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_19 K125 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 77,
  "receiver-key-setter"
};

_KLgetter_methodGVKi Kreceiver_keyVchannelsMM0 = {
  &KLgetter_methodGVKiW /* wrapper */,
  &slotacc_single_q_instance_getter_xep,
  &Kreceiver_keyVchannelsHLreceiverG
};

static _KLpairGVKd K127 = {
  &KLpairGVKdW /* wrapper */,
  &Kreceiver_keyVchannelsMM0,
  &KPempty_listVKi
};

static _KLbyte_stringGVKd_12 K128 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 49,
  "receiver-key"
};

static _KLbyte_stringGVKd_23 K131 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 93,
  "Missing init keyword %="
};

static _KLkeyword_signatureAvaluesGVKi K134 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (D) 35390469,
  &KDsignature_LclassG_typesVKi,
  &K136,
  &KDsignature_LobjectG_typesVKi,
  &K137
};

static _KLsimple_object_vectorGVKd_10 K135 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 41,
  &KJmessageQ_,
  &KPunboundVKi,
  &KJreceiverQ_,
  &KPunboundVKi,
  &KJcallback_,
  &KPfalseVKi,
  &KJkey_,
  &KPunboundVKi,
  &KJmessage_type_,
  &KLobjectGVKd
};

static _KLsimple_object_vectorGVKd_5 K136 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 21,
  &KJmessageQ_,
  &KJreceiverQ_,
  &KJcallback_,
  &KJkey_,
  &KJmessage_type_
};

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

static _KLbyte_stringGVKd_10 K138 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 41,
  "<receiver>"
};

static _KLkeyword_signatureGVKe K140 = {
  &KLkeyword_signatureGVKeW /* wrapper */,
  (D) 43778057,
  &K9,
  &K142,
  &KDsignature_LobjectG_typesVKi
};

static _KLsimple_object_vectorGVKd_2 K141 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 9,
  &KJcallback_,
  &KPfalseVKi
};

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

_KLincremental_generic_functionGVKe Koverride_channelVchannels = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_optional_xep_1,
  &K147,
  &KPfalseVKi,
  &K148,
  &K146,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kchannels_moduleYdylan_userVchannels,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLkeyword_methodGVKe Koverride_channelVchannelsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_6,
  &K147,
  &key_mep_6,
  &Koverride_channelVchannelsMM0I,
  &K151
};

static _KLpairGVKd K146 = {
  &KLpairGVKdW /* wrapper */,
  &Koverride_channelVchannelsMM0,
  &KPempty_listVKi
};

static _KLkeyword_signatureAvaluesGVKi K147 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (D) 34866181,
  &K64,
  &K149,
  &KDsignature_LobjectG_typesVKi,
  &K64
};

static _KLbyte_stringGVKd_16 K148 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "override-channel"
};

static _KLsimple_object_vectorGVKd_4 K149 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 17,
  &KJmessageQ_,
  &KJreceiverQ_,
  &KJcallback_,
  &KJmapper_
};

static _KLsimple_object_vectorGVKd_8 K151 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 33,
  &KJmessageQ_,
  &KPunboundVKi,
  &KJreceiverQ_,
  &KPunboundVKi,
  &KJcallback_,
  &KPunboundVKi,
  &KJmapper_,
  &KPfalseVKi
};

_KLincremental_generic_functionGVKe KbroadcastVchannels = {
  &KLincremental_generic_functionGVKeW /* wrapper */,
  &gf_optional_xep_2,
  &K156,
  &KPfalseVKi,
  &K157,
  &K155,
  &RSINGULAR_Labsent_engine_nodeG,
  &Kchannels_moduleYdylan_userVchannels,
  &KPfalseVKi,
  &KPempty_vectorVKi,
  (D) 25
};

_KLsimple_methodGVKe KbroadcastVchannelsMM0 = {
  &KLsimple_methodGVKeW /* wrapper */,
  &rest_xep_2,
  &K156,
  &KbroadcastVchannelsMM0I
};

static _KLpairGVKd K155 = {
  &KLpairGVKdW /* wrapper */,
  &KbroadcastVchannelsMM0,
  &KPempty_listVKi
};

static _KLsignatureGVKe K156 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 45088777,
  &K9
};

static _KLbyte_stringGVKd_9 K157 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 37,
  "broadcast"
};

static _KLsimple_closure_methodGVKi_0 Kdo_receiverF164 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_1,
  &K170,
  &Kdo_receiverF164I,
  (D) 1
};

static _KLsimple_closure_methodGVKi_0 Kanonymous_of_broadcastF163 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &xep_0,
  &K91,
  &Kanonymous_of_broadcastF163I,
  (D) 1
};

static _KLbyte_stringGVKd_20 K162 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 81,
  "Re-entrant broadcast"
};

static _KLsimple_closure_methodGVKi_0 Kanonymous_of_broadcastF168 = {
  &KLsimple_closure_methodGVKiW /* wrapper */,
  &rest_xep_0,
  &K169,
  &Kanonymous_of_broadcastF168I,
  (D) 1
};

static _KLbyte_stringGVKd_24 K167 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 97,
  "Missing channel callback"
};

static _KLsignatureGVKe K169 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 45088769,
  &KPempty_vectorVKi
};

static _KLsignatureGVKe K170 = {
  &KLsignatureGVKeW /* wrapper */,
  (D) 44040197,
  &K137
};

static _KLimplementation_classGVKe K171 = {
  &KLimplementation_classGVKeW /* wrapper */,
  (D) 376438797,
  &KLchannel_objectGVchannels,
  &KLchannel_objectGVchannelsW,
  &KPfalseVKi,
  &K172,
  (D) -3,
  &KLchannel_objectGZ32ZconstructorVchannelsMM0,
  &K175,
  &K176,
  (D) 5,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_listVKi,
  &KPempty_listVKi,
  &K185,
  &KPempty_vectorVKi,
  &K172,
  &K172,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi,
  &KPempty_vectorVKi
};

static _KLsimple_object_vectorGVKd_3 K172 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 13,
  &Kchannel_messageQVchannelsHLchannel_objectG,
  &Kchannel_receiverQVchannelsHLchannel_objectG,
  &Kchannel_callbackVchannelsHLchannel_objectG
};

_KLkeyword_methodGVKe KLchannel_objectGZ32ZconstructorVchannelsMM0 = {
  &KLkeyword_methodGVKeW /* wrapper */,
  &rest_key_xep_5,
  &K181,
  &key_mep_2,
  &KLchannel_objectGZ32ZconstructorVchannelsMM0I,
  &K182
};

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

static _KLsimple_object_vectorGVKd_6 K176 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 25,
  &KLobjectGVKd,
  &KLchannel_objectGVchannels,
  &KPfalseVKi,
  &KPfalseVKi,
  &KPfalseVKi,
  &KPfalseVKi
};

static _KLkeyword_signatureAvaluesGVKi K181 = {
  &KLkeyword_signatureAvaluesGVKiW /* wrapper */,
  (D) 35390469,
  &KDsignature_LclassG_typesVKi,
  &K183,
  &KDsignature_LobjectG_typesVKi,
  &K16
};

static _KLsimple_object_vectorGVKd_6 K182 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 25,
  &KJmessageQ_,
  &KPunboundVKi,
  &KJreceiverQ_,
  &KPunboundVKi,
  &KJcallback_,
  &KPfalseVKi
};

static _KLsimple_object_vectorGVKd_3 K183 = {
  &KLsimple_object_vectorGVKdW /* wrapper */,
  (D) 13,
  &KJmessageQ_,
  &KJreceiverQ_,
  &KJcallback_
};

static _KLbyte_stringGVKd_16 K184 = {
  &KLbyte_stringGVKdW /* wrapper */,
  (D) 65,
  "<channel-object>"
};

static _KLpairGVKd K185 = {
  &KLpairGVKdW /* wrapper */,
  &KLreceiverGVchannels,
  &K186
};

static _KLpairGVKd K186 = {
  &KLpairGVKdW /* wrapper */,
  &KLchannelGVchannels,
  &KPempty_listVKi
};

/* Code */

D Ktune_outVchannelsMM0I (D channel_, D receiver_key_) {
  D lock_;
  D T4;
  D T5;
  D T6;
  D T7;
  D T8;
  D T9;
  D T10;
  D T11;
  D T12;
  D T13;
  _KLsimple_object_vectorGVKd_4 T14 = {&KLsimple_object_vectorGVKdW, (D) 17};
  _KLsimple_object_vectorGVKd_2 T15 = {&KLsimple_object_vectorGVKdW, (D) 9};
  D T16;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:137
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:139
  CONGRUENT_CALL_PROLOG(&Kchannel_lockVchannels, 1);
  lock_ = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:140
  T4 = CALL1(&KownedQYthreadsVdylan, lock_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:140
  if (T4 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:143
    T5 = MAKE_CLOSURE_INITD(&Kanonymous_of_tune_outF90, 2, receiver_key_, channel_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:141
    T14.vector_element_[0] = &KJname_;
    T14.vector_element_[1] = &K89;
    T14.vector_element_[2] = &KJfunction_;
    T14.vector_element_[3] = T5;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:141
    CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
    T6 = CONGRUENT_CALL2(&KLthreadGYthreadsVdylan, &T14);
    T13 = T6;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
    T7 = CALL1(&Kwait_forYthreadsVdylan, lock_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
    if (T7 != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
      ENTER_UNWIND_FRAME(T8);
      if (!nlx_setjmp(FRAME_DEST(T8))) {
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:148
        CONGRUENT_CALL_PROLOG(&Kchannel_receiversVchannels, 1);
        T9 = CONGRUENT_CALL1(channel_);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:148
        T10 = CALL2(&Kremove_keyXVKd, T9, receiver_key_);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
        FALL_THROUGH_UNWIND(T10);
      }
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
      CALL1(&KreleaseYthreadsVdylan, lock_);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
      CONTINUE_UNWIND();
      T12 = T10;
    } else {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
      T15.vector_element_[0] = &KJsynchronization_;
      T15.vector_element_[1] = lock_;
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
      CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
      T11 = CONGRUENT_CALL2(&KLtimeout_expiredGYthreadsVdylan, &T15);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
      T16 = KsignalVKdMM0I(T11, &KPempty_vectorVKi);
      T12 = T16;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:147
    T13 = T12;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:140
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:137
  MV_SET_COUNT(0);
  return(T13);
}

D KLchannelGZ32ZconstructorVchannelsMM0I (D class_, D init_args_, D Uunique_channel_messageQ_, D Uunique_channel_receiverQ_, D Uunique_channel_callback_, D Uunique_channel_receivers_, D Uunique_channel_mapper_) {
  D T8;
  D T9;
  D Uunique_channel_messageQF10;
  D T11;
  D T12;
  D Uunique_channel_receiverQF13;
  D T14;
  D T15;
  D Uunique_channel_receiversF16;
  D T17;
  D Uunique_channel_callbackF18;
  D T19;
  D Uunique_channel_receiversF20;
  D Uunique_channel_mapperF21;
  D T22_0;
  D T23;
  D T24;
  D T25;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  T23 = primitive_idQ(Uunique_channel_messageQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  if (T23 != &KPfalseVKi) {
    T8 = K54I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
    T9 = T8;
    Uunique_channel_messageQF10 = T9;
  } else {
    Uunique_channel_messageQF10 = Uunique_channel_messageQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  T24 = primitive_idQ(Uunique_channel_receiverQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  if (T24 != &KPfalseVKi) {
    T11 = K53I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
    T12 = T11;
    Uunique_channel_receiverQF13 = T12;
  } else {
    Uunique_channel_receiverQF13 = Uunique_channel_receiverQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  T25 = primitive_idQ(Uunique_channel_receivers_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  if (T25 != &KPfalseVKi) {
    T14 = K52I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
    T15 = T14;
    Uunique_channel_receiversF16 = T15;
  } else {
    Uunique_channel_receiversF16 = Uunique_channel_receivers_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  T17 = primitive_object_allocate_filled(7,&KLchannelGVchannelsW,6,&KPunboundVKi,0,0,&KPunboundVKi);
  SLOT_VALUE_SETTER(Uunique_channel_messageQF10, T17, 0);
  SLOT_VALUE_SETTER(Uunique_channel_receiverQF13, T17, 1);
  primitive_type_check(Uunique_channel_callback_, &K48);
  Uunique_channel_callbackF18 = Uunique_channel_callback_;
  SLOT_VALUE_SETTER(Uunique_channel_callbackF18, T17, 2);
  T19 = K50I();
  SLOT_VALUE_SETTER(T19, T17, 3);
  primitive_type_check(Uunique_channel_receiversF16, &KLtableGVKd);
  Uunique_channel_receiversF20 = Uunique_channel_receiversF16;
  SLOT_VALUE_SETTER(Uunique_channel_receiversF20, T17, 4);
  primitive_type_check(Uunique_channel_mapper_, &KLfunctionGVKd);
  Uunique_channel_mapperF21 = Uunique_channel_mapper_;
  SLOT_VALUE_SETTER(Uunique_channel_mapperF21, T17, 5);
  APPLY2(&KinitializeVKd, T17, init_args_);
  T22_0 = T17;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:31
  MV_SET_COUNT(1);
  return(T22_0);
}

static D K36I () {
  D T0_0;
  D T1;
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:33
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:33
  T2_0 = KLobject_tableGZ32ZconstructorVKiMM0I(&KLobject_tableGVKd, &KPempty_vectorVKi, &KLobjectGVKd, (D) 41, &Kdefault_grow_sizeVKe, &KPfalseVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:33
  T1 = T2_0;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:33
  T0_0 = T1;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:33
  MV_SET_COUNT(1);
  return(T0_0);
}

static D K44I () {
  D T0_0;
  D T1;
  D T2_0;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:32
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:32
  T2_0 = KLsimple_lock_iGZ32ZconstructorYthreads_internalVdylanMM0I(&KLsimple_lock_iGYthreads_internalVdylan, &KPempty_vectorVKi, &KPfalseVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:32
  T1 = T2_0;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:32
  T0_0 = T1;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:32
  MV_SET_COUNT(1);
  return(T0_0);
}

static D K54I () {
  D T1_0;

  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  MV_SET_COUNT(1);
  return(T1_0);
}

static D K53I () {
  D T1_0;

  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  MV_SET_COUNT(1);
  return(T1_0);
}

static D K52I () {
  D T0_0;
  D T1;
  D T2_0;

  T2_0 = KLobject_tableGZ32ZconstructorVKiMM0I(&KLobject_tableGVKd, &KPempty_vectorVKi, &KLobjectGVKd, (D) 41, &Kdefault_grow_sizeVKe, &KPfalseVKi);
  T1 = T2_0;
  T0_0 = T1;
  MV_SET_COUNT(1);
  return(T0_0);
}

static D K50I () {
  D T0_0;
  D T1;
  D T2_0;

  T2_0 = KLsimple_lock_iGZ32ZconstructorYthreads_internalVdylanMM0I(&KLsimple_lock_iGYthreads_internalVdylan, &KPempty_vectorVKi, &KPfalseVKi);
  T1 = T2_0;
  T0_0 = T1;
  MV_SET_COUNT(1);
  return(T0_0);
}

static D K78I () {
  D T1_0;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:22
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:22
  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:22
  MV_SET_COUNT(1);
  return(T1_0);
}

static D K85I () {
  D T1_0;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:20
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:20
  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:20
  MV_SET_COUNT(1);
  return(T1_0);
}

static D Kanonymous_of_tune_outF90I () {
  D T0;
  CAPTURE_ENVIRONMENT

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:143
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:144
  CONGRUENT_CALL_PROLOG(&Ktune_outVchannels, 2);
  T0 = CONGRUENT_CALL2(CREF(1), CREF(0));
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:143
  return(T0);
}

D Ktune_inVchannelsMM0I (D channel_, D receiver_key_, D args_, D callback_) {
  D T5;
  D T6;
  D T7;
  D lock_;
  D T9;
  D T10;
  D T11;
  D T12;
  D T13;
  D T14;
  D T15;
  D T16;
  D T17;
  D T18;
  D T19;
  D T20;
  D T21;
  D T22;
  _KLsimple_object_vectorGVKd_4 T23 = {&KLsimple_object_vectorGVKdW, (D) 17};
  _KLsimple_object_vectorGVKd_2 T24 = {&KLsimple_object_vectorGVKdW, (D) 9};
  D T25;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:110
  T19 = primitive_copy_vector(args_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:115
  T20 = primitive_instanceQ(receiver_key_,&KLfunctionGVKd);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:115
  if (T20 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:115
    CONGRUENT_CALL_PROLOG(&KEVKd, 2);
    T5 = CONGRUENT_CALL2(callback_, &KPfalseVKi);
    T6 = T5;
  } else {
    T6 = &KPfalseVKi;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:115
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:115
  if (T6 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:116
    T21 = APPLY6(&KmakeVKd, &KLreceiverGVchannels, &KJkey_, receiver_key_, IKJcallback_, receiver_key_, T19);
    T7 = T21;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:118
    T22 = APPLY4(&KmakeVKd, &KLreceiverGVchannels, &KJkey_, receiver_key_, T19);
    T7 = T22;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:115
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:120
  CONGRUENT_CALL_PROLOG(&Kchannel_lockVchannels, 1);
  lock_ = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:121
  T9 = CALL1(&KownedQYthreadsVdylan, lock_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:121
  if (T9 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:124
    T10 = MAKE_CLOSURE_INITD(&Kanonymous_of_tune_inF139, 3, T19, receiver_key_, channel_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:122
    T23.vector_element_[0] = &KJname_;
    T23.vector_element_[1] = &K102;
    T23.vector_element_[2] = &KJfunction_;
    T23.vector_element_[3] = T10;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:122
    CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
    T11 = CONGRUENT_CALL2(&KLthreadGYthreadsVdylan, &T23);
    T18 = T11;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
    T12 = CALL1(&Kwait_forYthreadsVdylan, lock_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
    if (T12 != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
      ENTER_UNWIND_FRAME(T13);
      if (!nlx_setjmp(FRAME_DEST(T13))) {
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:129
        CONGRUENT_CALL_PROLOG(&Kchannel_receiversVchannels, 1);
        T14 = CONGRUENT_CALL1(channel_);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:129
        CALL3(&Kelement_setterVKd, T7, T14, receiver_key_);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:129
        T15 = &KPfalseVKi;
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
        FALL_THROUGH_UNWIND(T15);
      }
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
      CALL1(&KreleaseYthreadsVdylan, lock_);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
      CONTINUE_UNWIND();
      T17 = T15;
    } else {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
      T24.vector_element_[0] = &KJsynchronization_;
      T24.vector_element_[1] = lock_;
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
      CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
      T16 = CONGRUENT_CALL2(&KLtimeout_expiredGYthreadsVdylan, &T24);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
      T25 = KsignalVKdMM0I(T16, &KPempty_vectorVKi);
      T17 = T25;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:128
    T18 = T17;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:121
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:110
  MV_SET_COUNT(0);
  return(T18);
}

static D Kanonymous_of_tune_inF139I () {
  D T0;
  CAPTURE_ENVIRONMENT

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:124
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:125
  T0 = APPLY3(&Ktune_inVchannels, CREF(2), CREF(1), CREF(0));
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:124
  return(T0);
}

D KLreceiverGZ32ZconstructorVchannelsMM0I (D class_, D init_args_, D Uunique_channel_messageQ_, D Uunique_channel_receiverQ_, D Uunique_channel_callback_, D Uunique_receiver_key_, D Uunique_receiver_message_type_) {
  D T8;
  D T9;
  D Uunique_channel_messageQF10;
  D T11;
  D T12;
  D Uunique_channel_receiverQF13;
  D T14;
  D Uunique_receiver_keyF15;
  D T16;
  D Uunique_channel_callbackF17;
  D Uunique_receiver_message_typeF18;
  D T19_0;
  D T20;
  D T21;
  D T22;
  _KLsimple_object_vectorGVKd_1 T23 = {&KLsimple_object_vectorGVKdW, (D) 5};
  D T24;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  T20 = primitive_idQ(Uunique_channel_messageQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  if (T20 != &KPfalseVKi) {
    T8 = K133I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
    T9 = T8;
    Uunique_channel_messageQF10 = T9;
  } else {
    Uunique_channel_messageQF10 = Uunique_channel_messageQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  T21 = primitive_idQ(Uunique_channel_receiverQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  if (T21 != &KPfalseVKi) {
    T11 = K132I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
    T12 = T11;
    Uunique_channel_receiverQF13 = T12;
  } else {
    Uunique_channel_receiverQF13 = Uunique_channel_receiverQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  T22 = primitive_idQ(Uunique_receiver_key_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  if (T22 != &KPfalseVKi) {
    T23.vector_element_[0] = &KJkey_;
    T24 = KerrorVKdMM1I(&K131, &T23);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
    T14 = T24;
    Uunique_receiver_keyF15 = T14;
  } else {
    Uunique_receiver_keyF15 = Uunique_receiver_key_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  T16 = primitive_object_allocate_filled(6,&KLreceiverGVchannelsW,5,&KPunboundVKi,0,0,&KPunboundVKi);
  SLOT_VALUE_SETTER(Uunique_channel_messageQF10, T16, 0);
  SLOT_VALUE_SETTER(Uunique_channel_receiverQF13, T16, 1);
  primitive_type_check(Uunique_channel_callback_, &K48);
  Uunique_channel_callbackF17 = Uunique_channel_callback_;
  SLOT_VALUE_SETTER(Uunique_channel_callbackF17, T16, 2);
  SLOT_VALUE_SETTER(Uunique_receiver_keyF15, T16, 3);
  primitive_type_check(Uunique_receiver_message_type_, &KLtypeGVKd);
  Uunique_receiver_message_typeF18 = Uunique_receiver_message_type_;
  SLOT_VALUE_SETTER(Uunique_receiver_message_typeF18, T16, 4);
  APPLY2(&KinitializeVKd, T16, init_args_);
  T19_0 = T16;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:42
  MV_SET_COUNT(1);
  return(T19_0);
}

static D K133I () {
  D T1_0;

  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  MV_SET_COUNT(1);
  return(T1_0);
}

static D K132I () {
  D T1_0;

  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  MV_SET_COUNT(1);
  return(T1_0);
}

D Koverride_channelVchannelsMM0I (D channel_, D args_, D messageQ_, D receiverQ_, D callback_, D mapper_) {
  D T7;
  D messageQF8;
  D T9;
  D receiverQF10;
  D T11;
  D callbackF12;
  D T13;
  D T14;
  D T15;
  D T16;
  D T17;
  D T18;
  D T19;
  D T20;
  D T21;
  D T22;
  D T23_0;
  D T24;
  D T25;
  D T26;
  _KLsimple_object_vectorGVKd_2 T27 = {&KLsimple_object_vectorGVKdW, (D) 9};
  _KLsimple_object_vectorGVKd_2 T28 = {&KLsimple_object_vectorGVKdW, (D) 9};
  _KLsimple_object_vectorGVKd_2 T29 = {&KLsimple_object_vectorGVKdW, (D) 9};
  _KLsimple_object_vectorGVKd_10 T30 = {&KLsimple_object_vectorGVKdW, (D) 41};

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  T24 = primitive_idQ(messageQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  if (T24 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
    T7 = DunsuppliedYcommon_extensionsVcommon_dylan;
    messageQF8 = T7;
  } else {
    messageQF8 = messageQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  T25 = primitive_idQ(receiverQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  if (T25 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
    T9 = DunsuppliedYcommon_extensionsVcommon_dylan;
    receiverQF10 = T9;
  } else {
    receiverQF10 = receiverQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  T26 = primitive_idQ(callback_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  if (T26 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
    T11 = DunsuppliedYcommon_extensionsVcommon_dylan;
    callbackF12 = T11;
  } else {
    callbackF12 = callback_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:70
  CONGRUENT_CALL_PROLOG(&Kchannel_messageQVchannels, 1);
  T13 = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:70
  T27.vector_element_[0] = messageQF8;
  T27.vector_element_[1] = T13;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:70
  T14 = Kany_suppliedQVchannelsMM0I(&T27);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:71
  CONGRUENT_CALL_PROLOG(&Kchannel_receiverQVchannels, 1);
  T15 = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:71
  T28.vector_element_[0] = receiverQF10;
  T28.vector_element_[1] = T15;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:71
  T16 = Kany_suppliedQVchannelsMM0I(&T28);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:72
  CONGRUENT_CALL_PROLOG(&Kchannel_callbackVchannels, 1);
  T17 = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:72
  T29.vector_element_[0] = callbackF12;
  T29.vector_element_[1] = T17;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:72
  T18 = Kany_suppliedQVchannelsMM0I(&T29);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:73
  if (mapper_ != &KPfalseVKi) {
    T20 = mapper_;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:73
    CONGRUENT_CALL_PROLOG(&Kchannel_mapperVchannels, 1);
    T19 = CONGRUENT_CALL1(channel_);
    T20 = T19;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:73
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:74
  CONGRUENT_CALL_PROLOG(&Kchannel_receiversVchannels, 1);
  T21 = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:69
  T30.vector_element_[0] = IKJmessageQ_;
  T30.vector_element_[1] = T14;
  T30.vector_element_[2] = IKJreceiverQ_;
  T30.vector_element_[3] = T16;
  T30.vector_element_[4] = IKJcallback_;
  T30.vector_element_[5] = T18;
  T30.vector_element_[6] = IKJmapper_;
  T30.vector_element_[7] = T20;
  T30.vector_element_[8] = IKJreceivers_;
  T30.vector_element_[9] = T21;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:69
  CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
  T22 = CONGRUENT_CALL2(&KLchannelGVchannels, &T30);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:75
  T23_0 = T22;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:62
  MV_SET_COUNT(1);
  return(T23_0);
}

D Kany_suppliedQVchannelsMM0I (D values_) {
  D returnPexit_0_;
  D T3;
  DWORD T4T, T4;
  D T5;
  D T6;
  DWORD T7;
  D T8;
  D T9;
  D T10;
  _KLsimple_object_vectorGVKd_1 T11 = {&KLsimple_object_vectorGVKdW, (D) 5};
  D T12;
  DWORD T13;
  _KLsimple_object_vectorGVKd_1 T14 = {&KLsimple_object_vectorGVKdW, (D) 5};
  D T15;
  D T16;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:156
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:157
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
  T6 = SLOT_VALUE_INITD(values_, 0);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
  T7 = primitive_cast_integer_as_raw(T6);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
  T4T = 1;
L0: ;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
    T4 = T4T;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
    T8 = primitive_machine_word_equalQ(T4,T7);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
    if (T8 == &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
      T9 = REPEATED_D_SLOT_VALUE_TAGGED(values_, 1, T4);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:159
      T10 = primitive_idQ(T9,DunsuppliedYcommon_extensionsVcommon_dylan);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:159
      if (T10 == &KPfalseVKi) {
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:160
        T11.vector_element_[0] = T9;
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:160
        T12 = MV_SET_REST_AT(&T11, 0);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:160
        T5 = T12;
        goto L1;
      }
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:159
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
      T13 = primitive_machine_word_add_signal_overflow(T4,4);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
      T4T = T13;
      goto L0;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:158
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:163
  T14.vector_element_[0] = &KPfalseVKi;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:157
  T15 = MV_SET_REST_AT(&T14, 0);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:157
  T5 = T15;
  goto L1;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:157
  T5 = T16;
  L1: ;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:157
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:156
  return(T5);
}

D KbroadcastVchannelsMM0I (D channel_, D message_, D args_) {
  D T4;
  D lock_;
  D T6;
  D T7;
  D T8;
  D T9;
  D T10;
  D T11;
  D T12;
  D T13;
  D T14;
  D T15;
  D T16;
  D T17;
  D T18;
  _KLsimple_object_vectorGVKd_4 T19 = {&KLsimple_object_vectorGVKdW, (D) 17};
  _KLsimple_object_vectorGVKd_2 T20 = {&KLsimple_object_vectorGVKdW, (D) 9};
  D T21;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:81
  T18 = primitive_copy_vector(args_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:82
  T4 = MAKE_CLOSURE_INITD(&Kdo_receiverF164, 3, T18, message_, channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:93
  CONGRUENT_CALL_PROLOG(&Kchannel_lockVchannels, 1);
  lock_ = CONGRUENT_CALL1(channel_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:94
  T6 = CALL1(&KownedQYthreadsVdylan, lock_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:94
  if (T6 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:97
    T7 = MAKE_CLOSURE_INITD(&Kanonymous_of_broadcastF163, 3, T18, message_, channel_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:95
    T19.vector_element_[0] = &KJname_;
    T19.vector_element_[1] = &K162;
    T19.vector_element_[2] = &KJfunction_;
    T19.vector_element_[3] = T7;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:95
    CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
    T8 = CONGRUENT_CALL2(&KLthreadGYthreadsVdylan, &T19);
    T17 = T8;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
    T9 = CALL1(&Kwait_forYthreadsVdylan, lock_);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
    if (T9 != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
      ENTER_UNWIND_FRAME(T10);
      if (!nlx_setjmp(FRAME_DEST(T10))) {
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:102
        CONGRUENT_CALL_PROLOG(&Kchannel_mapperVchannels, 1);
        T11 = CONGRUENT_CALL1(channel_);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:102
        primitive_type_check(T11, &KLfunctionGVKd);
        T12 = T11;
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:102
        CONGRUENT_CALL_PROLOG(&Kchannel_receiversVchannels, 1);
        T13 = CONGRUENT_CALL1(channel_);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:102
        T14 = CALL2(T12, T4, T13);
        // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
        FALL_THROUGH_UNWIND(T14);
      }
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
      CALL1(&KreleaseYthreadsVdylan, lock_);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
      CONTINUE_UNWIND();
      T16 = T14;
    } else {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
      T20.vector_element_[0] = &KJsynchronization_;
      T20.vector_element_[1] = lock_;
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
      CONGRUENT_CALL_PROLOG(&KmakeVKd, 2);
      T15 = CONGRUENT_CALL2(&KLtimeout_expiredGYthreadsVdylan, &T20);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
      T21 = KsignalVKdMM0I(T15, &KPempty_vectorVKi);
      T16 = T21;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:101
    T17 = T16;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:94
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:81
  return(T17);
}

static D Kdo_receiverF164I (D receiver_) {
  D T2;
  D Utmp_;
  D T4;
  D T5;
  D T6;
  D messageQ_;
  D T8;
  D T9;
  D receiverQ_;
  D T11;
  D T12;
  D T13;
  D extra_;
  D T15;
  D T16;
  D T17;
  D T18;
  D T19;
  D T20;
  _KLsimple_object_vectorGVKd_1 T21 = {&KLsimple_object_vectorGVKdW, (D) 5};
  D T22;
  D T23;
  D T24;
  D T25;
  _KLsimple_object_vectorGVKd_3 T26 = {&KLsimple_object_vectorGVKdW, (D) 13};
  D T27;
  _KLsimple_object_vectorGVKd_3 T28 = {&KLsimple_object_vectorGVKdW, (D) 13};
  D T29;
  D T30;
  D T31;
  D T32;
  _KLsimple_object_vectorGVKd_1 T33 = {&KLsimple_object_vectorGVKdW, (D) 5};
  D T34_0;
  _KLsimple_object_vectorGVKd_1 T35 = {&KLsimple_object_vectorGVKdW, (D) 5};
  CAPTURE_ENVIRONMENT

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:82
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:83
  T18 = SLOT_VALUE_INITD(receiver_, 4);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:83
  T19 = primitive_instanceQ(CREF(1),T18);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:83
  if (T19 != &KPfalseVKi) {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
    T20 = SLOT_VALUE_INITD(receiver_, 2);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
    if (T20 != &KPfalseVKi) {
      Utmp_ = T20;
    } else {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
      CONGRUENT_CALL_PROLOG(&Kchannel_callbackVchannels, 1);
      T2 = CONGRUENT_CALL1(CREF(2));
      Utmp_ = T2;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
    if (Utmp_ != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
      primitive_type_check(Utmp_, &KLfunctionGVKd);
      T24 = Utmp_;
      T4 = T24;
    } else {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
      T21.vector_element_[0] = &K167;
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
      T22 = primitive_copy_vector(&T21);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
      T23 = MAKE_CLOSURE_INITD(&Kanonymous_of_broadcastF168, 1, T22);
      T4 = T23;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:85
    T25 = SLOT_VALUE_INITD(receiver_, 0);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:85
    CONGRUENT_CALL_PROLOG(&Kchannel_messageQVchannels, 1);
    T5 = CONGRUENT_CALL1(CREF(2));
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:85
    T26.vector_element_[0] = T25;
    T26.vector_element_[1] = T5;
    T26.vector_element_[2] = &KPtrueVKi;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:85
    T6 = Kany_suppliedQVchannelsMM0I(&T26);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:85
    primitive_type_check(T6, &KLbooleanGVKd);
    messageQ_ = T6;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:86
    T27 = SLOT_VALUE_INITD(receiver_, 1);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:86
    CONGRUENT_CALL_PROLOG(&Kchannel_receiverQVchannels, 1);
    T8 = CONGRUENT_CALL1(CREF(2));
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:86
    T28.vector_element_[0] = T27;
    T28.vector_element_[1] = T8;
    T28.vector_element_[2] = &KPfalseVKi;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:86
    T9 = Kany_suppliedQVchannelsMM0I(&T28);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:86
    primitive_type_check(T9, &KLbooleanGVKd);
    receiverQ_ = T9;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:87
    extra_ = &KPempty_listVKi;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
    if (receiverQ_ != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
      T29 = SLOT_VALUE_INITD(receiver_, 3);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
      T17 = extra_;
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
      T30 = primitive_object_allocate_filled(3,&KLpairGVKdW,2,&KPunboundVKi,0,0,&KPunboundVKi);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
      SLOT_VALUE_SETTER(T29, T30, 0);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
      SLOT_VALUE_SETTER(T17, T30, 1);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
      extra_ = T30;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:88
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
    if (messageQ_ != &KPfalseVKi) {
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
      T16 = extra_;
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
      T31 = primitive_object_allocate_filled(3,&KLpairGVKdW,2,&KPunboundVKi,0,0,&KPunboundVKi);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
      SLOT_VALUE_SETTER(CREF(1), T31, 0);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
      SLOT_VALUE_SETTER(T16, T31, 1);
      // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
      extra_ = T31;
    }
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:89
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:90
    T15 = extra_;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:90
    T33.vector_element_[0] = CREF(0);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:90
    T34_0 = Kconcatenate_asVKdMM4I(&KLlistGVKd, T15, &T33);
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:90
    T32 = T34_0;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:90
    T35.vector_element_[0] = T32;
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:90
    T11 = KapplyVKdI(T4, &T35);
    T13 = T11;
  } else {
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:83
    T12 = &KPfalseVKi;
    MV_SET_ELT(0, &KPfalseVKi);
    MV_SET_COUNT(1);
    T13 = T12;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:83
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:82
  return(T13);
}

static D Kanonymous_of_broadcastF163I () {
  D T0;
  CAPTURE_ENVIRONMENT

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:97
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:98
  T0 = APPLY3(&KbroadcastVchannels, CREF(2), CREF(1), CREF(0));
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:97
  return(T0);
}

static D Kanonymous_of_broadcastF168I (D args_) {
  D T1;
  D T2;
  CAPTURE_ENVIRONMENT

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
  T1 = Kconcatenate_2VKeMM1I(CREF(0), args_);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
  T2 = APPLY1(&KerrorVKd, T1);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:84
  return(T2);
}

D KLchannel_objectGZ32ZconstructorVchannelsMM0I (D class_, D init_args_, D Uunique_channel_messageQ_, D Uunique_channel_receiverQ_, D Uunique_channel_callback_) {
  D T6;
  D T7;
  D Uunique_channel_messageQF8;
  D T9;
  D T10;
  D Uunique_channel_receiverQF11;
  D T12;
  D Uunique_channel_callbackF13;
  D T14_0;
  D T15;
  D T16;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  T15 = primitive_idQ(Uunique_channel_messageQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  if (T15 != &KPfalseVKi) {
    T6 = K180I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
    T7 = T6;
    Uunique_channel_messageQF8 = T7;
  } else {
    Uunique_channel_messageQF8 = Uunique_channel_messageQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  T16 = primitive_idQ(Uunique_channel_receiverQ_,&KPunboundVKi);
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  if (T16 != &KPfalseVKi) {
    T9 = K179I();
    // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
    T10 = T9;
    Uunique_channel_receiverQF11 = T10;
  } else {
    Uunique_channel_receiverQF11 = Uunique_channel_receiverQ_;
  }
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  T12 = primitive_object_allocate_filled(4,&KLchannel_objectGVchannelsW,3,&KPunboundVKi,0,0,&KPunboundVKi);
  SLOT_VALUE_SETTER(Uunique_channel_messageQF8, T12, 0);
  SLOT_VALUE_SETTER(Uunique_channel_receiverQF11, T12, 1);
  primitive_type_check(Uunique_channel_callback_, &K48);
  Uunique_channel_callbackF13 = Uunique_channel_callback_;
  SLOT_VALUE_SETTER(Uunique_channel_callbackF13, T12, 2);
  APPLY2(&KinitializeVKd, T12, init_args_);
  T14_0 = T12;
  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  MV_SET_COUNT(1);
  return(T14_0);
}

static D K180I () {
  D T1_0;

  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  MV_SET_COUNT(1);
  return(T1_0);
}

static D K179I () {
  D T1_0;

  T1_0 = DunsuppliedYcommon_extensionsVcommon_dylan;
  MV_SET_COUNT(1);
  return(T1_0);
}


/* SYSTEM INIT CODE */

void _Init_channels__X_channels_for_system () {
  extern D KPresolve_symbolVKiI(D);
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJmapper_);
    if (T0 != &KJmapper_) {
      primitive_repeated_slot_value_setter(T0, &K151, 1, 6);
      IKJmapper_ = T0;
      primitive_repeated_slot_value_setter(T0, &K149, 1, 3);
      primitive_repeated_slot_value_setter(T0, &K63, 1, 4);
      primitive_repeated_slot_value_setter(T0, &K56, 1, 8);
      primitive_slot_value_setter(T0, &Kchannel_mapperVchannelsHLchannelG, 3);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJreceivers_);
    if (T0 != &KJreceivers_) {
      IKJreceivers_ = T0;
      primitive_repeated_slot_value_setter(T0, &K63, 1, 3);
      primitive_repeated_slot_value_setter(T0, &K56, 1, 6);
      primitive_slot_value_setter(T0, &Kchannel_receiversVchannelsHLchannelG, 3);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJmessageQ_);
    if (T0 != &KJmessageQ_) {
      primitive_repeated_slot_value_setter(T0, &K183, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K182, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K151, 1, 0);
      IKJmessageQ_ = T0;
      primitive_repeated_slot_value_setter(T0, &K149, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K136, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K135, 1, 0);
      primitive_slot_value_setter(T0, &Kchannel_messageQVchannelsHLchannel_objectG, 3);
      primitive_repeated_slot_value_setter(T0, &K63, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K56, 1, 0);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJreceiverQ_);
    if (T0 != &KJreceiverQ_) {
      primitive_repeated_slot_value_setter(T0, &K183, 1, 1);
      primitive_repeated_slot_value_setter(T0, &K182, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K151, 1, 2);
      IKJreceiverQ_ = T0;
      primitive_repeated_slot_value_setter(T0, &K149, 1, 1);
      primitive_repeated_slot_value_setter(T0, &K136, 1, 1);
      primitive_repeated_slot_value_setter(T0, &K135, 1, 2);
      primitive_slot_value_setter(T0, &Kchannel_receiverQVchannelsHLchannel_objectG, 3);
      primitive_repeated_slot_value_setter(T0, &K63, 1, 1);
      primitive_repeated_slot_value_setter(T0, &K56, 1, 2);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJcallback_);
    if (T0 != &KJcallback_) {
      primitive_repeated_slot_value_setter(T0, &K183, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K182, 1, 4);
      primitive_repeated_slot_value_setter(T0, &K151, 1, 4);
      IKJcallback_ = T0;
      primitive_repeated_slot_value_setter(T0, &K149, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K142, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K141, 1, 0);
      primitive_repeated_slot_value_setter(T0, &K136, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K135, 1, 4);
      primitive_slot_value_setter(T0, &Kchannel_callbackVchannelsHLchannel_objectG, 3);
      primitive_repeated_slot_value_setter(T0, &K63, 1, 2);
      primitive_repeated_slot_value_setter(T0, &K56, 1, 4);
    }
  }
  {
    D T0;

    T0 = KPresolve_symbolVKiI(&KJmessage_type_);
    if (T0 != &KJmessage_type_) {
      primitive_repeated_slot_value_setter(T0, &K136, 1, 4);
      primitive_repeated_slot_value_setter(T0, &K135, 1, 8);
      primitive_slot_value_setter(T0, &Kreceiver_message_typeVchannelsHLreceiverG, 3);
    }
  }
{
  D T0;

  // /Users/bruce/Development/dylan/opendylan/sources/lib/channels/channels.dylan:19
  T0 = KPadd_classVKeI(&KLchannel_objectGVchannels);
  goto I0;
}
I0:

  return;
}

/* USER INIT CODE */

void _Init_channels__X_channels_for_user () {
  return;
}


/* eof */
