/*
** Automatically generated from `inst_match.m'
** by the Mercury compiler,
** version 11.07, configured for x86_64-unknown-linux-gnu.
** Do not edit.
**
** The autoconfigured grade settings governing
** the generation of this C file were
**
** TAG_BITS=2
** UNBOXED_FLOAT=no
** HIGHLEVEL_CODE=no
**
** END_OF_C_GRADE_INFO
*/

/*
INIT mercury__check_hlds__inst_match__init
ENDINIT
*/

#define MR_ALLOW_RESET
#include "mercury_imp.h"
#line 140 "../library/io.int2"
#include "io.mh"

#line 28 "check_hlds.inst_match.c"
#line 150 "../library/io.int2"
#include "time.mh"

#line 32 "check_hlds.inst_match.c"
#line 151 "../library/io.int2"
#include "string.mh"

#line 36 "check_hlds.inst_match.c"
#line 31 "../library/bitmap.int2"
#include "bitmap.mh"

#line 40 "check_hlds.inst_match.c"
#line 33 "../library/array.int2"
#include "array.mh"

#line 44 "check_hlds.inst_match.c"
#line 39 "../mdbcomp/mdbcomp.rtti_access.int2"
#include "mdbcomp.rtti_access.mh"

#line 48 "check_hlds.inst_match.c"
#line 49 "check_hlds.inst_match.c"
#include "check_hlds.inst_match.mh"

#line 52 "check_hlds.inst_match.c"
#line 53 "check_hlds.inst_match.c"
#ifndef CHECK_HLDS__INST_MATCH_DECL_GUARD
#define CHECK_HLDS__INST_MATCH_DECL_GUARD

#line 57 "check_hlds.inst_match.c"
#line 58 "check_hlds.inst_match.c"

#endif
#line 61 "check_hlds.inst_match.c"

#ifdef _MSC_VER
#define MR_STATIC_LINKAGE extern
#else
#define MR_STATIC_LINKAGE static
#endif

struct mercury_type_0 {
	MR_Word * f1[2];
};
MR_STATIC_LINKAGE const struct mercury_type_0 mercury_common_0[];

struct mercury_type_1 {
	MR_Word * f1[2];
	MR_Integer f2;
	MR_Word * f3[4];
};
MR_STATIC_LINKAGE const struct mercury_type_1 mercury_common_1[];

struct mercury_type_2 {
	MR_Word * f1[3];
};
MR_STATIC_LINKAGE const struct mercury_type_2 mercury_common_2[];

struct mercury_type_3 {
	MR_Word * f1[2];
	MR_Integer f2;
	MR_Word * f3[5];
};
MR_STATIC_LINKAGE const struct mercury_type_3 mercury_common_3[];

extern const MR_TypeCtorInfo_Struct
	mercury_data_check_hlds__inst_match__type_ctor_info_calculate_sub_0,
	mercury_data_check_hlds__inst_match__type_ctor_info_expansions_0,
	mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0,
	mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_inputs_0,
	mercury_data_check_hlds__inst_match__type_ctor_info_inst_matches_pred_0,
	mercury_data_check_hlds__inst_match__type_ctor_info_inst_names_0,
	mercury_data_check_hlds__inst_match__type_ctor_info_uniqueness_comparison_0;
MR_decl_label8(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0, 5,3,10,11,8,16,17,1)
MR_decl_label5(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0, 3,4,2,6,1)
MR_decl_label3(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0, 7,4,2)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_contains_instname_6_0, 15,3,4,6)
MR_decl_label9(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0, 3,2,4,9,14,15,18,13,8)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_free_2_0, 17,4,2,1)
MR_decl_label6(check_hlds__inst_match__bound_inst_list_is_ground_3_0, 19,4,5,6,2,1)
MR_decl_label6(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0, 20,3,4,5,6,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0, 17,4,2,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0, 18,3,4,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0, 17,4,2,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0, 18,3,4,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0, 17,4,2,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0, 18,3,4,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0, 17,4,2,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0, 18,3,4,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_unique_2_0, 17,4,2,1)
MR_decl_label4(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0, 18,3,4,1)
MR_decl_label10(check_hlds__inst_match__bound_inst_list_matches_binding_5_0, 82,3,7,9,10,11,5,19,18,21)
MR_decl_label5(check_hlds__inst_match__bound_inst_list_matches_binding_5_0, 22,24,15,26,1)
MR_decl_label10(check_hlds__inst_match__bound_inst_list_matches_final_5_0, 82,3,7,9,10,11,5,19,18,21)
MR_decl_label5(check_hlds__inst_match__bound_inst_list_matches_final_5_0, 22,24,15,26,1)
MR_decl_label10(check_hlds__inst_match__bound_inst_list_matches_initial_5_0, 82,3,7,9,10,11,5,19,18,21)
MR_decl_label5(check_hlds__inst_match__bound_inst_list_matches_initial_5_0, 22,24,15,26,1)
MR_decl_label2(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0, 2,11)
MR_decl_label4(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0, 34,4,3,14)
MR_decl_label8(check_hlds__inst_match__compare_uniqueness_3_0, 5,7,79,11,3,23,25,29)
MR_decl_label6(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0, 20,3,4,5,6,1)
MR_decl_label4(check_hlds__inst_match__ground_matches_initial_inst_list_5_0, 37,3,7,1)
MR_decl_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0, 4,6,10,2,63,1)
MR_decl_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0, 4,6,10,2,63,1)
MR_decl_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0, 4,6,10,2,63,1)
MR_decl_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0, 4,6,10,2,63,1)
MR_decl_label2(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0, 3,6)
MR_decl_label2(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0, 3,6)
MR_decl_label9(check_hlds__inst_match__ho_inst_info_matches_binding_4_0, 7,8,9,26,5,15,17,18,1)
MR_decl_label8(check_hlds__inst_match__ho_inst_info_matches_final_5_0, 5,3,10,11,8,16,17,1)
MR_decl_label5(check_hlds__inst_match__inst_contains_inst_var_2_0, 2,4,6,8,47)
MR_decl_label2(check_hlds__inst_match__inst_contains_instname_3_0, 2,3)
MR_decl_label10(check_hlds__inst_match__inst_contains_instname_2_6_0, 86,3,4,5,6,52,7,8,10,15)
MR_decl_label5(check_hlds__inst_match__inst_contains_instname_2_6_0, 13,18,17,20,21)
MR_decl_label3(check_hlds__inst_match__inst_expand_3_0, 12,4,2)
MR_decl_label3(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0, 4,2,6)
MR_decl_label6(check_hlds__inst_match__inst_is_any_2_0, 32,4,8,17,7,1)
MR_decl_label1(check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0, 2)
MR_decl_label6(check_hlds__inst_match__inst_is_bound_2_0, 52,6,10,23,9,1)
MR_decl_label7(check_hlds__inst_match__inst_is_bound_to_functors_3_0, 32,3,4,8,17,7,1)
MR_decl_label9(check_hlds__inst_match__inst_is_clobbered_2_0, 66,3,7,11,15,14,36,18,1)
MR_decl_label10(check_hlds__inst_match__inst_is_complete_for_type_4_0, 60,5,7,8,40,2,15,14,16,21)
MR_decl_label6(check_hlds__inst_match__inst_is_complete_for_type_4_0, 26,27,30,25,20,12)
MR_decl_label6(check_hlds__inst_match__inst_is_free_2_0, 37,3,7,17,6,1)
MR_decl_label5(check_hlds__inst_match__inst_is_ground_2_0, 2,4,9,6,13)
MR_decl_label4(check_hlds__inst_match__inst_is_ground_1_5_0, 3,2,8,5)
MR_decl_label10(check_hlds__inst_match__inst_is_ground_2_5_0, 105,4,7,6,3,17,22,21,27,24)
MR_decl_label7(check_hlds__inst_match__inst_is_ground_2_5_0, 20,33,52,32,36,37,1)
MR_decl_label1(check_hlds__inst_match__inst_is_ground_or_any_2_0, 2)
MR_decl_label10(check_hlds__inst_match__inst_is_ground_or_any_2_4_0, 59,3,4,7,12,11,14,15,30,10)
MR_decl_label3(check_hlds__inst_match__inst_is_ground_or_any_2_4_0, 19,20,1)
MR_decl_label1(check_hlds__inst_match__inst_is_mostly_unique_2_0, 2)
MR_decl_label10(check_hlds__inst_match__inst_is_mostly_unique_2_4_0, 117,5,3,9,61,7,15,20,19,22)
MR_decl_label7(check_hlds__inst_match__inst_is_mostly_unique_2_4_0, 23,18,27,30,28,32,1)
MR_decl_label1(check_hlds__inst_match__inst_is_not_fully_unique_2_0, 2)
MR_decl_label10(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0, 117,5,3,9,61,7,15,20,19,22)
MR_decl_label7(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0, 23,18,27,30,28,32,1)
MR_decl_label1(check_hlds__inst_match__inst_is_not_partly_unique_2_0, 2)
MR_decl_label10(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0, 79,3,5,9,14,13,16,17,36,12)
MR_decl_label4(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0, 21,22,24,1)
MR_decl_label1(check_hlds__inst_match__inst_is_unique_2_0, 2)
MR_decl_label10(check_hlds__inst_match__inst_is_unique_2_4_0, 79,3,5,9,14,13,16,17,36,12)
MR_decl_label4(check_hlds__inst_match__inst_is_unique_2_4_0, 21,22,24,1)
MR_decl_label7(check_hlds__inst_match__inst_list_contains_inst_var_2_0, 17,6,8,10,12,4,2)
MR_decl_label4(check_hlds__inst_match__inst_list_contains_instname_6_0, 15,3,4,6)
MR_decl_label4(check_hlds__inst_match__inst_list_is_free_2_0, 17,4,2,1)
MR_decl_label2(check_hlds__inst_match__inst_list_is_ground_2_0, 3,4)
MR_decl_label10(check_hlds__inst_match__inst_list_is_ground_3_0, 42,3,6,8,7,13,10,14,15,1)
MR_decl_label10(check_hlds__inst_match__inst_list_is_ground_2_5_0, 49,5,3,10,9,15,12,16,17,29)
MR_decl_label2(check_hlds__inst_match__inst_list_is_ground_2_5_0, 8,1)
MR_decl_label5(check_hlds__inst_match__inst_list_is_ground_or_any_2_0, 18,4,5,2,1)
MR_decl_label4(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0, 18,3,4,1)
MR_decl_label6(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0, 31,3,7,8,9,1)
MR_decl_label5(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0, 30,3,7,8,1)
MR_decl_label5(check_hlds__inst_match__inst_list_is_mostly_unique_2_0, 18,4,5,2,1)
MR_decl_label4(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0, 18,3,4,1)
MR_decl_label5(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0, 18,4,5,2,1)
MR_decl_label4(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0, 18,3,4,1)
MR_decl_label5(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0, 18,4,5,2,1)
MR_decl_label4(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0, 18,3,4,1)
MR_decl_label5(check_hlds__inst_match__inst_list_is_unique_2_0, 18,4,5,2,1)
MR_decl_label4(check_hlds__inst_match__inst_list_is_unique_2_4_0, 18,3,4,1)
MR_decl_label4(check_hlds__inst_match__inst_list_matches_binding_5_0, 38,3,8,1)
MR_decl_label4(check_hlds__inst_match__inst_list_matches_final_5_0, 38,3,8,1)
MR_decl_label4(check_hlds__inst_match__inst_list_matches_initial_5_0, 38,3,8,1)
MR_decl_label1(check_hlds__inst_match__inst_matches_binding_4_0, 2)
MR_decl_label5(check_hlds__inst_match__inst_matches_binding_2_5_0, 4,3,6,7,8)
MR_decl_label10(check_hlds__inst_match__inst_matches_binding_3_5_0, 3,5,11,13,10,287,20,19,25,6)
MR_decl_label10(check_hlds__inst_match__inst_matches_binding_3_5_0, 31,33,35,29,41,40,293,50,291,55)
MR_decl_label9(check_hlds__inst_match__inst_matches_binding_3_5_0, 54,60,66,67,59,70,110,284,1)
MR_decl_label1(check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0, 2)
MR_decl_label1(check_hlds__inst_match__inst_matches_final_3_0, 2)
MR_decl_label7(check_hlds__inst_match__inst_matches_final_2_5_0, 4,3,8,7,10,11,12)
MR_decl_label10(check_hlds__inst_match__inst_matches_final_3_5_0, 5,8,3,10,14,16,13,19,18,24)
MR_decl_label10(check_hlds__inst_match__inst_matches_final_3_5_0, 11,434,34,36,38,433,45,47,49,43)
MR_decl_label10(check_hlds__inst_match__inst_matches_final_3_5_0, 52,51,58,60,62,247,41,68,65,64)
MR_decl_label10(check_hlds__inst_match__inst_matches_final_3_5_0, 78,80,77,85,87,89,91,97,82,101)
MR_decl_label3(check_hlds__inst_match__inst_matches_final_3_5_0, 103,428,1)
MR_decl_label1(check_hlds__inst_match__inst_matches_final_typed_4_0, 2)
MR_decl_label1(check_hlds__inst_match__inst_matches_initial_4_0, 2)
MR_decl_label5(check_hlds__inst_match__inst_matches_initial_2_5_0, 4,3,6,7,8)
MR_decl_label10(check_hlds__inst_match__inst_matches_initial_4_5_0, 3,5,446,11,9,16,15,21,6,27)
MR_decl_label10(check_hlds__inst_match__inst_matches_initial_4_5_0, 449,32,34,36,25,451,44,46,42,51)
MR_decl_label10(check_hlds__inst_match__inst_matches_initial_4_5_0, 53,50,56,58,48,61,60,67,69,71)
MR_decl_label10(check_hlds__inst_match__inst_matches_initial_4_5_0, 39,76,75,82,84,85,80,455,91,213)
MR_decl_label3(check_hlds__inst_match__inst_matches_initial_4_5_0, 90,443,1)
MR_decl_label1(check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0, 2)
MR_decl_label3(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0, 3,6,1)
MR_decl_label5(check_hlds__inst_match__inst_matches_initial_sub_7_0, 3,6,9,8,1)
MR_decl_label10(check_hlds__inst_match__inst_name_contains_inst_var_2_0, 2,11,8,14,16,18,20,22,83,75)
MR_decl_label9(check_hlds__inst_match__maybe_any_to_bound_5_0, 6,10,12,13,14,8,17,16,1)
MR_decl_label9(check_hlds__inst_match__mode_contains_inst_var_2_0, 4,2,1,7,9,11,13,16,6)
MR_decl_label3(check_hlds__inst_match__mode_list_contains_inst_var_2_0, 7,4,2)
MR_decl_label7(check_hlds__inst_match__pred_inst_argmodes_matches_5_0, 46,3,8,9,10,12,1)
MR_decl_label4(check_hlds__inst_match__pred_inst_matches_3_0, 2,4,5,1)
MR_decl_label2(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0, 2,11)
MR_decl_label4(check_hlds__inst_match__unique_matches_final_2_0, 3,5,9,2)
MR_decl_label4(check_hlds__inst_match__unique_matches_initial_2_0, 3,5,9,2)
MR_decl_label8(check_hlds__inst_match__update_inst_var_sub_2_5_0, 5,3,10,12,15,8,19,1)
MR_decl_label5(__Unify___check_hlds__inst_match__inst_match_info_0_0, 4,6,10,12,1)
MR_decl_label4(__Unify___check_hlds__inst_match__inst_match_inputs_0_0, 4,6,10,1)
MR_decl_label8(__Compare___check_hlds__inst_match__inst_match_info_0_0, 3,2,5,9,15,19,23,73)
MR_decl_label5(__Compare___check_hlds__inst_match__inst_match_inputs_0_0, 3,2,5,9,29)
MR_def_extern_entry(check_hlds__inst_match__inst_expand_3_0)
MR_def_extern_entry(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0)
MR_decl_static(check_hlds__inst_match__inst_matches_initial_2_5_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_initial_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_initial_sub_7_0)
MR_decl_static(check_hlds__inst_match__inst_matches_final_2_5_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_final_3_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_final_typed_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0)
MR_def_extern_entry(check_hlds__inst_match__unique_matches_initial_2_0)
MR_def_extern_entry(check_hlds__inst_match__unique_matches_final_2_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0)
MR_decl_static(check_hlds__inst_match__pred_inst_argmodes_matches_5_0)
MR_decl_static(check_hlds__inst_match__ho_inst_info_matches_final_5_0)
MR_decl_static(check_hlds__inst_match__ho_inst_info_matches_binding_4_0)
MR_decl_static(check_hlds__inst_match__maybe_any_to_bound_5_0)
MR_decl_static(check_hlds__inst_match__inst_is_ground_1_5_0)
MR_decl_static(check_hlds__inst_match__inst_is_ground_2_5_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_ground_2_5_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_ground_3_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_ground_3_0)
MR_decl_static(check_hlds__inst_match__inst_matches_binding_2_5_0)
MR_decl_static(check_hlds__inst_match__inst_matches_binding_3_5_0)
MR_decl_static(check_hlds__inst_match__inst_list_matches_binding_5_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_matches_binding_5_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_binding_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0)
MR_def_extern_entry(check_hlds__inst_match__pred_inst_matches_3_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_ground_2_0)
MR_decl_static(check_hlds__inst_match__inst_is_ground_or_any_2_4_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_ground_or_any_2_0)
MR_decl_static(check_hlds__inst_match__inst_is_mostly_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_mostly_unique_2_0)
MR_decl_static(check_hlds__inst_match__inst_is_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_unique_2_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_unique_2_0)
MR_decl_static(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_not_partly_unique_2_0)
MR_decl_static(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_not_fully_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_clobbered_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_ground_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_ground_or_any_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_mostly_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_ground_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_free_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_any_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_free_2_0)
MR_def_extern_entry(check_hlds__inst_match__bound_inst_list_is_free_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_bound_2_0)
MR_def_extern_entry(check_hlds__inst_match__inst_is_bound_to_functors_3_0)
MR_decl_static(check_hlds__inst_match__inst_contains_instname_2_6_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_contains_instname_6_0)
MR_decl_static(check_hlds__inst_match__inst_list_contains_instname_6_0)
MR_def_extern_entry(check_hlds__inst_match__inst_contains_instname_3_0)
MR_decl_static(check_hlds__inst_match__inst_name_contains_inst_var_2_0)
MR_decl_static(check_hlds__inst_match__inst_contains_inst_var_2_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0)
MR_decl_static(check_hlds__inst_match__inst_list_contains_inst_var_2_0)
MR_decl_static(check_hlds__inst_match__mode_list_contains_inst_var_2_0)
MR_decl_static(check_hlds__inst_match__mode_contains_inst_var_2_0)
MR_def_extern_entry(check_hlds__inst_match__mode_list_contains_inst_var_3_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0)
MR_def_extern_entry(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0)
MR_decl_static(check_hlds__inst_match__update_inst_var_sub_2_5_0)
MR_decl_static(check_hlds__inst_match__ground_matches_initial_inst_list_5_0)
MR_decl_static(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0)
MR_decl_static(check_hlds__inst_match__compare_uniqueness_3_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0)
MR_decl_static(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0)
MR_decl_static(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_matches_initial_5_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_matches_initial_5_0)
MR_decl_static(check_hlds__inst_match__inst_matches_initial_4_5_0)
MR_decl_static(check_hlds__inst_match__inst_is_complete_for_type_4_0)
MR_decl_static(check_hlds__inst_match__inst_list_matches_final_5_0)
MR_decl_static(check_hlds__inst_match__bound_inst_list_matches_final_5_0)
MR_decl_static(check_hlds__inst_match__inst_matches_final_3_5_0)
MR_decl_static(__Unify___check_hlds__inst_match__calculate_sub_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__calculate_sub_0_0)
MR_decl_static(__Unify___check_hlds__inst_match__expansions_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__expansions_0_0)
MR_decl_static(__Unify___check_hlds__inst_match__inst_match_info_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__inst_match_info_0_0)
MR_decl_static(__Unify___check_hlds__inst_match__inst_match_inputs_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__inst_match_inputs_0_0)
MR_decl_static(__Unify___check_hlds__inst_match__inst_matches_pred_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__inst_matches_pred_0_0)
MR_decl_static(__Unify___check_hlds__inst_match__inst_names_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__inst_names_0_0)
MR_decl_static(__Unify___check_hlds__inst_match__uniqueness_comparison_0_0)
MR_decl_static(__Compare___check_hlds__inst_match__uniqueness_comparison_0_0)
MR_decl_static(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0)
MR_decl_static(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0)
MR_decl_static(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0)
MR_decl_static(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0)
MR_decl_static(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0)
MR_decl_static(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0)
MR_decl_static(check_hlds__inst_match__swap_args__ho9_6_0)
MR_decl_static(check_hlds__inst_match__swap_args__ho10_6_0)
MR_decl_static(check_hlds__inst_match__swap_args__ho11_6_0)
MR_decl_static(check_hlds__inst_match__swap_args__ho12_6_0)
MR_def_extern_entry(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_111_100_101_95_108_105_115_116_95_99_111_110_116_97_105_110_115_95_105_110_115_116_95_118_97_114_95_95_91_50_93_95_48_3_0)
MR_decl_static(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0)
MR_decl_static(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0)

extern const MR_TypeCtorInfo_Struct mercury_data_set_ordlist__type_ctor_info_set_ordlist_1;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_inst_name_0;
extern const MR_TypeCtorInfo_Struct mercury_data_maybe__type_ctor_info_maybe_1;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_type_0;
extern const MR_TypeCtorInfo_Struct mercury_data_term__type_ctor_info_var_1;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_inst_var_type_0;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_type_0;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_inst_var_type_0;
static const struct mercury_type_0 mercury_common_0[5] =
{
{
{
MR_CTOR1_ADDR(set_ordlist, set_ordlist),
MR_CTOR0_ADDR(parse_tree__prog_data, inst_name)
}
},
{
{
MR_CTOR1_ADDR(maybe, maybe),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_type)
}
},
{
{
MR_CTOR1_ADDR(term, var),
MR_CTOR0_ADDR(parse_tree__prog_data, inst_var_type)
}
},
{
{
MR_CTOR1_ADDR(maybe, maybe),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_type)
}
},
{
{
MR_CTOR1_ADDR(term, var),
MR_CTOR0_ADDR(parse_tree__prog_data, inst_var_type)
}
},
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_1;
extern const MR_TypeCtorInfo_Struct mercury_data_hlds__hlds_module__type_ctor_info_module_info_0;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_type_0;
static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__inst_is_complete_for_type_4_0_1;
static const struct mercury_type_1 mercury_common_1[2] =
{
{
{
(MR_Word *) &mercury_data__closure_layout__check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_1,
(MR_Word *) (MR_Integer) 0
},
4,
{
MR_COMMON(0,0),
MR_CTOR0_ADDR(hlds__hlds_module, module_info),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_type)
}
},
{
{
(MR_Word *) &mercury_data__closure_layout__check_hlds__inst_match__inst_is_complete_for_type_4_0_1,
(MR_Word *) (MR_Integer) 0
},
4,
{
MR_COMMON(0,0),
MR_CTOR0_ADDR(hlds__hlds_module, module_info),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_type)
}
},
};

extern const MR_TypeCtorInfo_Struct mercury_data_tree234__type_ctor_info_tree234_2;
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0;
static const struct mercury_type_2 mercury_common_2[1] =
{
{
{
MR_CTOR_ADDR(tree234, tree234, 2),
MR_TAG_COMMON(0,0,2),
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst)
}
},
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_1;
extern const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0;
static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_1;
static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_1;
static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_1;
static const struct mercury_type_3 mercury_common_3[4] =
{
{
{
(MR_Word *) &mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_1,
(MR_Word *) (MR_Integer) 0
},
5,
{
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst),
MR_COMMON(0,3),
MR_COMMON(0,4),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info)
}
},
{
{
(MR_Word *) &mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_1,
(MR_Word *) (MR_Integer) 0
},
5,
{
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst),
MR_COMMON(0,3),
MR_COMMON(0,4),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info)
}
},
{
{
(MR_Word *) &mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_1,
(MR_Word *) (MR_Integer) 0
},
5,
{
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst),
MR_COMMON(0,3),
MR_COMMON(0,4),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info)
}
},
{
{
(MR_Word *) &mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_1,
(MR_Word *) (MR_Integer) 0
},
5,
{
MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst),
MR_COMMON(0,3),
MR_COMMON(0,4),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info),
MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info)
}
},
};

static const MR_EnumFunctorDesc mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_0 = {
	"forward",
	0
};

static const MR_EnumFunctorDesc mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_1 = {
	"reverse",
	1
};

static const MR_EnumFunctorDesc mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_2 = {
	"none",
	2
};

const MR_EnumFunctorDescPtr mercury_data_check_hlds__inst_match__enum_value_ordered_calculate_sub_0[] = {
	&mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_0,
	&mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_1,
	&mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_2
};

const MR_EnumFunctorDescPtr mercury_data_check_hlds__inst_match__enum_name_ordered_calculate_sub_0[] = {
	&mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_0,
	&mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_2,
	&mercury_data_check_hlds__inst_match__enum_functor_desc_calculate_sub_0_1
};

const MR_Integer mercury_data_check_hlds__inst_match__functor_number_map_calculate_sub_0[] = {
	0,
	2,
	1 };
	
const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_calculate_sub_0 = {
	0,
	14,
	-1,
	MR_TYPECTOR_REP_ENUM,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__calculate_sub_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__calculate_sub_0_0)),
	"check_hlds.inst_match",
	"calculate_sub",
	{ (void *)mercury_data_check_hlds__inst_match__enum_name_ordered_calculate_sub_0 },
	{ (void *)mercury_data_check_hlds__inst_match__enum_value_ordered_calculate_sub_0 },
	3,
	4,
	mercury_data_check_hlds__inst_match__functor_number_map_calculate_sub_0
};
extern const MR_TypeCtorInfo_Struct mercury_data_set_tree234__type_ctor_info_set_tree234_1;
extern const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_inputs_0;

static const MR_FA_TypeInfo_Struct1 mercury_data_set_tree234__ti_set_tree234_1check_hlds__inst_match__type_ctor_info_inst_match_inputs_0 = {
	&mercury_data_set_tree234__type_ctor_info_set_tree234_1,
{	(MR_TypeInfo) &mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_inputs_0
}};

const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_expansions_0 = {
	0,
	14,
	-1,
	MR_TYPECTOR_REP_EQUIV_GROUND,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__expansions_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__expansions_0_0)),
	"check_hlds.inst_match",
	"expansions",
	{ 0 },
	{ (void *)&mercury_data_set_tree234__ti_set_tree234_1check_hlds__inst_match__type_ctor_info_inst_match_inputs_0 },
	-1,
	0,
	NULL
};
extern const MR_TypeCtorInfo_Struct mercury_data_hlds__hlds_module__type_ctor_info_module_info_0;

static const MR_FA_TypeInfo_Struct1 mercury_data_term__ti_var_1parse_tree__prog_data__type_ctor_info_inst_var_type_0 = {
	&mercury_data_term__type_ctor_info_var_1,
{	(MR_TypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_inst_var_type_0
}};
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0;

static const MR_FA_TypeInfo_Struct2 mercury_data_tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_inst_var_type_0parse_tree__prog_data__type_ctor_info_mer_inst_0 = {
	&mercury_data_tree234__type_ctor_info_tree234_2,
{	(MR_TypeInfo) &mercury_data_term__ti_var_1parse_tree__prog_data__type_ctor_info_inst_var_type_0,
	(MR_TypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0
}};

static const MR_FA_TypeInfo_Struct1 mercury_data_maybe__ti_maybe_1tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_inst_var_type_0parse_tree__prog_data__type_ctor_info_mer_inst_0 = {
	&mercury_data_maybe__type_ctor_info_maybe_1,
{	(MR_TypeInfo) &mercury_data_tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_inst_var_type_0parse_tree__prog_data__type_ctor_info_mer_inst_0
}};
extern const MR_TypeCtorInfo_Struct mercury_data_bool__type_ctor_info_bool_0;
extern const MR_TypeCtorInfo_Struct mercury_data_hlds__hlds_module__type_ctor_info_module_info_0;
extern const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_calculate_sub_0;
extern const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_uniqueness_comparison_0;
extern const MR_TypeCtorInfo_Struct mercury_data_bool__type_ctor_info_bool_0;

const MR_PseudoTypeInfo mercury_data_check_hlds__inst_match__field_types_inst_match_info_0_0[] = {
	(MR_PseudoTypeInfo) &mercury_data_hlds__hlds_module__type_ctor_info_module_info_0,
	(MR_PseudoTypeInfo) &mercury_data_set_tree234__ti_set_tree234_1check_hlds__inst_match__type_ctor_info_inst_match_inputs_0,
	(MR_PseudoTypeInfo) &mercury_data_maybe__ti_maybe_1tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_inst_var_type_0parse_tree__prog_data__type_ctor_info_mer_inst_0,
	(MR_PseudoTypeInfo) &mercury_data_check_hlds__inst_match__type_ctor_info_calculate_sub_0,
	(MR_PseudoTypeInfo) &mercury_data_check_hlds__inst_match__type_ctor_info_uniqueness_comparison_0,
	(MR_PseudoTypeInfo) &mercury_data_bool__type_ctor_info_bool_0
};

const MR_ConstString mercury_data_check_hlds__inst_match__field_names_inst_match_info_0_0[] = {
	"imi_module_info",
	"imi_expansions",
	"imi_maybe_sub",
	"imi_calculate_sub",
	"imi_uniqueness_comparison",
	"imi_any_matches_any"
};

static const MR_DuFunctorDesc mercury_data_check_hlds__inst_match__du_functor_desc_inst_match_info_0_0 = {
	"inst_match_info",
	6,
	0,
	MR_SECTAG_NONE,
	0,
	-1,
	0,
	(MR_PseudoTypeInfo *) mercury_data_check_hlds__inst_match__field_types_inst_match_info_0_0,
	mercury_data_check_hlds__inst_match__field_names_inst_match_info_0_0,
	NULL
};

const MR_DuFunctorDescPtr mercury_data_check_hlds__inst_match__du_stag_ordered_inst_match_info_0_0[] = {
	&mercury_data_check_hlds__inst_match__du_functor_desc_inst_match_info_0_0

};

const MR_DuPtagLayout mercury_data_check_hlds__inst_match__du_ptag_ordered_inst_match_info_0[] = {
	{ 1, MR_SECTAG_NONE,
	mercury_data_check_hlds__inst_match__du_stag_ordered_inst_match_info_0_0 }

};

const MR_DuFunctorDescPtr mercury_data_check_hlds__inst_match__du_name_ordered_inst_match_info_0[] = {
	&mercury_data_check_hlds__inst_match__du_functor_desc_inst_match_info_0_0
};

const MR_Integer mercury_data_check_hlds__inst_match__functor_number_map_inst_match_info_0[] = {
	0 };
	
const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0 = {
	0,
	14,
	1,
	MR_TYPECTOR_REP_DU,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__inst_match_info_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__inst_match_info_0_0)),
	"check_hlds.inst_match",
	"inst_match_info",
	{ (void *)mercury_data_check_hlds__inst_match__du_name_ordered_inst_match_info_0 },
	{ (void *)mercury_data_check_hlds__inst_match__du_ptag_ordered_inst_match_info_0 },
	1,
	4,
	mercury_data_check_hlds__inst_match__functor_number_map_inst_match_info_0
};

static const MR_FA_TypeInfo_Struct1 mercury_data_maybe__ti_maybe_1parse_tree__prog_data__type_ctor_info_mer_type_0 = {
	&mercury_data_maybe__type_ctor_info_maybe_1,
{	(MR_TypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_mer_type_0
}};

const MR_PseudoTypeInfo mercury_data_check_hlds__inst_match__field_types_inst_match_inputs_0_0[] = {
	(MR_PseudoTypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0,
	(MR_PseudoTypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0,
	(MR_PseudoTypeInfo) &mercury_data_maybe__ti_maybe_1parse_tree__prog_data__type_ctor_info_mer_type_0
};

static const MR_DuFunctorDesc mercury_data_check_hlds__inst_match__du_functor_desc_inst_match_inputs_0_0 = {
	"inst_match_inputs",
	3,
	0,
	MR_SECTAG_NONE,
	0,
	-1,
	0,
	(MR_PseudoTypeInfo *) mercury_data_check_hlds__inst_match__field_types_inst_match_inputs_0_0,
	NULL,
	NULL
};

const MR_DuFunctorDescPtr mercury_data_check_hlds__inst_match__du_stag_ordered_inst_match_inputs_0_0[] = {
	&mercury_data_check_hlds__inst_match__du_functor_desc_inst_match_inputs_0_0

};

const MR_DuPtagLayout mercury_data_check_hlds__inst_match__du_ptag_ordered_inst_match_inputs_0[] = {
	{ 1, MR_SECTAG_NONE,
	mercury_data_check_hlds__inst_match__du_stag_ordered_inst_match_inputs_0_0 }

};

const MR_DuFunctorDescPtr mercury_data_check_hlds__inst_match__du_name_ordered_inst_match_inputs_0[] = {
	&mercury_data_check_hlds__inst_match__du_functor_desc_inst_match_inputs_0_0
};

const MR_Integer mercury_data_check_hlds__inst_match__functor_number_map_inst_match_inputs_0[] = {
	0 };
	
const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_inputs_0 = {
	0,
	14,
	1,
	MR_TYPECTOR_REP_DU,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__inst_match_inputs_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__inst_match_inputs_0_0)),
	"check_hlds.inst_match",
	"inst_match_inputs",
	{ (void *)mercury_data_check_hlds__inst_match__du_name_ordered_inst_match_inputs_0 },
	{ (void *)mercury_data_check_hlds__inst_match__du_ptag_ordered_inst_match_inputs_0 },
	1,
	4,
	mercury_data_check_hlds__inst_match__functor_number_map_inst_match_inputs_0
};
extern const MR_TypeCtorInfo_Struct mercury_data_builtin__type_ctor_info_pred_0;
extern const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0;

static const MR_VA_TypeInfo_Struct5 mercury_data___vti_pred_5parse_tree__prog_data__type_ctor_info_mer_inst_0parse_tree__prog_data__type_ctor_info_mer_inst_0maybe__ti_maybe_1parse_tree__prog_data__type_ctor_info_mer_type_0check_hlds__inst_match__type_ctor_info_inst_match_info_0check_hlds__inst_match__type_ctor_info_inst_match_info_0 = {
	&mercury_data_builtin__type_ctor_info_pred_0,
	5,
{	(MR_TypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0,
	(MR_TypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_mer_inst_0,
	(MR_TypeInfo) &mercury_data_maybe__ti_maybe_1parse_tree__prog_data__type_ctor_info_mer_type_0,
	(MR_TypeInfo) &mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0,
	(MR_TypeInfo) &mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0
}};

const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_matches_pred_0 = {
	0,
	14,
	-1,
	MR_TYPECTOR_REP_EQUIV_GROUND,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__inst_matches_pred_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__inst_matches_pred_0_0)),
	"check_hlds.inst_match",
	"inst_matches_pred",
	{ 0 },
	{ (void *)&mercury_data___vti_pred_5parse_tree__prog_data__type_ctor_info_mer_inst_0parse_tree__prog_data__type_ctor_info_mer_inst_0maybe__ti_maybe_1parse_tree__prog_data__type_ctor_info_mer_type_0check_hlds__inst_match__type_ctor_info_inst_match_info_0check_hlds__inst_match__type_ctor_info_inst_match_info_0 },
	-1,
	0,
	NULL
};

static const MR_FA_TypeInfo_Struct1 mercury_data_set_ordlist__ti_set_ordlist_1parse_tree__prog_data__type_ctor_info_inst_name_0 = {
	&mercury_data_set_ordlist__type_ctor_info_set_ordlist_1,
{	(MR_TypeInfo) &mercury_data_parse_tree__prog_data__type_ctor_info_inst_name_0
}};

const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_inst_names_0 = {
	0,
	14,
	-1,
	MR_TYPECTOR_REP_EQUIV_GROUND,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__inst_names_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__inst_names_0_0)),
	"check_hlds.inst_match",
	"inst_names",
	{ 0 },
	{ (void *)&mercury_data_set_ordlist__ti_set_ordlist_1parse_tree__prog_data__type_ctor_info_inst_name_0 },
	-1,
	0,
	NULL
};

static const MR_EnumFunctorDesc mercury_data_check_hlds__inst_match__enum_functor_desc_uniqueness_comparison_0_0 = {
	"match",
	0
};

static const MR_EnumFunctorDesc mercury_data_check_hlds__inst_match__enum_functor_desc_uniqueness_comparison_0_1 = {
	"instantiated",
	1
};

const MR_EnumFunctorDescPtr mercury_data_check_hlds__inst_match__enum_value_ordered_uniqueness_comparison_0[] = {
	&mercury_data_check_hlds__inst_match__enum_functor_desc_uniqueness_comparison_0_0,
	&mercury_data_check_hlds__inst_match__enum_functor_desc_uniqueness_comparison_0_1
};

const MR_EnumFunctorDescPtr mercury_data_check_hlds__inst_match__enum_name_ordered_uniqueness_comparison_0[] = {
	&mercury_data_check_hlds__inst_match__enum_functor_desc_uniqueness_comparison_0_1,
	&mercury_data_check_hlds__inst_match__enum_functor_desc_uniqueness_comparison_0_0
};

const MR_Integer mercury_data_check_hlds__inst_match__functor_number_map_uniqueness_comparison_0[] = {
	1,
	0 };
	
const MR_TypeCtorInfo_Struct mercury_data_check_hlds__inst_match__type_ctor_info_uniqueness_comparison_0 = {
	0,
	14,
	-1,
	MR_TYPECTOR_REP_ENUM,
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Unify___check_hlds__inst_match__uniqueness_comparison_0_0)),
	MR_MAYBE_STATIC_CODE(MR_ENTRY_AP(__Compare___check_hlds__inst_match__uniqueness_comparison_0_0)),
	"check_hlds.inst_match",
	"uniqueness_comparison",
	{ (void *)mercury_data_check_hlds__inst_match__enum_name_ordered_uniqueness_comparison_0 },
	{ (void *)mercury_data_check_hlds__inst_match__enum_value_ordered_uniqueness_comparison_0 },
	2,
	4,
	mercury_data_check_hlds__inst_match__functor_number_map_uniqueness_comparison_0
};


static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_1 = {
{
MR_PREDICATE,
"check_hlds.inst_match",
"check_hlds.inst_match",
"update_inst_var_sub_2",
5,
0
},
"check_hlds.inst_match",
"inst_match.m",
523,
"11"
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_1 = {
{
MR_PREDICATE,
"check_hlds.inst_match",
"check_hlds.inst_match",
"update_inst_var_sub_2",
5,
0
},
"check_hlds.inst_match",
"inst_match.m",
523,
"11"
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_1 = {
{
MR_PREDICATE,
"check_hlds.inst_match",
"check_hlds.inst_match",
"update_inst_var_sub_2",
5,
0
},
"check_hlds.inst_match",
"inst_match.m",
523,
"11"
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_1 = {
{
MR_PREDICATE,
"check_hlds.inst_match",
"check_hlds.inst_match",
"update_inst_var_sub_2",
5,
0
},
"check_hlds.inst_match",
"inst_match.m",
523,
"11"
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__inst_is_complete_for_type_4_0_1 = {
{
MR_PREDICATE,
"check_hlds.inst_match",
"check_hlds.inst_match",
"inst_is_complete_for_type",
4,
0
},
"check_hlds.inst_match",
"inst_match.m",
737,
"18"
};

static const MR_UserClosureId
mercury_data__closure_layout__check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_1 = {
{
MR_PREDICATE,
"check_hlds.inst_match",
"check_hlds.inst_match",
"inst_is_complete_for_type",
4,
0
},
"check_hlds.inst_match",
"inst_match.m",
737,
"18"
};


MR_decl_entry(check_hlds__mode_util__inst_lookup_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module0)
	MR_init_entry1(check_hlds__inst_match__inst_expand_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_expand_3_0);
	MR_init_label3(check_hlds__inst_match__inst_expand_3_0,12,4,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_expand'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_expand_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_expand_3_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_expand_3_0_i2);
	}
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_expand_3_0_i4);
MR_def_label(check_hlds__inst_match__inst_expand_3_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_expand_3_0_i12);
	}
MR_def_label(check_hlds__inst_match__inst_expand_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_r2;
	MR_decr_sp_and_return(2);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module1)
	MR_init_entry1(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0);
	MR_init_label3(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0,4,2,6)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_expand_and_remove_constrained_inst_vars'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0_i2);
	}
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0_i4);
MR_def_label(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_decr_sp(2);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_expand_3_0);
	}
MR_def_label(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0_i6);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_expand_3_0);
MR_def_label(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_r2;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(fn__set_tree234__is_member_2_0);
MR_decl_entry(set_tree234__insert_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module2)
	MR_init_entry1(check_hlds__inst_match__inst_matches_initial_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_initial_2_5_0);
	MR_init_label5(check_hlds__inst_match__inst_matches_initial_2_5_0,4,3,6,7,8)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_initial_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_matches_initial_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 3);
	MR_tfield(0, MR_tempr1, 0) = MR_r1;
	MR_tfield(0, MR_tempr1, 1) = MR_r2;
	MR_tempr3 = MR_r3;
	MR_tfield(0, MR_tempr1, 2) = MR_tempr3;
	MR_tempr4 = MR_r4;
	MR_tempr2 = MR_tfield(0, MR_tempr4, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_tempr3;
	MR_sv(4) = MR_tempr1;
	MR_sv(5) = MR_tempr2;
	MR_sv(6) = MR_tempr4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_tempr2;
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(fn__set_tree234__is_member_2_0,
		check_hlds__inst_match__inst_matches_initial_2_5_0_i4);
MR_def_label(check_hlds__inst_match__inst_matches_initial_2_5_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_2_5_0_i3);
	}
	MR_r2 = MR_sv(6);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_tfield(0, MR_sv(6), 0);
	MR_r2 = MR_sv(1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_expand_3_0,
		check_hlds__inst_match__inst_matches_initial_2_5_0_i6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_2_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_r1 = MR_tfield(0, MR_sv(6), 0);
	MR_r2 = MR_sv(2);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_expand_3_0,
		check_hlds__inst_match__inst_matches_initial_2_5_0_i7);
MR_def_label(check_hlds__inst_match__inst_matches_initial_2_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(5);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_matches_initial_2_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_matches_initial_2_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tempr2 = MR_sv(6);
	MR_tfield(0, MR_tempr1, 0) = MR_tfield(0, MR_tempr2, 0);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(fn__set_tree234__init_0_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module3)
	MR_init_entry1(check_hlds__inst_match__inst_matches_initial_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_initial_4_0);
	MR_init_label1(check_hlds__inst_match__inst_matches_initial_4_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_initial'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_initial_4_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_initial_4_0_i2);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(require__unexpected_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module4)
	MR_init_entry1(check_hlds__inst_match__inst_matches_initial_sub_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_initial_sub_7_0);
	MR_init_label5(check_hlds__inst_match__inst_matches_initial_sub_7_0,3,6,9,8,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_initial_sub'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_initial_sub_7_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	MR_tag_alloc_heap(MR_sv(5), 1, (MR_Integer) 1);
	MR_tfield(1, MR_sv(5), 0) = MR_r5;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_initial_sub_7_0_i3);
MR_def_label(check_hlds__inst_match__inst_matches_initial_sub_7_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = MR_sv(5);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_initial_2_5_0,
		check_hlds__inst_match__inst_matches_initial_sub_7_0_i6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_sub_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_sub_7_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(0, MR_r2, 2);
	if (MR_LTAGS_TEST(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_sub_7_0_i9);
	}
	MR_r2 = MR_tfield(0, MR_r2, 0);
	MR_r3 = MR_tfield(1, MR_tempr1, 0);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__inst_matches_initial_sub_7_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_matches_initial_sub\'/7", 60);
	MR_r3 = (MR_Word) MR_string_const("missing inst_var_sub", 20);
	}
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_matches_initial_sub_7_0_i8);
MR_def_label(check_hlds__inst_match__inst_matches_initial_sub_7_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_sub_7_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Unify___parse_tree__prog_data__mer_inst_0_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module5)
	MR_init_entry1(check_hlds__inst_match__inst_matches_final_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_final_2_5_0);
	MR_init_label7(check_hlds__inst_match__inst_matches_final_2_5_0,4,3,8,7,10,11,12)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_final_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_matches_final_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 3);
	MR_tfield(0, MR_tempr1, 0) = MR_r1;
	MR_tfield(0, MR_tempr1, 1) = MR_r2;
	MR_tempr3 = MR_r3;
	MR_tfield(0, MR_tempr1, 2) = MR_tempr3;
	MR_tempr4 = MR_r4;
	MR_tempr2 = MR_tfield(0, MR_tempr4, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_tempr3;
	MR_sv(4) = MR_tempr1;
	MR_sv(5) = MR_tempr2;
	MR_sv(6) = MR_tempr4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_tempr2;
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(fn__set_tree234__is_member_2_0,
		check_hlds__inst_match__inst_matches_final_2_5_0_i4);
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_2_5_0_i3);
	}
	MR_r2 = MR_sv(6);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_np_call_localret_ent(__Unify___parse_tree__prog_data__mer_inst_0_0,
		check_hlds__inst_match__inst_matches_final_2_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_2_5_0_i7);
	}
	MR_r2 = MR_sv(6);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_tfield(0, MR_sv(6), 0);
	MR_r2 = MR_sv(1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_expand_3_0,
		check_hlds__inst_match__inst_matches_final_2_5_0_i10);
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_r1 = MR_tfield(0, MR_sv(6), 0);
	MR_r2 = MR_sv(2);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_expand_3_0,
		check_hlds__inst_match__inst_matches_final_2_5_0_i11);
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(5);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_matches_final_2_5_0_i12);
MR_def_label(check_hlds__inst_match__inst_matches_final_2_5_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tempr2 = MR_sv(6);
	MR_tfield(0, MR_tempr1, 0) = MR_tfield(0, MR_tempr2, 0);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module6)
	MR_init_entry1(check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0);
	MR_init_label1(check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_initial_no_implied_modes'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0_i2);
MR_def_label(check_hlds__inst_match__inst_matches_initial_no_implied_modes_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module7)
	MR_init_entry1(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0);
	MR_init_label3(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0,3,6,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_initial_no_implied_modes_sub'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	MR_tag_alloc_heap(MR_sv(5), 1, (MR_Integer) 1);
	MR_tfield(1, MR_sv(5), 0) = MR_r5;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0_i3);
MR_def_label(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = MR_sv(5);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_final_2_5_0,
		check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0_i6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(0, MR_r2, 2);
	if (MR_LTAGS_TEST(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0_i1);
	}
	MR_r2 = MR_tfield(0, MR_r2, 0);
	MR_r3 = MR_tfield(1, MR_tempr1, 0);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__inst_matches_initial_no_implied_modes_sub_7_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module8)
	MR_init_entry1(check_hlds__inst_match__inst_matches_final_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_final_3_0);
	MR_init_label1(check_hlds__inst_match__inst_matches_final_3_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_final'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_final_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_final_3_0_i2);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(3);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = (MR_Word) MR_tbmkword(0, 0);
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module9)
	MR_init_entry1(check_hlds__inst_match__inst_matches_final_typed_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_final_typed_4_0);
	MR_init_label1(check_hlds__inst_match__inst_matches_final_typed_4_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_final_typed'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_final_typed_4_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_final_typed_4_0_i2);
MR_def_label(check_hlds__inst_match__inst_matches_final_typed_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module10)
	MR_init_entry1(check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0);
	MR_init_label1(check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_at_least_as_instantiated'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_at_least_as_instantiated_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 1;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 0;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module11)
	MR_init_entry1(check_hlds__inst_match__unique_matches_initial_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__unique_matches_initial_2_0);
	MR_init_label4(check_hlds__inst_match__unique_matches_initial_2_0,3,5,9,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'unique_matches_initial'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__unique_matches_initial_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i3);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 3);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_initial_2_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i5);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 4);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_initial_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i9);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_initial_2_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_initial_2_0_i2);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_initial_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module12)
	MR_init_entry1(check_hlds__inst_match__unique_matches_final_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__unique_matches_final_2_0);
	MR_init_label4(check_hlds__inst_match__unique_matches_final_2_0,3,5,9,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'unique_matches_final'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__unique_matches_final_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i3);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 3);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_final_2_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i5);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 4);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_final_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i9);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_final_2_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	if (MR_INT_EQ(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__unique_matches_final_2_0_i2);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__unique_matches_final_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(check_hlds__type_util__cons_id_arg_types_4_0);
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_bound_inst_0;
MR_decl_entry(list__member_2_1);
MR_decl_entry(parse_tree__prog_data__equivalent_cons_ids_2_0);
MR_declare_entry(MR_do_redo);
MR_decl_entry(list__map_3_5);

MR_BEGIN_MODULE(check_hlds__inst_match_module13)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0);
	MR_init_label9(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,3,2,4,9,14,15,18,13,8)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_complete_for_type'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(16);
	MR_sv(16) = (MR_Word) MR_succip;
	MR_sv(7) = (MR_Word) MR_redoip_slot(MR_maxfr);
	MR_sv(8) = (MR_Word) MR_redofr_slot(MR_maxfr);
	MR_save_maxfr(MR_sv(9));
	MR_redofr_slot_word(MR_maxfr) = (MR_Word) MR_curfr;
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i2);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_sv(4) = MR_tempr1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__cons_id_arg_types_4_0,
		check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_restore_maxfr(MR_sv(9));
	MR_redoip_slot_word(MR_maxfr) = MR_sv(7);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(8);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_maxfr) = MR_sv(7);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(8);
	MR_succip_word = MR_sv(16);
	MR_decr_sp(16);
	MR_r1 = MR_FALSE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(10) = (MR_Word) MR_redoip_slot(MR_maxfr);
	MR_sv(11) = (MR_Word) MR_redofr_slot(MR_maxfr);
	MR_save_maxfr(MR_sv(12));
	MR_redofr_slot_word(MR_maxfr) = (MR_Word) MR_curfr;
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i8);
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__type_util__cons_id_arg_types_4_0,
		check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i9);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(13) = (MR_Word) MR_redoip_slot(MR_maxfr);
	MR_sv(14) = (MR_Word) MR_redofr_slot(MR_maxfr);
	MR_save_maxfr(MR_sv(15));
	MR_redofr_slot_word(MR_maxfr) = (MR_Word) MR_curfr;
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i13);
	MR_sv(4) = MR_r1;
	MR_sv(5) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, bound_inst);
	MR_r2 = MR_sv(3);
	MR_np_call_localret_ent(list__member_2_1,
		check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i14);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(6) = MR_tfield(0, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_r1, 0);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(parse_tree__prog_data__equivalent_cons_ids_2_0,
		check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i15);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO(MR_ENTRY(MR_do_redo));
	}
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 5);
	MR_r3 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = (MR_Word) MR_COMMON(1,0);
	MR_tfield(0, MR_tempr1, 1) = (MR_Word) MR_ENTRY_AP(check_hlds__inst_match__inst_is_complete_for_type_4_0);
	MR_tfield(0, MR_tempr1, 2) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 3) = MR_sv(1);
	MR_tfield(0, MR_tempr1, 4) = MR_sv(2);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_type);
	MR_r4 = MR_sv(6);
	MR_r5 = MR_sv(5);
	}
	MR_np_call_localret_ent(list__map_3_5,
		check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0_i18);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO(MR_ENTRY(MR_do_redo));
	}
	MR_restore_maxfr(MR_sv(15));
	MR_redoip_slot_word(MR_maxfr) = MR_sv(13);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(14);
	MR_GOTO(MR_ENTRY(MR_do_redo));
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_maxfr) = MR_sv(13);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(14);
	MR_restore_maxfr(MR_sv(12));
	MR_redoip_slot_word(MR_maxfr) = MR_sv(10);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(11);
	MR_succip_word = MR_sv(16);
	MR_decr_sp(16);
	MR_r1 = MR_FALSE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_maxfr) = MR_sv(10);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(11);
	MR_succip_word = MR_sv(16);
	MR_decr_sp(16);
	MR_r1 = MR_TRUE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(check_hlds__mode_util__mode_get_insts_4_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module14)
	MR_init_entry1(check_hlds__inst_match__pred_inst_argmodes_matches_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__pred_inst_argmodes_matches_5_0);
	MR_init_label7(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,46,3,8,9,10,12,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'pred_inst_argmodes_matches'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__pred_inst_argmodes_matches_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(8);
	MR_sv(8) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,46)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i1);
	}
	if (MR_LTAGS_TESTR(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i1);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(8);
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r4;
	MR_sv(1) = MR_tempr2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_sv(3) = MR_tfield(1, MR_r2, 0);
	MR_sv(4) = MR_tfield(1, MR_r2, 1);
	MR_tempr3 = MR_r3;
	MR_sv(5) = MR_tfield(1, MR_tempr3, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr3, 1);
	MR_sv(7) = MR_tfield(0, MR_tempr2, 0);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(7);
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__mode_util__mode_get_insts_4_0,
		check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i8);
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_sv(3);
	MR_sv(3) = MR_r1;
	MR_tempr2 = MR_sv(7);
	MR_sv(7) = MR_r2;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__mode_util__mode_get_insts_4_0,
		check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i9);
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r2 = MR_sv(3);
	MR_r3 = MR_sv(5);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,
		check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i10);
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i1);
	}
	MR_r1 = MR_sv(7);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(5);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_final_2_5_0,
		check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i12);
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(6);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(8);
	MR_GOTO_LAB(check_hlds__inst_match__pred_inst_argmodes_matches_5_0_i46);
	}
MR_def_label(check_hlds__inst_match__pred_inst_argmodes_matches_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(8);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(check_hlds__inst_util__ho_inst_info_is_nonstandard_func_mode_2_0);
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_mer_mode_0;
MR_decl_entry(fn__list__length_1_0);
MR_decl_entry(fn__check_hlds__inst_util__pred_inst_info_standard_func_mode_1_0);
MR_decl_entry(check_hlds__type_util__maybe_get_higher_order_arg_types_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module15)
	MR_init_entry1(check_hlds__inst_match__ho_inst_info_matches_final_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__ho_inst_info_matches_final_5_0);
	MR_init_label8(check_hlds__inst_match__ho_inst_info_matches_final_5_0,5,3,10,11,8,16,17,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'ho_inst_info_matches_final'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__ho_inst_info_matches_final_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i3);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr2 = MR_r4;
	MR_sv(2) = MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr2, 0);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_util__ho_inst_info_is_nonstandard_func_mode_2_0,
		check_hlds__inst_match__ho_inst_info_matches_final_5_0_i5);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_r1) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i1);
	}
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i8);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	if (MR_INT_NE(MR_tempr2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i1);
	}
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_r4;
	MR_sv(3) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_tfield(0, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ho_inst_info_matches_final_5_0_i10);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_call_localret_ent(fn__check_hlds__inst_util__pred_inst_info_standard_func_mode_1_0,
		check_hlds__inst_match__ho_inst_info_matches_final_5_0_i11);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_tfield(0, MR_r1, 0);
	MR_tempr3 = MR_sv(3);
	MR_tempr2 = MR_tfield(0, MR_tempr3, 0);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i1);
	}
	MR_tempr1 = MR_tfield(0, MR_r1, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr3, 2);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i1);
	}
	MR_tempr1 = MR_tempr3;
	MR_sv(3) = MR_tfield(0, MR_r1, 1);
	MR_sv(4) = MR_tfield(0, MR_tempr1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(3);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ho_inst_info_matches_final_5_0_i16);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr1 = MR_tfield(1, MR_r1, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	MR_tempr3 = MR_tfield(1, MR_r2, 0);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 0);
	if ((MR_tempr2 != MR_tempr4)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i1);
	}
	MR_tempr2 = MR_tfield(0, MR_tempr1, 2);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 2);
	if ((MR_tempr2 != MR_tempr4)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_final_5_0_i1);
	}
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_r4;
	MR_sv(3) = MR_tfield(0, MR_tempr1, 1);
	MR_sv(4) = MR_tfield(0, MR_tempr3, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(3);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ho_inst_info_matches_final_5_0_i16);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_higher_order_arg_types_3_0,
		check_hlds__inst_match__ho_inst_info_matches_final_5_0_i17);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__pred_inst_argmodes_matches_5_0);
	}
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_final_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module16)
	MR_init_entry1(check_hlds__inst_match__ho_inst_info_matches_binding_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__ho_inst_info_matches_binding_4_0);
	MR_init_label9(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,7,8,9,26,5,15,17,18,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'ho_inst_info_matches_binding'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__ho_inst_info_matches_binding_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i26);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i5);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	if (MR_INT_NE(MR_tempr2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i1);
	}
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_r4;
	MR_sv(4) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_tfield(0, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i7);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_call_localret_ent(fn__check_hlds__inst_util__pred_inst_info_standard_func_mode_1_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i8);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(3) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i9);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr3 = MR_sv(3);
	MR_tempr1 = MR_tfield(0, MR_tempr3, 0);
	MR_tempr4 = MR_sv(4);
	MR_tempr2 = MR_tfield(0, MR_tempr4, 0);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i1);
	}
	MR_tempr1 = MR_tfield(0, MR_tempr3, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr4, 2);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i1);
	}
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_tfield(0, MR_tempr1, 0) = MR_sv(2);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_sv(2) = MR_tempr1;
	MR_sv(3) = MR_tfield(0, MR_sv(3), 1);
	MR_sv(4) = MR_tfield(0, MR_sv(4), 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(3);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i17);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,26)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_r4;
	MR_sv(3) = MR_tfield(1, MR_r1, 0);
	MR_sv(4) = MR_tfield(1, MR_r2, 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i15);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr3 = MR_sv(3);
	MR_tempr1 = MR_tfield(0, MR_tempr3, 0);
	MR_tempr4 = MR_sv(4);
	MR_tempr2 = MR_tfield(0, MR_tempr4, 0);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i1);
	}
	MR_tempr1 = MR_tfield(0, MR_tempr3, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr4, 2);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i1);
	}
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_tfield(0, MR_tempr1, 0) = MR_sv(2);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_sv(2) = MR_tempr1;
	MR_sv(3) = MR_tfield(0, MR_sv(3), 1);
	MR_sv(4) = MR_tfield(0, MR_sv(4), 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(3);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i17);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_higher_order_arg_types_3_0,
		check_hlds__inst_match__ho_inst_info_matches_binding_4_0_i18);
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__pred_inst_argmodes_matches_5_0);
	}
MR_def_label(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(check_hlds__type_util__is_solver_type_2_0);
MR_decl_entry(check_hlds__type_util__type_constructors_3_0);
MR_decl_entry(parse_tree__prog_type__type_to_ctor_det_2_0);
MR_decl_entry(check_hlds__mode_util__constructors_to_bound_any_insts_5_0);
MR_decl_entry(list__sort_and_remove_dups_2_0);
MR_decl_entry(fn__check_hlds__type_util__classify_type_2_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module17)
	MR_init_entry1(check_hlds__inst_match__maybe_any_to_bound_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__maybe_any_to_bound_5_0);
	MR_init_label9(check_hlds__inst_match__maybe_any_to_bound_5_0,6,10,12,13,14,8,17,16,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'maybe_any_to_bound'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__maybe_any_to_bound_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
	if (MR_LTAGS_TESTR(MR_r4,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(1, MR_r1, 0);
	MR_sv(1) = MR_tempr1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__is_solver_type_2_0,
		check_hlds__inst_match__maybe_any_to_bound_5_0_i6);
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_r1) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_tempr2 = MR_sv(3);
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__type_constructors_3_0,
		check_hlds__inst_match__maybe_any_to_bound_5_0_i10);
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i8);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = MR_tempr1;
	}
	MR_np_call_localret_ent(parse_tree__prog_type__type_to_ctor_det_2_0,
		check_hlds__inst_match__maybe_any_to_bound_5_0_i12);
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(1);
	}
	MR_np_call_localret_ent(check_hlds__mode_util__constructors_to_bound_any_insts_5_0,
		check_hlds__inst_match__maybe_any_to_bound_5_0_i13);
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, bound_inst);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(list__sort_and_remove_dups_2_0,
		check_hlds__inst_match__maybe_any_to_bound_5_0_i14);
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_tag_alloc_heap(MR_r2, 3, (MR_Integer) 3);
	MR_tfield(3, MR_r2, 0) = (MR_Integer) 0;
	MR_tfield(3, MR_r2, 1) = MR_sv(3);
	MR_tfield(3, MR_r2, 2) = MR_r1;
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_tempr2 = MR_sv(3);
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(fn__check_hlds__type_util__classify_type_2_0,
		check_hlds__inst_match__maybe_any_to_bound_5_0_i17);
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_r1,0,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i16);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r1, 1);
	if (MR_INT_EQ(MR_tempr1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	if (MR_INT_EQ(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__maybe_any_to_bound_5_0_i1);
	}
	}
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_tag_alloc_heap(MR_r2, 3, (MR_Integer) 3);
	MR_tfield(3, MR_r2, 0) = (MR_Integer) 1;
	MR_tfield(3, MR_r2, 1) = MR_sv(3);
	MR_tfield(3, MR_r2, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__maybe_any_to_bound_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(set_tree234__contains_2_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module18)
	MR_init_entry1(check_hlds__inst_match__inst_is_ground_1_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_ground_1_5_0);
	MR_init_label4(check_hlds__inst_match__inst_is_ground_1_5_0,3,2,8,5)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_ground_1'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_ground_1_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_sv(4) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(set_tree234__contains_2_0,
		check_hlds__inst_match__inst_is_ground_1_5_0_i3);
MR_def_label(check_hlds__inst_match__inst_is_ground_1_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_1_5_0_i2);
	}
	MR_r2 = MR_sv(4);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_is_ground_1_5_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TEST(MR_sv(3),2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_1_5_0_i5);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_sv(4);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_is_ground_1_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_is_ground_1_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_ground_2_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_1_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_sv(4);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_ground_2_5_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module19)
	MR_init_entry1(check_hlds__inst_match__inst_is_ground_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_ground_2_5_0);
	MR_init_label10(check_hlds__inst_match__inst_is_ground_2_5_0,105,4,7,6,3,17,22,21,27,24)
	MR_init_label7(check_hlds__inst_match__inst_is_ground_2_5_0,20,33,52,32,36,37,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_ground_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_ground_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,105)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i3);
	}
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r4;
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r3;
	MR_r3 = MR_tfield(2, MR_r3, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i4);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i1);
	}
	MR_sv(4) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_sv(4);
	MR_np_call_localret_ent(set_tree234__contains_2_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i7);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i6);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TEST(MR_sv(4),2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i24);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i27);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i17);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r3, 2);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i20);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(3, MR_r3, 2);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_tempr2 = MR_r4;
	MR_sv(3) = MR_tempr2;
	MR_sv(4) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_tempr2;
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(set_tree234__contains_2_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i22);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i21);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TEST(MR_sv(4),2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i24);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i27);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,27)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(4);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i105);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(4);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i105);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i32);
	}
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r4;
	MR_r2 = MR_tfield(3, MR_r3, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i33);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,33)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_ground_1_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,52)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,32)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i36);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,36)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r3,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i37);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,37)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_5_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_ground_2\'/5", 52);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_ground_2_5_0_i52);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module20)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_ground_2_5_0);
	MR_init_label6(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,20,3,4,5,6,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_ground_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0_i3);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(1, MR_r1, 0);
	MR_sv(4) = MR_tfield(0, MR_tempr1, 0);
	MR_sv(5) = MR_tfield(0, MR_tempr1, 1);
	MR_sv(6) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(5);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__bound_inst_list_is_ground_2_5_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(4);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0,
		check_hlds__inst_match__bound_inst_list_is_ground_2_5_0_i5);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(5);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_ground_2_5_0,
		check_hlds__inst_match__bound_inst_list_is_ground_2_5_0_i6);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0_i1);
	}
	MR_r1 = MR_sv(6);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(7);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0_i20);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_2_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(7);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module21)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_2_5_0);
	MR_init_label10(check_hlds__inst_match__inst_list_is_ground_2_5_0,49,5,3,10,9,15,12,16,17,29)
	MR_init_label2(check_hlds__inst_match__inst_list_is_ground_2_5_0,8,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_ground_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,49)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i5);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_list_is_ground_2\'/5", 57);
	MR_r3 = (MR_Word) MR_string_const("length mismatch", 15);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_list_is_ground_2_5_0_i29);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i8);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(1, MR_r1, 0);
	MR_sv(5) = MR_tfield(1, MR_r1, 1);
	MR_sv(4) = MR_tfield(1, MR_r2, 1);
	MR_sv(3) = MR_tfield(1, MR_r2, 0);
	MR_sv(1) = MR_r3;
	MR_tempr2 = MR_r4;
	MR_sv(2) = MR_tempr2;
	MR_sv(6) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_tempr2;
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(set_tree234__contains_2_0,
		check_hlds__inst_match__inst_list_is_ground_2_5_0_i10);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i9);
	}
	MR_r3 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_r4 = MR_sv(2);
	MR_r1 = MR_sv(5);
	MR_succip_word = MR_sv(7);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i49);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TEST(MR_sv(6),2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i12);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(6);
	MR_r3 = MR_sv(2);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_list_is_ground_2_5_0_i15);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r5 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_sv(6);
	MR_r4 = MR_r5;
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i16);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_sv(6);
	MR_r4 = MR_sv(2);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_ground_2_5_0,
		check_hlds__inst_match__inst_list_is_ground_2_5_0_i17);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i1);
	}
	MR_r3 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(4);
	MR_r4 = MR_tempr1;
	MR_r1 = MR_sv(5);
	MR_succip_word = MR_sv(7);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_2_5_0_i49);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,29)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_list_is_ground_2\'/5", 57);
	MR_r3 = (MR_Word) MR_string_const("length mismatch", 15);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_list_is_ground_2_5_0_i29);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(7);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module22)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_3_0);
	MR_init_label10(check_hlds__inst_match__inst_list_is_ground_3_0,42,3,6,8,7,13,10,14,15,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_ground_3_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,42)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i3);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) MR_tbmkword(0, 0));
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i1);
	}
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_sv(4) = MR_tfield(1, MR_r2, 0);
	MR_sv(5) = MR_tfield(1, MR_r2, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_list_is_ground_3_0_i6);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(6) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(6);
	MR_r3 = MR_sv(2);
	MR_np_call_localret_ent(set_tree234__contains_2_0,
		check_hlds__inst_match__inst_list_is_ground_3_0_i8);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i7);
	}
	MR_r3 = MR_sv(1);
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(7);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i42);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TEST(MR_sv(2),2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i10);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(6);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_list_is_ground_3_0_i13);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r5 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r2 = MR_sv(4);
	MR_r4 = MR_r5;
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i14);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r2 = MR_sv(4);
	MR_r4 = MR_sv(6);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_ground_2_5_0,
		check_hlds__inst_match__inst_list_is_ground_3_0_i15);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i1);
	}
	MR_r3 = MR_sv(1);
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(7);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_3_0_i42);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(7);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module23)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_ground_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_ground_3_0);
	MR_init_label6(check_hlds__inst_match__bound_inst_list_is_ground_3_0,19,4,5,6,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_ground'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_ground_3_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_3_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_3_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_r3;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(0, MR_tempr1, 0);
	MR_sv(4) = MR_tfield(0, MR_tempr1, 1);
	MR_sv(5) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(4);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__bound_inst_list_is_ground_3_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_3_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0,
		check_hlds__inst_match__bound_inst_list_is_ground_3_0_i5);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_3_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(4);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_ground_3_0,
		check_hlds__inst_match__bound_inst_list_is_ground_3_0_i6);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_3_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_3_0_i1);
	}
	MR_r1 = MR_sv(5);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(6);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_3_0_i19);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(6);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(6);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module24)
	MR_init_entry1(check_hlds__inst_match__inst_matches_binding_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_binding_2_5_0);
	MR_init_label5(check_hlds__inst_match__inst_matches_binding_2_5_0,4,3,6,7,8)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_binding_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_matches_binding_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 3);
	MR_tfield(0, MR_tempr1, 0) = MR_r1;
	MR_tfield(0, MR_tempr1, 1) = MR_r2;
	MR_tempr3 = MR_r3;
	MR_tfield(0, MR_tempr1, 2) = MR_tempr3;
	MR_tempr4 = MR_r4;
	MR_tempr2 = MR_tfield(0, MR_tempr4, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_tempr3;
	MR_sv(4) = MR_tempr1;
	MR_sv(5) = MR_tempr2;
	MR_sv(6) = MR_tempr4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_tempr2;
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(fn__set_tree234__is_member_2_0,
		check_hlds__inst_match__inst_matches_binding_2_5_0_i4);
MR_def_label(check_hlds__inst_match__inst_matches_binding_2_5_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_2_5_0_i3);
	}
	MR_r2 = MR_sv(6);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_binding_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_tfield(0, MR_sv(6), 0);
	MR_r2 = MR_sv(1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0,
		check_hlds__inst_match__inst_matches_binding_2_5_0_i6);
MR_def_label(check_hlds__inst_match__inst_matches_binding_2_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_r1 = MR_tfield(0, MR_sv(6), 0);
	MR_r2 = MR_sv(2);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_expand_and_remove_constrained_inst_vars_3_0,
		check_hlds__inst_match__inst_matches_binding_2_5_0_i7);
MR_def_label(check_hlds__inst_match__inst_matches_binding_2_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(5);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_matches_binding_2_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_matches_binding_2_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tempr2 = MR_sv(6);
	MR_tfield(0, MR_tempr1, 0) = MR_tfield(0, MR_tempr2, 0);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_3_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Unify___mdbcomp__prim_data__sym_name_0_0);
MR_decl_entry(list__duplicate_3_0);
extern const MR_TypeCtorInfo_Struct mercury_data_parse_tree__prog_data__type_ctor_info_inst_name_0;
MR_decl_entry(fn__set__init_0_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module25)
	MR_init_entry1(check_hlds__inst_match__inst_matches_binding_3_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_binding_3_5_0);
	MR_init_label10(check_hlds__inst_match__inst_matches_binding_3_5_0,3,5,11,13,10,287,20,19,25,6)
	MR_init_label10(check_hlds__inst_match__inst_matches_binding_3_5_0,31,33,35,29,41,40,293,50,291,55)
	MR_init_label9(check_hlds__inst_match__inst_matches_binding_3_5_0,54,60,66,67,59,70,110,284,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_binding_3'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_matches_binding_3_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i284);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i5);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i6);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i287);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_tfield(0, MR_r4, 5);
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i10);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_sv(1) = MR_tfield(2, MR_r2, 0);
	MR_sv(4) = MR_tfield(2, MR_r2, 1);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i11);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_tfield(0, MR_sv(3), 0);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(4);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i13);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_tfield(2, MR_r1, 1);
	MR_r2 = MR_tfield(2, MR_r2, 1);
	MR_np_tailcall_ent(check_hlds__inst_match__ho_inst_info_matches_final_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,287)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i19);
	}
	MR_sv(1) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i20);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_sv(1) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i25);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,25)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i29);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_sv(3) = MR_r4;
	MR_sv(1) = MR_tfield(3, MR_r1, 2);
	MR_sv(2) = MR_tfield(3, MR_r2, 2);
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(__Unify___mdbcomp__prim_data__sym_name_0_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i31);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,31)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(1);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i33);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,33)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,1);
	MR_r2 = MR_tempr1;
	MR_r3 = (MR_Word) MR_tbmkword(0, 0);
	}
	MR_np_call_localret_ent(list__duplicate_3_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i35);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,35)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_list_matches_binding_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,29)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i291);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i40);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_r1 = MR_tempr2;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i41);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,41)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,40)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i293);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_matches_binding_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,293)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(3, MR_r2, 2);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_tempr2 = MR_r4;
	MR_sv(3) = MR_tempr2;
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_r2 = MR_r3;
	MR_r3 = MR_tfield(0, MR_tempr2, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_3_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i50);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,50)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,291)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i54);
	}
	MR_sv(1) = MR_r1;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_r1 = MR_tempr2;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i55);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,55)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,54)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i59);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_r3;
	MR_sv(2) = MR_tempr1;
	MR_tempr2 = MR_r4;
	MR_sv(3) = MR_tempr2;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_tfield(0, MR_tempr2, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_3_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i60);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,60)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_sv(2),0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i110);
	}
	MR_sv(2) = MR_tfield(1, MR_sv(2), 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_np_call_localret_ent(fn__set__init_0_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i66);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,66)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_tfield(0, MR_sv(3), 0);
	MR_r3 = MR_sv(1);
	MR_r4 = MR_sv(2);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i67);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,67)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i110);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,59)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
	MR_sv(3) = MR_r4;
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_r4 = MR_tfield(0, MR_r4, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__ho_inst_info_matches_binding_4_0,
		check_hlds__inst_match__inst_matches_binding_3_5_0_i70);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,70)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_binding_3_5_0_i1);
	}
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,110)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,284)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_matches_binding_3_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module26)
	MR_init_entry1(check_hlds__inst_match__inst_list_matches_binding_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_matches_binding_5_0);
	MR_init_label4(check_hlds__inst_match__inst_list_matches_binding_5_0,38,3,8,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_matches_binding'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_matches_binding_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_matches_binding_5_0,38)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i1);
	}
	if (MR_LTAGS_TESTR(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i1);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_matches_binding_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i1);
	}
	MR_sv(1) = MR_tfield(1, MR_r1, 1);
	MR_sv(2) = MR_tfield(1, MR_r2, 1);
	MR_sv(3) = MR_tfield(1, MR_r3, 1);
	MR_r1 = MR_tfield(1, MR_r1, 0);
	MR_r2 = MR_tfield(1, MR_r2, 0);
	MR_r3 = MR_tfield(1, MR_r3, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_binding_2_5_0,
		check_hlds__inst_match__inst_list_matches_binding_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_list_matches_binding_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_binding_5_0_i38);
	}
MR_def_label(check_hlds__inst_match__inst_list_matches_binding_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(private_builtin__builtin_compare_string_3_0);
MR_decl_entry(__Compare___parse_tree__prog_data__cons_id_0_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module27)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_matches_binding_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_matches_binding_5_0);
	MR_init_label10(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,82,3,7,9,10,11,5,19,18,21)
	MR_init_label5(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,22,24,15,26,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_matches_binding'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_matches_binding_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(10);
	MR_sv(10) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,82)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i3);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(10);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	MR_tempr3 = MR_tfield(1, MR_r1, 0);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 0);
	MR_sv(5) = MR_tfield(1, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(1, MR_r1, 1);
	MR_sv(6) = MR_tempr4;
	MR_sv(7) = MR_tfield(0, MR_tempr3, 1);
	MR_sv(8) = MR_tempr2;
	MR_sv(9) = MR_tfield(0, MR_tempr1, 1);
	MR_r1 = MR_tempr4;
	MR_r2 = MR_tempr2;
	}
	MR_np_call_localret_ent(parse_tree__prog_data__equivalent_cons_ids_2_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i7);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i5);
	}
	MR_sv(1) = MR_tfield(0, MR_sv(3), 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(7);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i9);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(6);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i10);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(7);
	MR_r2 = MR_sv(9);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_matches_binding_5_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i11);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(5);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i82);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_sv(6);
	MR_r7 = MR_tempr1;
	MR_tempr2 = MR_sv(8);
	MR_r5 = MR_tempr2;
	if (MR_PTAG_TESTR(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i15);
	}
	if (MR_PTAG_TESTR(MR_tempr2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i15);
	}
	MR_tempr3 = MR_tfield(1, MR_tempr1, 0);
	MR_r6 = MR_tempr3;
	if (MR_PTAG_TESTR(MR_tempr3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i19);
	}
	MR_sv(4) = MR_tfield(1, MR_tempr1, 1);
	MR_r2 = MR_tfield(1, MR_tempr2, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr2, 1);
	MR_r1 = MR_tfield(1, MR_tempr3, 1);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(1, MR_r7, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r5;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr1, 1);
	MR_r1 = MR_tfield(0, MR_r6, 0);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i21);
	}
	MR_r2 = MR_tfield(1, MR_r2, 1);
	MR_np_call_localret_ent(private_builtin__builtin_compare_string_3_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i22);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_tfield(0, MR_r2, 0);
	MR_np_call_localret_ent(private_builtin__builtin_compare_string_3_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i22);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i24);
	}
	if (((MR_Integer) MR_sv(4) <= (MR_Integer) MR_sv(6))) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_r1 = MR_r7;
	MR_r2 = MR_r5;
	MR_np_call_localret_ent(__Compare___parse_tree__prog_data__cons_id_0_0,
		check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i26);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,26)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (((MR_Integer) 2 != (MR_Integer) MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_binding_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_binding_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(10);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module28)
	MR_init_entry1(check_hlds__inst_match__inst_matches_binding_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_binding_4_0);
	MR_init_label1(check_hlds__inst_match__inst_matches_binding_4_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_binding'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_binding_4_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_binding_4_0_i2);
MR_def_label(check_hlds__inst_match__inst_matches_binding_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 0;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module29)
	MR_init_entry1(check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0);
	MR_init_label1(check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_binding_allow_any_any'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_r4;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0_i2);
MR_def_label(check_hlds__inst_match__inst_matches_binding_allow_any_any_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r4 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_sv(4);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tag_alloc_heap(MR_r3, 1, (MR_Integer) 1);
	MR_tfield(1, MR_r3, 0) = MR_sv(3);
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_binding_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module30)
	MR_init_entry1(check_hlds__inst_match__pred_inst_matches_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__pred_inst_matches_3_0);
	MR_init_label4(check_hlds__inst_match__pred_inst_matches_3_0,2,4,5,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'pred_inst_matches'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__pred_inst_matches_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__pred_inst_matches_3_0_i2);
MR_def_label(check_hlds__inst_match__pred_inst_matches_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4, MR_tempr5;
	MR_tempr4 = MR_sv(1);
	MR_tempr1 = MR_tfield(0, MR_tempr4, 0);
	MR_tempr5 = MR_sv(2);
	MR_tempr2 = MR_tfield(0, MR_tempr5, 0);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_matches_3_0_i1);
	}
	MR_tempr1 = MR_tfield(0, MR_tempr4, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr5, 2);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(check_hlds__inst_match__pred_inst_matches_3_0_i1);
	}
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_tfield(0, MR_tempr1, 0) = MR_sv(3);
	MR_tfield(0, MR_tempr1, 1) = MR_r1;
	MR_tfield(0, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_tfield(0, MR_tempr1, 3) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 4) = (MR_Integer) 0;
	MR_tfield(0, MR_tempr1, 5) = (MR_Integer) 1;
	MR_tempr2 = MR_tempr4;
	MR_sv(1) = MR_tempr1;
	MR_tempr3 = MR_tempr5;
	MR_sv(2) = MR_tfield(0, MR_tempr2, 1);
	MR_sv(3) = MR_tfield(0, MR_tempr3, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(2);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__pred_inst_matches_3_0_i4);
MR_def_label(check_hlds__inst_match__pred_inst_matches_3_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_tbmkword(0, 0);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_higher_order_arg_types_3_0,
		check_hlds__inst_match__pred_inst_matches_3_0_i5);
MR_def_label(check_hlds__inst_match__pred_inst_matches_3_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(1);
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_np_tailcall_ent(check_hlds__inst_match__pred_inst_argmodes_matches_5_0);
	}
MR_def_label(check_hlds__inst_match__pred_inst_matches_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module31)
	MR_init_entry1(check_hlds__inst_match__inst_is_ground_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_ground_2_0);
	MR_init_label5(check_hlds__inst_match__inst_is_ground_2_0,2,4,9,6,13)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_ground'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_ground_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(fn__set_tree234__init_0_0,
		check_hlds__inst_match__inst_is_ground_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(3) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(3);
	MR_r3 = MR_sv(2);
	MR_np_call_localret_ent(set_tree234__contains_2_0,
		check_hlds__inst_match__inst_is_ground_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_r1) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_0_i13);
	}
	if (MR_PTAG_TEST(MR_sv(2),2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_2_0_i6);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set_tree234__insert_3_0,
		check_hlds__inst_match__inst_is_ground_2_0_i9);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_r2 = (MR_Word) MR_tbmkword(0, 0);
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_ground_2_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_2_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = (MR_Word) MR_tbmkword(0, 0);
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_ground_2_5_0);
MR_def_label(check_hlds__inst_match__inst_is_ground_2_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_r1 = MR_TRUE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(set__member_2_0);
MR_decl_entry(set__insert_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module32)
	MR_init_entry1(check_hlds__inst_match__inst_is_ground_or_any_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_ground_or_any_2_4_0);
	MR_init_label10(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,59,3,4,7,12,11,14,15,30,10)
	MR_init_label3(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,19,20,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_ground_or_any_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_ground_or_any_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,59)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i4);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i7);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i59);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i10);
	}
	MR_sv(4) = MR_tfield(3, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i12);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i11);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set__insert_3_0,
		check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i14);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i15);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i59);
	}
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,30)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i19);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i20);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_ground_or_any_2\'/4", 59);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_ground_or_any_2_4_0_i30);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module33)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_ground_or_any_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0,
		check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module34)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0);
	MR_init_label4(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground_or_any_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,
		check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(set__init_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module35)
	MR_init_entry1(check_hlds__inst_match__inst_is_ground_or_any_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_ground_or_any_2_0);
	MR_init_label1(check_hlds__inst_match__inst_is_ground_or_any_2_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_ground_or_any'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_ground_or_any_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_is_ground_or_any_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_ground_or_any_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_decr_sp(3);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_ground_or_any_2_4_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module36)
	MR_init_entry1(check_hlds__inst_match__inst_is_mostly_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_mostly_unique_2_4_0);
	MR_init_label10(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,117,5,3,9,61,7,15,20,19,22)
	MR_init_label7(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,23,18,27,30,28,32,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_mostly_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_mostly_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,117)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i3);
	}
	MR_r4 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_r4,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i5);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r4,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i7);
	}
	MR_r4 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_r4,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i9);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r4,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,61)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i15);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i117);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i18);
	}
	MR_sv(4) = MR_tfield(3, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i20);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i19);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set__insert_3_0,
		check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i22);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i23);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,23)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i117);
	}
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i27);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,27)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i28);
	}
	MR_r4 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_r4,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i30);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,30)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r4,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,28)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i32);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,32)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_mostly_unique_2\'/4", 59);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_mostly_unique_2_4_0_i61);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module37)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_mostly_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0,
		check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module38)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_mostly_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module39)
	MR_init_entry1(check_hlds__inst_match__inst_is_mostly_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_mostly_unique_2_0);
	MR_init_label1(check_hlds__inst_match__inst_is_mostly_unique_2_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_mostly_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_mostly_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_is_mostly_unique_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_mostly_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_decr_sp(3);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_mostly_unique_2_4_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module40)
	MR_init_entry1(check_hlds__inst_match__inst_is_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_unique_2_4_0);
	MR_init_label10(check_hlds__inst_match__inst_is_unique_2_4_0,79,3,5,9,14,13,16,17,36,12)
	MR_init_label4(check_hlds__inst_match__inst_is_unique_2_4_0,21,22,24,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,79)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i3);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i5);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i1);
	}
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i9);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i79);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i12);
	}
	MR_sv(4) = MR_tfield(3, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_is_unique_2_4_0_i14);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i13);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set__insert_3_0,
		check_hlds__inst_match__inst_is_unique_2_4_0_i16);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_unique_2_4_0_i17);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i79);
	}
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,36)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i21);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i22);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i24);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_unique_2_4_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_unique_2\'/4", 52);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_unique_2_4_0_i36);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module41)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_unique_2_4_0,
		check_hlds__inst_match__bound_inst_list_is_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module42)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__inst_list_is_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module43)
	MR_init_entry1(check_hlds__inst_match__inst_is_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_unique_2_0);
	MR_init_label1(check_hlds__inst_match__inst_is_unique_2_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_is_unique_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_decr_sp(3);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_unique_2_4_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module44)
	MR_init_entry1(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_not_partly_unique_2_4_0);
	MR_init_label10(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,79,3,5,9,14,13,16,17,36,12)
	MR_init_label4(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,21,22,24,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_not_partly_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,79)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i3);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i5);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i1);
	}
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i9);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i79);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i12);
	}
	MR_sv(4) = MR_tfield(3, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i14);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i13);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set__insert_3_0,
		check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i16);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i17);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i79);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,36)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i21);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i22);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i24);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_not_partly_unique_2\'/4", 63);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_not_partly_unique_2_4_0_i36);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module45)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_not_partly_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0,
		check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module46)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_not_partly_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module47)
	MR_init_entry1(check_hlds__inst_match__inst_is_not_partly_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_not_partly_unique_2_0);
	MR_init_label1(check_hlds__inst_match__inst_is_not_partly_unique_2_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_not_partly_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_not_partly_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_is_not_partly_unique_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_not_partly_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_decr_sp(3);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module48)
	MR_init_entry1(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_not_fully_unique_2_4_0);
	MR_init_label10(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,117,5,3,9,61,7,15,20,19,22)
	MR_init_label7(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,23,18,27,30,28,32,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_not_fully_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,117)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i3);
	}
	MR_r4 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_r4,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i5);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r4,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i7);
	}
	MR_r4 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_r4,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i9);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r4,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,61)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i15);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i117);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i18);
	}
	MR_sv(4) = MR_tfield(3, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i20);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i19);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_np_call_localret_ent(set__insert_3_0,
		check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i22);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(2) = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i23);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,23)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i117);
	}
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i27);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,27)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i28);
	}
	MR_r4 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_NE(MR_r4,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i30);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,30)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r4,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i1);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,28)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i32);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,32)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_not_fully_unique_2\'/4", 62);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_not_fully_unique_2_4_0_i61);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module49)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_not_fully_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0,
		check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module50)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0);
	MR_init_label4(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0,18,3,4,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_not_fully_unique_2'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0_i3);
	}
	MR_r2 = MR_r3;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0_i1);
	}
	MR_r1 = MR_sv(2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0_i18);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_4_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module51)
	MR_init_entry1(check_hlds__inst_match__inst_is_not_fully_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_not_fully_unique_2_0);
	MR_init_label1(check_hlds__inst_match__inst_is_not_fully_unique_2_0,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_not_fully_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_not_fully_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_is_not_fully_unique_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_is_not_fully_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	MR_succip_word = MR_sv(3);
	MR_decr_sp(3);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module52)
	MR_init_entry1(check_hlds__inst_match__inst_is_clobbered_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_clobbered_2_0);
	MR_init_label9(check_hlds__inst_match__inst_is_clobbered_2_0,66,3,7,11,15,14,36,18,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_clobbered'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_clobbered_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,66)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i3);
	}
	MR_r1 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_EQ(MR_r1,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i36);
	}
	MR_r1 = ((MR_Integer) MR_r1 == (MR_Integer) 4);
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i7);
	}
	MR_r1 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_EQ(MR_r1,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i36);
	}
	MR_r1 = ((MR_Integer) MR_r1 == (MR_Integer) 4);
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i11);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i66);
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i14);
	}
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_clobbered_2_0_i15);
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i66);
	}
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i18);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 1);
	if (MR_INT_EQ(MR_tempr1,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i36);
	}
	MR_r1 = ((MR_Integer) MR_tempr1 == (MR_Integer) 4);
	MR_decr_sp_and_return(2);
	}
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,36)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_clobbered_2_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_clobbered\'/2", 53);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_clobbered_2_0_i36);
MR_def_label(check_hlds__inst_match__inst_is_clobbered_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(2);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(fn__list__duplicate_2_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module53)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_2_0);
	MR_init_label2(check_hlds__inst_match__inst_list_is_ground_2_0,3,4)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_ground_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = (MR_Word) MR_TAG_COMMON(0,0,1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(1);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__inst_list_is_ground_2_0_i3);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(3);
	MR_r2 = MR_tempr1;
	MR_r3 = (MR_Word) MR_tbmkword(0, 0);
	}
	MR_np_call_localret_ent(fn__list__duplicate_2_0,
		check_hlds__inst_match__inst_list_is_ground_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(2);
	MR_succip_word = MR_sv(4);
	MR_decr_sp(4);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_list_is_ground_3_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module54)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_or_any_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_or_any_2_0);
	MR_init_label5(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,18,4,5,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground_or_any'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_ground_or_any_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_list_is_ground_or_any_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,
		check_hlds__inst_match__inst_list_is_ground_or_any_2_0_i5);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_2_0_i1);
	}
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_2_0_i18);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module55)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_unique_2_0);
	MR_init_label5(check_hlds__inst_match__inst_list_is_unique_2_0,18,4,5,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_list_is_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_unique_2_0_i5);
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_unique_2_0_i1);
	}
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_unique_2_0_i18);
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_is_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module56)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_mostly_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_mostly_unique_2_0);
	MR_init_label5(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,18,4,5,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_mostly_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_mostly_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_mostly_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_list_is_mostly_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_mostly_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_mostly_unique_2_0_i5);
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_mostly_unique_2_0_i1);
	}
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_mostly_unique_2_0_i18);
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module57)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_not_partly_unique_2_0);
	MR_init_label5(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,18,4,5,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_not_partly_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_not_partly_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_list_is_not_partly_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_not_partly_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_not_partly_unique_2_0_i5);
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0_i1);
	}
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0_i18);
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module58)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_not_fully_unique_2_0);
	MR_init_label5(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,18,4,5,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_not_fully_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_not_fully_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_list_is_not_fully_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_not_fully_unique_2_4_0,
		check_hlds__inst_match__inst_list_is_not_fully_unique_2_0_i5);
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0_i1);
	}
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0_i18);
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module59)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_ground_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_ground_2_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_ground'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_ground_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = (MR_Word) MR_tbmkword(0, 0);
	MR_r3 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_ground_3_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module60)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_ground_or_any'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_ground_or_any_2_0,
		check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0_i17);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module61)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_unique_2_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_unique_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_unique_2_0,
		check_hlds__inst_match__bound_inst_list_is_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_unique_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_unique_2_0_i17);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module62)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_mostly_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_mostly_unique_2_0,
		check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0_i17);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module63)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_not_partly_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_not_partly_unique_2_0,
		check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0_i17);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module64)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_not_fully_unique'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_not_fully_unique_2_0,
		check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0_i17);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module65)
	MR_init_entry1(check_hlds__inst_match__inst_is_free_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_free_2_0);
	MR_init_label6(check_hlds__inst_match__inst_is_free_2_0,37,3,7,17,6,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_free'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_free_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_free_2_0,37)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	while (1) {
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_free_2_0_i3);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(2);
	/* continue */ } /* end while */
MR_def_label(check_hlds__inst_match__inst_is_free_2_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_free_2_0_i6);
	}
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_free_2_0_i7);
MR_def_label(check_hlds__inst_match__inst_is_free_2_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_free_2_0_i37);
	}
MR_def_label(check_hlds__inst_match__inst_is_free_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_free_2_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_free_2_0_i17);
	}
	if (MR_PTAG_TEST(MR_r2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_free_2_0_i17);
	}
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_free_2_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_free\'/2", 48);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_free_2_0_i17);
MR_def_label(check_hlds__inst_match__inst_is_free_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(2);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module66)
	MR_init_entry1(check_hlds__inst_match__inst_is_any_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_any_2_0);
	MR_init_label6(check_hlds__inst_match__inst_is_any_2_0,32,4,8,17,7,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_any'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_any_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_any_2_0,32)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	while (1) {
	if (MR_PTAG_TEST(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_any_2_0_i17);
	}
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_any_2_0_i4);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(2);
	/* continue */ } /* end while */
MR_def_label(check_hlds__inst_match__inst_is_any_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_any_2_0_i7);
	}
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_any_2_0_i8);
MR_def_label(check_hlds__inst_match__inst_is_any_2_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_any_2_0_i32);
	}
MR_def_label(check_hlds__inst_match__inst_is_any_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_any_2_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_any_2_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_any\'/2", 47);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_any_2_0_i17);
MR_def_label(check_hlds__inst_match__inst_is_any_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(2);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module67)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_free_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_free_2_0);
	MR_init_label4(check_hlds__inst_match__inst_list_is_free_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_free'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_free_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_free_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_free_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_free_2_0,
		check_hlds__inst_match__inst_list_is_free_2_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_is_free_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_free_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_free_2_0_i17);
MR_def_label(check_hlds__inst_match__inst_list_is_free_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__inst_list_is_free_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module68)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_is_free_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_is_free_2_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_is_free_2_0,17,4,2,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_is_free'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__bound_inst_list_is_free_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(3);
	MR_sv(3) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_is_free_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_free_2_0_i2);
	}
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_is_free_2_0,
		check_hlds__inst_match__bound_inst_list_is_free_2_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_free_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_free_2_0_i1);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_succip_word = MR_sv(3);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_is_free_2_0_i17);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_free_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(3);
MR_def_label(check_hlds__inst_match__bound_inst_list_is_free_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(3);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module69)
	MR_init_entry1(check_hlds__inst_match__inst_is_bound_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_bound_2_0);
	MR_init_label6(check_hlds__inst_match__inst_is_bound_2_0,52,6,10,23,9,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_bound'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_bound_2_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_bound_2_0,52)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	while (1) {
	if (MR_RTAGS_TEST(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i23);
	}
	if (MR_PTAG_TEST(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i23);
	}
	if (MR_RTAGS_TEST(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i23);
	}
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i6);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(2);
	/* continue */ } /* end while */
MR_def_label(check_hlds__inst_match__inst_is_bound_2_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i9);
	}
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_bound_2_0_i10);
MR_def_label(check_hlds__inst_match__inst_is_bound_2_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i52);
	}
MR_def_label(check_hlds__inst_match__inst_is_bound_2_0,23)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_bound_2_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TEST(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i23);
	}
	if (MR_LTAGS_TEST(MR_r2,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i23);
	}
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_2_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_bound\'/2", 49);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_bound_2_0_i23);
MR_def_label(check_hlds__inst_match__inst_is_bound_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(2);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module70)
	MR_init_entry1(check_hlds__inst_match__inst_is_bound_to_functors_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_bound_to_functors_3_0);
	MR_init_label7(check_hlds__inst_match__inst_is_bound_to_functors_3_0,32,3,4,8,17,7,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_bound_to_functors'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_is_bound_to_functors_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,32)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_to_functors_3_0_i3);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_to_functors_3_0_i4);
	}
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_to_functors_3_0_i32);
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_to_functors_3_0_i7);
	}
	MR_sv(1) = MR_r1;
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_bound_to_functors_3_0_i8);
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_to_functors_3_0_i32);
	}
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(2);
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_bound_to_functors_3_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_is_bound_to_functors\'/3", 61);
	MR_r3 = (MR_Word) MR_string_const("uninstantiated inst parameter", 29);
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_is_bound_to_functors_3_0_i17);
MR_def_label(check_hlds__inst_match__inst_is_bound_to_functors_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(2);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Unify___parse_tree__prog_data__inst_name_0_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module71)
	MR_init_entry1(check_hlds__inst_match__inst_contains_instname_2_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_contains_instname_2_6_0);
	MR_init_label10(check_hlds__inst_match__inst_contains_instname_2_6_0,86,3,4,5,6,52,7,8,10,15)
	MR_init_label5(check_hlds__inst_match__inst_contains_instname_2_6_0,13,18,17,20,21)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_contains_instname_2'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_contains_instname_2_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,86)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i3);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i4);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i5);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i6);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i7);
	}
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,52)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i8);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_contains_instname_6_0);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i10);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i86);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i52);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(3, MR_r1, 1);
	MR_sv(1) = MR_r2;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tempr1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(__Unify___parse_tree__prog_data__inst_name_0_0,
		check_hlds__inst_match__inst_contains_instname_2_6_0_i15);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i13);
	}
	MR_r1 = (MR_Integer) 1;
	MR_r2 = MR_sv(3);
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_sv(3);
	MR_tempr2 = MR_sv(4);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_r2 = MR_tempr2;
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_contains_instname_2_6_0_i18);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i17);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_sv(3);
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_contains_instname_2_6_0_i20);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(3);
	MR_sv(3) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(set__insert_3_0,
		check_hlds__inst_match__inst_contains_instname_2_6_0_i21);
MR_def_label(check_hlds__inst_match__inst_contains_instname_2_6_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_contains_instname_2_6_0_i86);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module72)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_contains_instname_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_contains_instname_6_0);
	MR_init_label4(check_hlds__inst_match__bound_inst_list_contains_instname_6_0,15,3,4,6)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_contains_instname'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_contains_instname_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_instname_6_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_contains_instname_6_0_i3);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_instname_6_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_contains_instname_6_0,
		check_hlds__inst_match__bound_inst_list_contains_instname_6_0_i4);
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_instname_6_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_contains_instname_6_0_i6);
	}
	MR_r1 = (MR_Integer) 1;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_instname_6_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(3);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_contains_instname_6_0_i15);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module73)
	MR_init_entry1(check_hlds__inst_match__inst_list_contains_instname_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_contains_instname_6_0);
	MR_init_label4(check_hlds__inst_match__inst_list_contains_instname_6_0,15,3,4,6)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_contains_instname'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_contains_instname_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_contains_instname_6_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_instname_6_0_i3);
	}
	MR_r1 = (MR_Integer) 0;
	MR_r2 = MR_r4;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_contains_instname_6_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r2;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(1, MR_r1, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_contains_instname_2_6_0,
		check_hlds__inst_match__inst_list_contains_instname_6_0_i4);
MR_def_label(check_hlds__inst_match__inst_list_contains_instname_6_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_instname_6_0_i6);
	}
	MR_r1 = (MR_Integer) 1;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_contains_instname_6_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(3);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_instname_6_0_i15);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module74)
	MR_init_entry1(check_hlds__inst_match__inst_contains_instname_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_contains_instname_3_0);
	MR_init_label2(check_hlds__inst_match__inst_contains_instname_3_0,2,3)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_contains_instname'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_contains_instname_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_contains_instname_3_0_i2);
MR_def_label(check_hlds__inst_match__inst_contains_instname_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_contains_instname_2_6_0,
		check_hlds__inst_match__inst_contains_instname_3_0_i3);
MR_def_label(check_hlds__inst_match__inst_contains_instname_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = ((MR_Integer) 1 == (MR_Integer) MR_r1);
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_declare_entry(MR_do_fail);

MR_BEGIN_MODULE(check_hlds__inst_match_module75)
	MR_init_entry1(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_name_contains_inst_var_2_0);
	MR_init_label10(check_hlds__inst_match__inst_name_contains_inst_var_2_0,2,11,8,14,16,18,20,22,83,75)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_name_contains_inst_var'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_name_contains_inst_var_2_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i2);
	}
	MR_mkframe("pred check_hlds.inst_match.inst_name_contains_inst_var/2-0", 1,
		MR_LABEL_AP(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i11));
	MR_fv(1) = MR_tfield(1, MR_r1, 1);
	MR_r1 = MR_tfield(1, MR_r1, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_contains_inst_var_2_0,
		check_hlds__inst_match__inst_name_contains_inst_var_2_0_i75);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i8);
	}
	MR_mkframe("pred check_hlds.inst_match.inst_name_contains_inst_var/2-0", 1,
		MR_LABEL_AP(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i11));
	MR_fv(1) = MR_tfield(2, MR_r1, 2);
	MR_r1 = MR_tfield(2, MR_r1, 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_contains_inst_var_2_0,
		check_hlds__inst_match__inst_name_contains_inst_var_2_0_i75);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	MR_r1 = MR_fv(1);
	MR_succip_word = (MR_Word) MR_succip_slot(MR_curfr);
	MR_maxfr_word = (MR_Word) MR_prevfr_slot(MR_curfr);
	MR_curfr_word = (MR_Word) MR_succfr_slot(MR_curfr);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i14);
	}
	MR_r1 = MR_tfield(0, MR_r1, 1);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_list_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i16);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_np_localtailcall(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i18);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_np_localtailcall(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i20);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_np_localtailcall(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i22);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_np_localtailcall(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_name_contains_inst_var_2_0_i83);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_localtailcall(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,83)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_GOTO(MR_ENTRY(MR_do_redo));
MR_def_label(check_hlds__inst_match__inst_name_contains_inst_var_2_0,75)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succeed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module76)
	MR_init_entry1(check_hlds__inst_match__inst_contains_inst_var_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_contains_inst_var_2_0);
	MR_init_label5(check_hlds__inst_match__inst_contains_inst_var_2_0,2,4,6,8,47)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_contains_inst_var'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_contains_inst_var_2_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_inst_var_2_0_i2);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_list_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_contains_inst_var_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_inst_var_2_0_i4);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_contains_inst_var_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_inst_var_2_0_i6);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_name_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_contains_inst_var_2_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_inst_var_2_0_i8);
	}
	MR_mkframe("pred check_hlds.inst_match.inst_contains_inst_var/2-0", 0,
		MR_ENTRY(MR_do_fail));
	MR_r2 = MR_tfield(3, MR_r1, 2);
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO(MR_ENTRY(MR_do_fail));
	}
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r2, 0), 1);
	MR_succip_word = (MR_Word) MR_succip_slot(MR_curfr);
	MR_maxfr_word = (MR_Word) MR_prevfr_slot(MR_curfr);
	MR_curfr_word = (MR_Word) MR_succfr_slot(MR_curfr);
	MR_np_tailcall_ent(check_hlds__inst_match__mode_list_contains_inst_var_2_0);
MR_def_label(check_hlds__inst_match__inst_contains_inst_var_2_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_contains_inst_var_2_0_i47);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_contains_inst_var_2_0,47)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_GOTO(MR_ENTRY(MR_do_redo));
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module77)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0);
	MR_init_label3(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0,7,4,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_contains_inst_var'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_mkframe_no_redoip("pred check_hlds.inst_match.bound_inst_list_contains_inst_var/2-0", 1);
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO(MR_ENTRY(MR_do_fail));
	}
	MR_fv(1) = MR_tfield(1, MR_r1, 1);
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0_i4);
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r1, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_contains_inst_var_2_0,
		check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0_i2);
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	MR_r1 = MR_fv(1);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0_i7);
MR_def_label(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succeed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module78)
	MR_init_entry1(check_hlds__inst_match__inst_list_contains_inst_var_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_contains_inst_var_2_0);
	MR_init_label7(check_hlds__inst_match__inst_list_contains_inst_var_2_0,17,6,8,10,12,4,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_contains_inst_var'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_contains_inst_var_2_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_mkframe_no_redoip("pred check_hlds.inst_match.inst_list_contains_inst_var/2-0", 1);
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO(MR_ENTRY(MR_do_fail));
	}
	MR_fv(1) = MR_tfield(1, MR_r1, 1);
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i4);
	MR_r2 = MR_tfield(1, MR_r1, 0);
	if (MR_RTAGS_TESTR(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i6);
	}
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_np_localcall_lab(check_hlds__inst_match__inst_list_contains_inst_var_2_0,
		check_hlds__inst_match__inst_list_contains_inst_var_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i8);
	}
	MR_r1 = MR_tfield(3, MR_r2, 2);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0,
		check_hlds__inst_match__inst_list_contains_inst_var_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i10);
	}
	MR_r1 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_name_contains_inst_var_2_0,
		check_hlds__inst_match__inst_list_contains_inst_var_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i12);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 2);
	if (MR_LTAGS_TEST(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i4);
	}
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_tempr1, 0), 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__mode_list_contains_inst_var_2_0,
		check_hlds__inst_match__inst_list_contains_inst_var_2_0_i2);
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i4);
	}
	MR_r1 = MR_tfield(3, MR_r2, 1);
	MR_succeed();
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	MR_r1 = MR_fv(1);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_contains_inst_var_2_0_i17);
MR_def_label(check_hlds__inst_match__inst_list_contains_inst_var_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succeed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module79)
	MR_init_entry1(check_hlds__inst_match__mode_list_contains_inst_var_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__mode_list_contains_inst_var_2_0);
	MR_init_label3(check_hlds__inst_match__mode_list_contains_inst_var_2_0,7,4,2)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'mode_list_contains_inst_var'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__mode_list_contains_inst_var_2_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_mkframe_no_redoip("pred check_hlds.inst_match.mode_list_contains_inst_var/2-0", 1);
MR_def_label(check_hlds__inst_match__mode_list_contains_inst_var_2_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	if (MR_LTAGS_TEST(MR_r1,0,0)) {
		MR_GOTO(MR_ENTRY(MR_do_fail));
	}
	MR_fv(1) = MR_tfield(1, MR_r1, 1);
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__mode_list_contains_inst_var_2_0_i4);
	MR_r1 = MR_tfield(1, MR_r1, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__mode_contains_inst_var_2_0,
		check_hlds__inst_match__mode_list_contains_inst_var_2_0_i2);
MR_def_label(check_hlds__inst_match__mode_list_contains_inst_var_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	MR_r1 = MR_fv(1);
	MR_GOTO_LAB(check_hlds__inst_match__mode_list_contains_inst_var_2_0_i7);
MR_def_label(check_hlds__inst_match__mode_list_contains_inst_var_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succeed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module80)
	MR_init_entry1(check_hlds__inst_match__mode_contains_inst_var_2_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__mode_contains_inst_var_2_0);
	MR_init_label9(check_hlds__inst_match__mode_contains_inst_var_2_0,4,2,1,7,9,11,13,16,6)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'mode_contains_inst_var'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__mode_contains_inst_var_2_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_mkframe("pred check_hlds.inst_match.mode_contains_inst_var/2-0", 1,
		MR_ENTRY(MR_do_fail));
	if (MR_PTAG_TESTR(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i2);
	}
	MR_fv(1) = MR_tfield(0, MR_r1, 1);
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__mode_contains_inst_var_2_0_i4);
	MR_r1 = MR_tfield(0, MR_r1, 0);
	MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i1);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_curfr) = (MR_Word) MR_ENTRY(MR_do_fail);
	MR_r1 = MR_fv(1);
	MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i1);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_tfield(1, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(list__member_2_1,
		check_hlds__inst_match__mode_contains_inst_var_2_0_i1);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i7);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_contains_inst_var_2_0,
		check_hlds__inst_match__mode_contains_inst_var_2_0_i6);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i9);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_contains_inst_var_2_0,
		check_hlds__inst_match__mode_contains_inst_var_2_0_i6);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i11);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_name_contains_inst_var_2_0,
		check_hlds__inst_match__mode_contains_inst_var_2_0_i6);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i13);
	}
	MR_r2 = MR_tfield(3, MR_r1, 2);
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO(MR_ENTRY(MR_do_redo));
	}
	MR_r1 = MR_tfield(0, MR_tfield(1, MR_r2, 0), 1);
	MR_np_call_localret_ent(check_hlds__inst_match__mode_list_contains_inst_var_2_0,
		check_hlds__inst_match__mode_contains_inst_var_2_0_i6);
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__mode_contains_inst_var_2_0_i16);
	}
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_succeed();
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_GOTO(MR_ENTRY(MR_do_redo));
MR_def_label(check_hlds__inst_match__mode_contains_inst_var_2_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succeed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module81)
	MR_init_entry1(check_hlds__inst_match__mode_list_contains_inst_var_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__mode_list_contains_inst_var_3_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'mode_list_contains_inst_var'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__mode_list_contains_inst_var_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_111_100_101_95_108_105_115_116_95_99_111_110_116_97_105_110_115_95_105_110_115_116_95_118_97_114_95_95_91_50_93_95_48_3_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module82)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_or_dead_3_0);
	MR_init_label5(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0,30,3,7,8,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground_or_dead'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_ground_or_dead_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0,30)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i3);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) MR_tbmkword(0, 0));
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	if (MR_INT_NE(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i7);
	}
	MR_r1 = MR_tfield(1, MR_r1, 1);
	MR_r2 = MR_tfield(1, MR_r2, 1);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i30);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr2 = MR_r3;
	MR_sv(1) = MR_tempr2;
	MR_sv(2) = MR_tfield(1, MR_r1, 1);
	MR_sv(3) = MR_tfield(1, MR_r2, 1);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_ground_2_0,
		check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i8);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i1);
	}
	MR_r3 = MR_sv(1);
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(3);
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0_i30);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_dead_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module83)
	MR_init_entry1(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0);
	MR_init_label6(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,31,3,7,8,9,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_is_ground_or_any_or_dead'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,31)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i3);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) MR_tbmkword(0, 0));
	MR_decr_sp_and_return(5);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	if (MR_INT_NE(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i7);
	}
	MR_r1 = MR_tfield(1, MR_r1, 1);
	MR_r2 = MR_tfield(1, MR_r2, 1);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i31);
	}
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_tfield(1, MR_r1, 0);
	MR_sv(3) = MR_tfield(1, MR_r1, 1);
	MR_sv(4) = MR_tfield(1, MR_r2, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_np_call_localret_ent(set__init_1_0,
		check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i8);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_is_ground_or_any_2_4_0,
		check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i9);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i1);
	}
	MR_r3 = MR_sv(1);
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(4);
	MR_succip_word = MR_sv(5);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0_i31);
MR_def_label(check_hlds__inst_match__inst_list_is_ground_or_any_or_dead_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(fn__map__singleton_2_0);
MR_decl_entry(f_109_97_112_95_95_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_111_114_95_102_117_110_99_95_95_115_101_97_114_99_104_95_95_91_75_32_61_32_118_97_114_40_86_95_50_41_93_95_48_95_49_3_0);
MR_decl_entry(check_hlds__inst_util__inst_merge_6_0);
MR_decl_entry(f_109_97_112_95_95_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_111_114_95_102_117_110_99_95_95_100_101_116_95_117_112_100_97_116_101_95_95_91_75_32_61_32_118_97_114_40_86_95_50_41_93_95_48_95_49_4_0);
MR_decl_entry(f_109_97_112_95_95_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_100_101_116_95_105_110_115_101_114_116_95_95_91_75_32_61_32_118_97_114_40_86_95_50_41_93_95_48_95_49_4_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module84)
	MR_init_entry1(check_hlds__inst_match__update_inst_var_sub_2_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__update_inst_var_sub_2_5_0);
	MR_init_label8(check_hlds__inst_match__update_inst_var_sub_2_5_0,5,3,10,12,15,8,19,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'update_inst_var_sub_2'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__update_inst_var_sub_2_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(8);
	MR_sv(8) = (MR_Word) MR_succip;
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr2 = MR_r4;
	MR_r5 = MR_tfield(0, MR_tempr2, 2);
	if (MR_LTAGS_TESTR(MR_r5,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__update_inst_var_sub_2_5_0_i3);
	}
	MR_sv(5) = MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(fn__map__singleton_2_0,
		check_hlds__inst_match__update_inst_var_sub_2_5_0_i5);
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 1, (MR_Integer) 1);
	MR_tfield(1, MR_tempr1, 0) = MR_r1;
	MR_tag_alloc_heap(MR_r2, 0, (MR_Integer) 6);
	MR_tempr2 = MR_sv(5);
	MR_tfield(0, MR_r2, 0) = MR_tfield(0, MR_tempr2, 0);
	MR_tfield(0, MR_r2, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_r2, 2) = MR_tempr1;
	MR_tfield(0, MR_r2, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_r2, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_r2, 5) = MR_tfield(0, MR_tempr2, 5);
	MR_succip_word = MR_sv(8);
	MR_decr_sp(8);
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(1, MR_r5, 0);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r3;
	MR_sv(4) = MR_tempr1;
	MR_sv(5) = MR_r4;
	MR_sv(6) = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_var_type);
	MR_sv(7) = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r1 = MR_sv(6);
	MR_r2 = MR_sv(7);
	MR_r3 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r4 = MR_tempr1;
	MR_r5 = MR_sv(3);
	}
	MR_np_call_localret_ent(f_109_97_112_95_95_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_111_114_95_102_117_110_99_95_95_115_101_97_114_99_104_95_95_91_75_32_61_32_118_97_114_40_86_95_50_41_93_95_48_95_49_3_0,
		check_hlds__inst_match__update_inst_var_sub_2_5_0_i10);
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__update_inst_var_sub_2_5_0_i8);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tfield(0, MR_sv(5), 0);
	MR_np_call_localret_ent(check_hlds__inst_util__inst_merge_6_0,
		check_hlds__inst_match__update_inst_var_sub_2_5_0_i12);
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__update_inst_var_sub_2_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_sv(1) = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_r3;
	MR_tempr3 = MR_sv(5);
	MR_tfield(0, MR_tempr1, 1) = MR_tfield(0, MR_tempr3, 1);
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr3, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr3, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr3, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr3, 5);
	MR_r1 = MR_sv(6);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_sv(7);
	MR_r3 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r4 = MR_sv(3);
	MR_r5 = MR_tempr2;
	MR_r6 = MR_sv(4);
	}
	MR_np_call_localret_ent(f_109_97_112_95_95_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_111_114_95_102_117_110_99_95_95_100_101_116_95_117_112_100_97_116_101_95_95_91_75_32_61_32_118_97_114_40_86_95_50_41_93_95_48_95_49_4_0,
		check_hlds__inst_match__update_inst_var_sub_2_5_0_i15);
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 1, (MR_Integer) 1);
	MR_tfield(1, MR_tempr1, 0) = MR_r1;
	MR_tag_alloc_heap(MR_r2, 0, (MR_Integer) 6);
	MR_tempr2 = MR_sv(1);
	MR_tfield(0, MR_r2, 0) = MR_tfield(0, MR_tempr2, 0);
	MR_tfield(0, MR_r2, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_r2, 2) = MR_tempr1;
	MR_tfield(0, MR_r2, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_r2, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_r2, 5) = MR_tfield(0, MR_tempr2, 5);
	MR_succip_word = MR_sv(8);
	MR_decr_sp(8);
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_var_type);
	MR_r2 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r3 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r4 = MR_sv(3);
	MR_r5 = MR_sv(1);
	MR_r6 = MR_sv(4);
	MR_np_call_localret_ent(f_109_97_112_95_95_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_100_101_116_95_105_110_115_101_114_116_95_95_91_75_32_61_32_118_97_114_40_86_95_50_41_93_95_48_95_49_4_0,
		check_hlds__inst_match__update_inst_var_sub_2_5_0_i19);
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 1, (MR_Integer) 1);
	MR_tfield(1, MR_tempr1, 0) = MR_r1;
	MR_tag_alloc_heap(MR_r2, 0, (MR_Integer) 6);
	MR_tempr2 = MR_sv(5);
	MR_tfield(0, MR_r2, 0) = MR_tfield(0, MR_tempr2, 0);
	MR_tfield(0, MR_r2, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_r2, 2) = MR_tempr1;
	MR_tfield(0, MR_r2, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_r2, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_r2, 5) = MR_tfield(0, MR_tempr2, 5);
	MR_succip_word = MR_sv(8);
	MR_decr_sp(8);
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__update_inst_var_sub_2_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(8);
	MR_decr_sp(8);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module85)
	MR_init_entry1(check_hlds__inst_match__ground_matches_initial_inst_list_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__ground_matches_initial_inst_list_5_0);
	MR_init_label4(check_hlds__inst_match__ground_matches_initial_inst_list_5_0,37,3,7,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'ground_matches_initial_inst_list'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__ground_matches_initial_inst_list_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__ground_matches_initial_inst_list_5_0,37)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_inst_list_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_inst_list_5_0_i1);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__ground_matches_initial_inst_list_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_inst_list_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 3, (MR_Integer) 3);
	MR_tfield(3, MR_tempr1, 0) = (MR_Integer) 1;
	MR_tfield(3, MR_tempr1, 1) = MR_r1;
	MR_tfield(3, MR_tempr1, 2) = (MR_Word) MR_tbmkword(0, 0);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_tfield(1, MR_r2, 1);
	MR_sv(3) = MR_tfield(1, MR_r3, 1);
	MR_r1 = MR_tempr1;
	MR_r2 = MR_tfield(1, MR_r2, 0);
	MR_r3 = MR_tfield(1, MR_r3, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_initial_2_5_0,
		check_hlds__inst_match__ground_matches_initial_inst_list_5_0_i7);
MR_def_label(check_hlds__inst_match__ground_matches_initial_inst_list_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_inst_list_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_inst_list_5_0_i37);
	}
MR_def_label(check_hlds__inst_match__ground_matches_initial_inst_list_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module86)
	MR_init_entry1(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0);
	MR_init_label6(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,20,3,4,5,6,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'ground_matches_initial_bound_inst_list'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(8);
	MR_sv(8) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0_i3);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(8);
MR_def_label(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr2 = MR_r4;
	MR_sv(3) = MR_tempr2;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_sv(4) = MR_tfield(0, MR_tempr1, 0);
	MR_sv(5) = MR_tfield(0, MR_tempr1, 1);
	MR_sv(6) = MR_tfield(1, MR_r2, 1);
	MR_sv(7) = MR_tfield(0, MR_tempr2, 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(5);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0_i4);
MR_def_label(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(7);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(4);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0,
		check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0_i5);
MR_def_label(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(5);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__ground_matches_initial_inst_list_5_0,
		check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0_i6);
MR_def_label(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(6);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(8);
	MR_GOTO_LAB(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0_i20);
	}
MR_def_label(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(8);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module87)
	MR_init_entry1(check_hlds__inst_match__compare_uniqueness_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__compare_uniqueness_3_0);
	MR_init_label8(check_hlds__inst_match__compare_uniqueness_3_0,5,7,79,11,3,23,25,29)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'compare_uniqueness'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__compare_uniqueness_3_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i3);
	}
	if (MR_INT_NE(MR_r3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i5);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 3);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i7);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 4);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i11);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,79)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	MR_r1 = ((MR_Integer) MR_r2 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r2,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i23);
	}
	MR_r1 = ((MR_Integer) MR_r3 == (MR_Integer) 3);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,23)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r2,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i25);
	}
	if (MR_INT_EQ(MR_r3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	MR_r1 = ((MR_Integer) MR_r3 == (MR_Integer) 4);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,25)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i29);
	}
	if (MR_INT_EQ(MR_r3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	MR_r1 = ((MR_Integer) MR_r3 == (MR_Integer) 0);
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_uniqueness_3_0,29)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r2,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	if (MR_INT_EQ(MR_r3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_uniqueness_3_0_i79);
	}
	MR_r1 = ((MR_Integer) MR_r3 == (MR_Integer) 0);
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module88)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_matches_uniq_3_0);
	MR_init_label2(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0,2,11)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_matches_uniq'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0_i2);
	}
	MR_r2 = MR_r3;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_unique_2_0);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0_i11);
	}
	MR_r2 = MR_r3;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module89)
	MR_init_entry1(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__uniq_matches_bound_inst_list_3_0);
	MR_init_label2(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0,2,11)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'uniq_matches_bound_inst_list'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0_i2);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_r3;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0);
MR_def_label(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0_i11);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_r3;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0);
MR_def_label(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module90)
	MR_init_entry1(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__compare_bound_inst_list_uniq_4_0);
	MR_init_label4(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,34,4,3,14)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'compare_bound_inst_list_uniq'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0_i3);
	}
	if (MR_INT_NE(MR_r3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0_i4);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_r4;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_partly_unique_2_0);
MR_def_label(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,34)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0_i34);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_r4;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_not_fully_unique_2_0);
MR_def_label(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0_i14);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_r4;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_unique_2_0);
MR_def_label(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0_i34);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_r4;
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module91)
	MR_init_entry1(check_hlds__inst_match__inst_list_matches_initial_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_matches_initial_5_0);
	MR_init_label4(check_hlds__inst_match__inst_list_matches_initial_5_0,38,3,8,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_matches_initial'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_matches_initial_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_matches_initial_5_0,38)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i1);
	}
	if (MR_LTAGS_TESTR(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i1);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_matches_initial_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i1);
	}
	MR_sv(1) = MR_tfield(1, MR_r1, 1);
	MR_sv(2) = MR_tfield(1, MR_r2, 1);
	MR_sv(3) = MR_tfield(1, MR_r3, 1);
	MR_r1 = MR_tfield(1, MR_r1, 0);
	MR_r2 = MR_tfield(1, MR_r2, 0);
	MR_r3 = MR_tfield(1, MR_r3, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_initial_2_5_0,
		check_hlds__inst_match__inst_list_matches_initial_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_list_matches_initial_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_initial_5_0_i38);
	}
MR_def_label(check_hlds__inst_match__inst_list_matches_initial_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module92)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_matches_initial_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_matches_initial_5_0);
	MR_init_label10(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,82,3,7,9,10,11,5,19,18,21)
	MR_init_label5(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,22,24,15,26,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_matches_initial'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_matches_initial_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(10);
	MR_sv(10) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,82)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i3);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(10);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	MR_tempr3 = MR_tfield(1, MR_r1, 0);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 0);
	MR_sv(5) = MR_tfield(1, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(1, MR_r1, 1);
	MR_sv(6) = MR_tempr4;
	MR_sv(7) = MR_tfield(0, MR_tempr3, 1);
	MR_sv(8) = MR_tempr2;
	MR_sv(9) = MR_tfield(0, MR_tempr1, 1);
	MR_r1 = MR_tempr4;
	MR_r2 = MR_tempr2;
	}
	MR_np_call_localret_ent(parse_tree__prog_data__equivalent_cons_ids_2_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i7);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i5);
	}
	MR_sv(1) = MR_tfield(0, MR_sv(3), 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(7);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i9);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(6);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i10);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(7);
	MR_r2 = MR_sv(9);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_matches_initial_5_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i11);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(5);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i82);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_sv(6);
	MR_r7 = MR_tempr1;
	MR_tempr2 = MR_sv(8);
	MR_r5 = MR_tempr2;
	if (MR_PTAG_TESTR(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i15);
	}
	if (MR_PTAG_TESTR(MR_tempr2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i15);
	}
	MR_tempr3 = MR_tfield(1, MR_tempr1, 0);
	MR_r6 = MR_tempr3;
	if (MR_PTAG_TESTR(MR_tempr3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i19);
	}
	MR_sv(4) = MR_tfield(1, MR_tempr1, 1);
	MR_r2 = MR_tfield(1, MR_tempr2, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr2, 1);
	MR_r1 = MR_tfield(1, MR_tempr3, 1);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(1, MR_r7, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r5;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr1, 1);
	MR_r1 = MR_tfield(0, MR_r6, 0);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i21);
	}
	MR_r2 = MR_tfield(1, MR_r2, 1);
	MR_np_call_localret_ent(private_builtin__builtin_compare_string_3_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i22);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_tfield(0, MR_r2, 0);
	MR_np_call_localret_ent(private_builtin__builtin_compare_string_3_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i22);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i24);
	}
	if (((MR_Integer) MR_sv(4) <= (MR_Integer) MR_sv(6))) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_r1 = MR_r7;
	MR_r2 = MR_r5;
	MR_np_call_localret_ent(__Compare___parse_tree__prog_data__cons_id_0_0,
		check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i26);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,26)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (((MR_Integer) 2 != (MR_Integer) MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_initial_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_initial_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(10);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module93)
	MR_init_entry1(check_hlds__inst_match__inst_matches_initial_4_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_initial_4_5_0);
	MR_init_label10(check_hlds__inst_match__inst_matches_initial_4_5_0,3,5,446,11,9,16,15,21,6,27)
	MR_init_label10(check_hlds__inst_match__inst_matches_initial_4_5_0,449,32,34,36,25,451,44,46,42,51)
	MR_init_label10(check_hlds__inst_match__inst_matches_initial_4_5_0,53,50,56,58,48,61,60,67,69,71)
	MR_init_label10(check_hlds__inst_match__inst_matches_initial_4_5_0,39,76,75,82,84,85,80,455,91,213)
	MR_init_label3(check_hlds__inst_match__inst_matches_initial_4_5_0,90,443,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_initial_4'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_matches_initial_4_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i443);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i5);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i6);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i446);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,446)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i9);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr3 = MR_r4;
	MR_tempr1 = MR_tfield(0, MR_tempr3, 5);
	if (MR_INT_NE(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tempr3;
	MR_sv(1) = MR_tfield(2, MR_r2, 1);
	MR_sv(4) = MR_tfield(2, MR_r1, 1);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr3, 4);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tfield(2, MR_tempr1, 0);
	MR_r3 = MR_tfield(2, MR_tempr2, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i11);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i15);
	}
	MR_sv(1) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i16);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_sv(1) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i21);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i25);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i27);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,27)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i449);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i443);
	}
	MR_tempr1 = MR_tfield(2, MR_r2, 1);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i443);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,449)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_sv(3) = MR_r4;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_sv(2) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(__Unify___mdbcomp__prim_data__sym_name_0_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i32);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,32)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i34);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,34)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,1);
	MR_r2 = MR_tempr1;
	MR_r3 = (MR_Word) MR_tbmkword(0, 0);
	}
	MR_np_call_localret_ent(list__duplicate_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i36);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,36)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_list_matches_initial_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,25)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i39);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i451);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,451)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i42);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(2, MR_r2, 1);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_tempr2 = MR_r4;
	MR_sv(3) = MR_tempr2;
	MR_sv(1) = MR_tfield(2, MR_r2, 0);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr2, 4);
	MR_r2 = MR_tfield(3, MR_tempr1, 1);
	MR_r3 = MR_sv(1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i44);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,44)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(3);
	MR_r1 = MR_tfield(0, MR_tempr1, 4);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(1);
	MR_r4 = MR_tfield(0, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i46);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,46)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,42)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i48);
	}
	MR_r3 = MR_tfield(3, MR_r1, 1);
	if (MR_INT_NE(MR_r3,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i50);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_sv(3) = MR_tempr1;
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_sv(4);
	MR_r2 = MR_tfield(0, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_2_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i51);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,51)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_mostly_unique_2_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i53);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,53)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,50)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_sv(3) = MR_tempr1;
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_sv(4);
	MR_r2 = MR_tfield(0, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_2_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i56);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,56)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_unique_2_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i58);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,58)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,48)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i60);
	}
	MR_sv(2) = MR_r3;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr3, 4);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tfield(3, MR_tempr1, 1);
	MR_r3 = MR_tfield(3, MR_tempr2, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i61);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,61)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_matches_initial_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,60)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(3, MR_r2, 2);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_sv(2) = MR_r3;
	MR_tempr2 = MR_r4;
	MR_sv(3) = MR_tempr2;
	MR_sv(1) = MR_tfield(3, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr2, 4);
	MR_r2 = MR_tfield(3, MR_tempr1, 1);
	MR_r3 = MR_sv(1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i67);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,67)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i69);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,69)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(3);
	MR_r1 = MR_tfield(0, MR_tempr1, 4);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(1);
	MR_r4 = MR_tfield(0, MR_tempr1, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_bound_inst_list_uniq_4_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i71);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,71)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,39)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i443);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i75);
	}
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	MR_sv(2) = MR_r3;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_sv(1) = MR_tfield(2, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr3, 4);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tfield(3, MR_tempr1, 1);
	MR_r3 = MR_tfield(2, MR_tempr2, 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i76);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,76)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,75)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i80);
	}
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	if (MR_LTAGS_TEST(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_sv(4) = MR_tfield(1, MR_tempr2, 0);
	MR_sv(5) = MR_tfield(3, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_tempr3, 4);
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(5);
	MR_r3 = MR_tfield(3, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i82);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,82)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_np_call_localret_ent(fn__set__init_0_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i84);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,84)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_tfield(0, MR_sv(3), 0);
	MR_r3 = MR_sv(1);
	MR_r4 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i85);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,85)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(5);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(check_hlds__inst_match__ground_matches_initial_bound_inst_list_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,80)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i455);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,455)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i90);
	}
	MR_sv(2) = MR_r3;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr3, 4);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tfield(3, MR_tempr1, 1);
	MR_r3 = MR_tfield(3, MR_tempr2, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__compare_uniqueness_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i91);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,91)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(6);
	MR_decr_sp(6);
	MR_np_tailcall_ent(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,213)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(6);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,90)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r1, 2);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_initial_4_5_0_i1);
	}
	MR_r1 = (MR_Word) MR_string_const("check_hlds.inst_match", 21);
	MR_r2 = (MR_Word) MR_string_const("predicate \140check_hlds.inst_match.inst_matches_initial_4\'/5", 58);
	MR_r3 = (MR_Word) MR_string_const("inst_matches_initial(ground, abstract_inst) == \?\?", 49);
	}
	MR_np_call_localret_ent(require__unexpected_3_0,
		check_hlds__inst_match__inst_matches_initial_4_5_0_i213);
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,443)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(6);
	MR_sv(6) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_matches_initial_4_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(6);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(fn__set__insert_2_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module94)
	MR_init_entry1(check_hlds__inst_match__inst_is_complete_for_type_4_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_is_complete_for_type_4_0);
	MR_init_label10(check_hlds__inst_match__inst_is_complete_for_type_4_0,60,5,7,8,40,2,15,14,16,21)
	MR_init_label6(check_hlds__inst_match__inst_is_complete_for_type_4_0,26,27,30,25,20,12)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_is_complete_for_type'/4 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_is_complete_for_type_4_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(16);
	MR_sv(16) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,60)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_complete_for_type_4_0_i2);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r3, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(1);
	}
	MR_np_call_localret_ent(set__member_2_0,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i5);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_r1) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_complete_for_type_4_0_i40);
	}
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__mode_util__inst_lookup_3_0,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i7);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(4);
	}
	MR_np_call_localret_ent(fn__set__insert_2_0,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i8);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(1);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(16);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_complete_for_type_4_0_i60);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,40)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(16);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r3,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_is_complete_for_type_4_0_i12);
	}
	MR_sv(7) = (MR_Word) MR_redoip_slot(MR_maxfr);
	MR_sv(8) = (MR_Word) MR_redofr_slot(MR_maxfr);
	MR_save_maxfr(MR_sv(9));
	MR_redofr_slot_word(MR_maxfr) = (MR_Word) MR_curfr;
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__inst_is_complete_for_type_4_0_i14);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_sv(3) = MR_tempr1;
	MR_sv(4) = MR_tfield(3, MR_r3, 2);
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__cons_id_arg_types_4_0,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i15);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_restore_maxfr(MR_sv(9));
	MR_redoip_slot_word(MR_maxfr) = MR_sv(7);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(8);
	MR_GOTO_LAB(check_hlds__inst_match__inst_is_complete_for_type_4_0_i16);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_maxfr) = MR_sv(7);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(8);
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(16);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(10) = (MR_Word) MR_redoip_slot(MR_maxfr);
	MR_sv(11) = (MR_Word) MR_redofr_slot(MR_maxfr);
	MR_save_maxfr(MR_sv(12));
	MR_redofr_slot_word(MR_maxfr) = (MR_Word) MR_curfr;
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__inst_is_complete_for_type_4_0_i20);
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(3);
	MR_np_call_localret_ent(check_hlds__type_util__cons_id_arg_types_4_0,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i21);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(13) = (MR_Word) MR_redoip_slot(MR_maxfr);
	MR_sv(14) = (MR_Word) MR_redofr_slot(MR_maxfr);
	MR_save_maxfr(MR_sv(15));
	MR_redofr_slot_word(MR_maxfr) = (MR_Word) MR_curfr;
	MR_redoip_slot_word(MR_maxfr) = (MR_Word) MR_LABEL_AP(check_hlds__inst_match__inst_is_complete_for_type_4_0_i25);
	MR_sv(3) = MR_r1;
	MR_sv(5) = MR_r2;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, bound_inst);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(list__member_2_1,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i26);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,26)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(6) = MR_tfield(0, MR_r1, 1);
	MR_r1 = MR_tfield(0, MR_r1, 0);
	MR_r2 = MR_sv(3);
	MR_np_call_localret_ent(parse_tree__prog_data__equivalent_cons_ids_2_0,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i27);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,27)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO(MR_ENTRY(MR_do_redo));
	}
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 5);
	MR_r3 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = (MR_Word) MR_COMMON(1,1);
	MR_tfield(0, MR_tempr1, 1) = (MR_Word) MR_ENTRY_AP(check_hlds__inst_match__inst_is_complete_for_type_4_0);
	MR_tfield(0, MR_tempr1, 2) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 3) = MR_sv(1);
	MR_tfield(0, MR_tempr1, 4) = MR_sv(2);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_type);
	MR_r4 = MR_sv(6);
	MR_r5 = MR_sv(5);
	}
	MR_np_call_localret_ent(list__map_3_5,
		check_hlds__inst_match__inst_is_complete_for_type_4_0_i30);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,30)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO(MR_ENTRY(MR_do_redo));
	}
	MR_restore_maxfr(MR_sv(15));
	MR_redoip_slot_word(MR_maxfr) = MR_sv(13);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(14);
	MR_GOTO(MR_ENTRY(MR_do_redo));
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,25)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_maxfr) = MR_sv(13);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(14);
	MR_restore_maxfr(MR_sv(12));
	MR_redoip_slot_word(MR_maxfr) = MR_sv(10);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(11);
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(16);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,20)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_redoip_slot_word(MR_maxfr) = MR_sv(10);
	MR_redofr_slot_word(MR_maxfr) = MR_sv(11);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(16);
MR_def_label(check_hlds__inst_match__inst_is_complete_for_type_4_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = ((MR_Integer) MR_r3 != (MR_Integer) MR_tbmkword(0, 1));
	MR_decr_sp_and_return(16);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module95)
	MR_init_entry1(check_hlds__inst_match__inst_list_matches_final_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_list_matches_final_5_0);
	MR_init_label4(check_hlds__inst_match__inst_list_matches_final_5_0,38,3,8,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_list_matches_final'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_list_matches_final_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(4);
	MR_sv(4) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_list_matches_final_5_0,38)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i1);
	}
	if (MR_LTAGS_TESTR(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i1);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(4);
MR_def_label(check_hlds__inst_match__inst_list_matches_final_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_r3,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i1);
	}
	MR_sv(1) = MR_tfield(1, MR_r1, 1);
	MR_sv(2) = MR_tfield(1, MR_r2, 1);
	MR_sv(3) = MR_tfield(1, MR_r3, 1);
	MR_r1 = MR_tfield(1, MR_r1, 0);
	MR_r2 = MR_tfield(1, MR_r2, 0);
	MR_r3 = MR_tfield(1, MR_r3, 0);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_final_2_5_0,
		check_hlds__inst_match__inst_list_matches_final_5_0_i8);
MR_def_label(check_hlds__inst_match__inst_list_matches_final_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(3);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(4);
	MR_GOTO_LAB(check_hlds__inst_match__inst_list_matches_final_5_0_i38);
	}
MR_def_label(check_hlds__inst_match__inst_list_matches_final_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(4);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module96)
	MR_init_entry1(check_hlds__inst_match__bound_inst_list_matches_final_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__bound_inst_list_matches_final_5_0);
	MR_init_label10(check_hlds__inst_match__bound_inst_list_matches_final_5_0,82,3,7,9,10,11,5,19,18,21)
	MR_init_label5(check_hlds__inst_match__bound_inst_list_matches_final_5_0,22,24,15,26,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'bound_inst_list_matches_final'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__bound_inst_list_matches_final_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(10);
	MR_sv(10) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,82)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i3);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(10);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TEST(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	MR_tempr3 = MR_tfield(1, MR_r1, 0);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 0);
	MR_sv(5) = MR_tfield(1, MR_r2, 1);
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(1, MR_r1, 1);
	MR_sv(6) = MR_tempr4;
	MR_sv(7) = MR_tfield(0, MR_tempr3, 1);
	MR_sv(8) = MR_tempr2;
	MR_sv(9) = MR_tfield(0, MR_tempr1, 1);
	MR_r1 = MR_tempr4;
	MR_r2 = MR_tempr2;
	}
	MR_np_call_localret_ent(parse_tree__prog_data__equivalent_cons_ids_2_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i7);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,7)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i5);
	}
	MR_sv(1) = MR_tfield(0, MR_sv(3), 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(7);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i9);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(6);
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_cons_id_arg_types_5_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i10);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(7);
	MR_r2 = MR_sv(9);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_list_matches_final_5_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i11);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r2;
	MR_r2 = MR_sv(5);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_tempr1;
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i82);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_sv(6);
	MR_r7 = MR_tempr1;
	MR_tempr2 = MR_sv(8);
	MR_r5 = MR_tempr2;
	if (MR_PTAG_TESTR(MR_tempr1,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i15);
	}
	if (MR_PTAG_TESTR(MR_tempr2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i15);
	}
	MR_tempr3 = MR_tfield(1, MR_tempr1, 0);
	MR_r6 = MR_tempr3;
	if (MR_PTAG_TESTR(MR_tempr3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i19);
	}
	MR_sv(4) = MR_tfield(1, MR_tempr1, 1);
	MR_r2 = MR_tfield(1, MR_tempr2, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr2, 1);
	MR_r1 = MR_tfield(1, MR_tempr3, 1);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i18);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(1, MR_r7, 1);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r5;
	MR_r2 = MR_tfield(1, MR_tempr1, 0);
	MR_sv(6) = MR_tfield(1, MR_tempr1, 1);
	MR_r1 = MR_tfield(0, MR_r6, 0);
	}
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i21);
	}
	MR_r2 = MR_tfield(1, MR_r2, 1);
	MR_np_call_localret_ent(private_builtin__builtin_compare_string_3_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i22);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,21)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_tfield(0, MR_r2, 0);
	MR_np_call_localret_ent(private_builtin__builtin_compare_string_3_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i22);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,22)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i24);
	}
	if (((MR_Integer) MR_sv(4) <= (MR_Integer) MR_sv(6))) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_r1 = MR_r7;
	MR_r2 = MR_r5;
	MR_np_call_localret_ent(__Compare___parse_tree__prog_data__cons_id_0_0,
		check_hlds__inst_match__bound_inst_list_matches_final_5_0_i26);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,26)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (((MR_Integer) 2 != (MR_Integer) MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_r2 = MR_sv(5);
	MR_succip_word = MR_sv(10);
	MR_GOTO_LAB(check_hlds__inst_match__bound_inst_list_matches_final_5_0_i82);
MR_def_label(check_hlds__inst_match__bound_inst_list_matches_final_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(10);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(set__subset_2_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module97)
	MR_init_entry1(check_hlds__inst_match__inst_matches_final_3_5_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__inst_matches_final_3_5_0);
	MR_init_label10(check_hlds__inst_match__inst_matches_final_3_5_0,5,8,3,10,14,16,13,19,18,24)
	MR_init_label10(check_hlds__inst_match__inst_matches_final_3_5_0,11,434,34,36,38,433,45,47,49,43)
	MR_init_label10(check_hlds__inst_match__inst_matches_final_3_5_0,52,51,58,60,62,247,41,68,65,64)
	MR_init_label10(check_hlds__inst_match__inst_matches_final_3_5_0,78,80,77,85,87,89,91,97,82,101)
	MR_init_label3(check_hlds__inst_match__inst_matches_final_3_5_0,103,428,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'inst_matches_final_3'/5 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__inst_matches_final_3_5_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i3);
	}
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i5);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i428);
	}
	MR_r5 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_r5,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i8);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r5,4)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i428);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i10);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_PTAG_TESTR(MR_r1,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i11);
	}
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i13);
	}
	MR_sv(1) = MR_tfield(2, MR_r2, 0);
	MR_sv(2) = MR_tfield(2, MR_r1, 0);
	MR_r1 = MR_tfield(2, MR_r1, 1);
	MR_r2 = MR_tfield(2, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__inst_match__ho_inst_info_matches_final_5_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i14);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,14)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i16);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r2 = MR_sv(1);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,13)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i18);
	}
	MR_sv(1) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i19);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,18)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_sv(1) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr2 = MR_r3;
	MR_sv(2) = MR_tempr2;
	MR_tempr3 = MR_r4;
	MR_sv(3) = MR_tempr3;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tempr2;
	MR_r2 = MR_tfield(0, MR_tempr3, 0);
	MR_r3 = MR_tfield(2, MR_tempr1, 0);
	MR_r4 = MR_tfield(2, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__maybe_any_to_bound_5_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i24);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,24)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_r2;
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i433);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i434);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(2, MR_r2, 0);
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i428);
	}
	MR_tempr1 = MR_tfield(2, MR_r2, 1);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i428);
	}
	MR_r2 = MR_r4;
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,434)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r2,3,5)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_sv(3) = MR_r4;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_sv(2) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(__Unify___mdbcomp__prim_data__sym_name_0_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i34);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,34)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_inst);
	MR_r2 = MR_sv(2);
	MR_np_call_localret_ent(fn__list__length_1_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i36);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,36)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,1);
	MR_r2 = MR_tempr1;
	MR_r3 = (MR_Word) MR_tbmkword(0, 0);
	}
	MR_np_call_localret_ent(list__duplicate_3_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i38);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,38)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(2);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_list_matches_final_5_0);
	}
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,433)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
	if (MR_RTAGS_TESTR(MR_r1,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i41);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i43);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(2, MR_r2, 1);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_sv(3) = MR_r4;
	MR_sv(1) = MR_tfield(2, MR_r2, 0);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_r2 = MR_sv(1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i45);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,45)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i47);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,47)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_or_any_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i49);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,49)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,43)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i51);
	}
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(1) = MR_tfield(3, MR_r2, 2);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i52);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,52)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__bound_inst_list_matches_final_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,51)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_tfield(3, MR_r2, 2);
	if (MR_LTAGS_TESTR(MR_tempr1,0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(1) = MR_tfield(3, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r1, 2);
	MR_r1 = MR_tfield(3, MR_r1, 1);
	MR_r2 = MR_sv(1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i58);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,58)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_3_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i60);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,60)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_tfield(0, MR_sv(3), 0);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_matches_uniq_3_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i62);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,62)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,247)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_sv(3);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,41)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i64);
	}
	MR_sv(1) = MR_tfield(3, MR_r1, 2);
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i65);
	}
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_r4;
	MR_sv(4) = MR_tfield(3, MR_r2, 2);
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r2 = MR_tfield(3, MR_r2, 1);
	MR_r3 = MR_tfield(3, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(set__subset_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i68);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,68)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(2);
	MR_r4 = MR_sv(3);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,65)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_sv(1);
	MR_succip_word = MR_sv(7);
	MR_decr_sp(7);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,64)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	if (MR_PTAG_TESTR(MR_r2,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i77);
	}
	MR_sv(1) = MR_tfield(2, MR_r2, 0);
	MR_sv(6) = MR_tfield(3, MR_r1, 1);
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_r2 = MR_tfield(2, MR_r2, 1);
	MR_np_call_localret_ent(check_hlds__inst_match__ho_inst_info_matches_final_5_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i78);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,78)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = MR_sv(6);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i80);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,80)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r2 = MR_sv(1);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,77)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i82);
	}
	MR_sv(6) = MR_tfield(3, MR_r1, 1);
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr3 = MR_r4;
	MR_tempr1 = MR_tfield(0, MR_tempr3, 0);
	MR_sv(4) = MR_tfield(3, MR_r2, 2);
	MR_sv(1) = MR_tfield(3, MR_r2, 1);
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tempr3;
	MR_sv(5) = MR_tempr1;
	MR_tempr2 = MR_r1;
	MR_r1 = MR_tempr1;
	MR_r2 = MR_tfield(3, MR_tempr2, 2);
	}
	MR_np_call_localret_ent(check_hlds__inst_util__ho_inst_info_is_nonstandard_func_mode_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i85);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,85)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_r1) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_sv(2);
	MR_tempr2 = MR_sv(3);
	MR_tempr3 = MR_sv(5);
	MR_r1 = MR_sv(6);
	MR_r2 = MR_sv(1);
	}
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i87);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,87)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(5);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_ground_3_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i89);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,89)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r1 = MR_sv(6);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_sv(5);
	MR_np_call_localret_ent(check_hlds__inst_match__uniq_matches_bound_inst_list_3_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i91);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,91)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	if (MR_LTAGS_TEST(MR_sv(2),0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i247);
	}
	MR_sv(1) = MR_tfield(1, MR_sv(2), 0);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_np_call_localret_ent(fn__set__init_0_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i97);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,97)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r2 = MR_sv(5);
	MR_r3 = MR_sv(4);
	MR_r4 = MR_sv(1);
	MR_np_call_localret_ent(check_hlds__inst_match__bound_inst_list_is_complete_for_type_4_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i247);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,82)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_sv(1) = MR_tfield(3, MR_r2, 1);
	MR_sv(6) = MR_tfield(3, MR_r1, 1);
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_r2 = MR_tfield(3, MR_r2, 2);
	MR_np_call_localret_ent(check_hlds__inst_match__ho_inst_info_matches_final_5_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i101);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,101)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = MR_sv(6);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__unique_matches_final_2_0,
		check_hlds__inst_match__inst_matches_final_3_5_0_i103);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,103)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__inst_matches_final_3_5_0_i1);
	}
	MR_r2 = MR_sv(1);
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(7);
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,428)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(7);
	MR_sv(7) = (MR_Word) MR_succip;
MR_def_label(check_hlds__inst_match__inst_matches_final_3_5_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(7);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module98)
	MR_init_entry1(__Unify___check_hlds__inst_match__calculate_sub_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__calculate_sub_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__calculate_sub_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_r1 == MR_r2);
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(private_builtin__builtin_compare_int_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module99)
	MR_init_entry1(__Compare___check_hlds__inst_match__calculate_sub_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__calculate_sub_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__calculate_sub_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(private_builtin__builtin_compare_int_3_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Unify___set_tree234__set_tree234_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module100)
	MR_init_entry1(__Unify___check_hlds__inst_match__expansions_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__expansions_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__expansions_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_tempr2;
	MR_np_tailcall_ent(__Unify___set_tree234__set_tree234_1_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Compare___set_tree234__set_tree234_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module101)
	MR_init_entry1(__Compare___check_hlds__inst_match__expansions_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__expansions_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__expansions_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_tempr2;
	MR_np_tailcall_ent(__Compare___set_tree234__set_tree234_1_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Unify___hlds__hlds_module__module_info_0_0);
MR_decl_entry(__Unify___maybe__maybe_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module102)
	MR_init_entry1(__Unify___check_hlds__inst_match__inst_match_info_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__inst_match_info_0_0);
	MR_init_label5(__Unify___check_hlds__inst_match__inst_match_info_0_0,4,6,10,12,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__inst_match_info_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if ((MR_r1 == MR_r2)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_info_0_0_i12);
	}
	MR_incr_sp(11);
	MR_sv(11) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_tfield(0, MR_tempr1, 1);
	MR_tempr2 = MR_sv(2);
	MR_sv(2) = MR_tfield(0, MR_tempr1, 2);
	MR_sv(3) = MR_tfield(0, MR_tempr1, 3);
	MR_sv(4) = MR_tfield(0, MR_tempr1, 4);
	MR_sv(5) = MR_tfield(0, MR_tempr1, 5);
	MR_sv(6) = MR_tfield(0, MR_tempr2, 1);
	MR_sv(7) = MR_tfield(0, MR_tempr2, 2);
	MR_sv(8) = MR_tfield(0, MR_tempr2, 3);
	MR_sv(9) = MR_tfield(0, MR_tempr2, 4);
	MR_sv(10) = MR_tfield(0, MR_tempr2, 5);
	MR_r1 = MR_tfield(0, MR_tempr1, 0);
	MR_r2 = MR_tfield(0, MR_tempr2, 0);
	}
	MR_np_call_localret_ent(__Unify___hlds__hlds_module__module_info_0_0,
		__Unify___check_hlds__inst_match__inst_match_info_0_0_i4);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_info_0_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_info_0_0_i1);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(6);
	MR_np_call_localret_ent(__Unify___set_tree234__set_tree234_1_0,
		__Unify___check_hlds__inst_match__inst_match_info_0_0_i6);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_info_0_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_info_0_0_i1);
	}
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,2,0);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(7);
	MR_np_call_localret_ent(__Unify___maybe__maybe_1_0,
		__Unify___check_hlds__inst_match__inst_match_info_0_0_i10);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_info_0_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_info_0_0_i1);
	}
	if ((MR_sv(3) != MR_sv(8))) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_info_0_0_i1);
	}
	if ((MR_sv(4) != MR_sv(9))) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_info_0_0_i1);
	}
	MR_r1 = (MR_sv(5) == MR_sv(10));
	MR_decr_sp_and_return(11);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_info_0_0,12)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(__Unify___check_hlds__inst_match__inst_match_info_0_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(11);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Compare___hlds__hlds_module__module_info_0_0);
MR_decl_entry(__Compare___maybe__maybe_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module103)
	MR_init_entry1(__Compare___check_hlds__inst_match__inst_match_info_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__inst_match_info_0_0);
	MR_init_label8(__Compare___check_hlds__inst_match__inst_match_info_0_0,3,2,5,9,15,19,23,73)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__inst_match_info_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if ((MR_r1 == MR_r2)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i3);
	}
	MR_incr_sp(11);
	MR_sv(11) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i2);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Integer) 0;
	MR_proceed();
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4, MR_tempr5, MR_tempr6;
	MR_tempr5 = MR_sv(2);
	MR_sv(10) = MR_tfield(0, MR_tempr5, 5);
	MR_sv(9) = MR_tfield(0, MR_tempr5, 4);
	MR_sv(8) = MR_tfield(0, MR_tempr5, 3);
	MR_sv(7) = MR_tfield(0, MR_tempr5, 2);
	MR_sv(6) = MR_tfield(0, MR_tempr5, 1);
	MR_tempr6 = MR_sv(1);
	MR_sv(5) = MR_tfield(0, MR_tempr6, 5);
	MR_sv(4) = MR_tfield(0, MR_tempr6, 4);
	MR_sv(3) = MR_tfield(0, MR_tempr6, 3);
	MR_tempr1 = MR_tfield(0, MR_tempr6, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr6, 1);
	MR_tempr3 = MR_tempr6;
	MR_sv(1) = MR_tempr2;
	MR_tempr4 = MR_tempr5;
	MR_sv(2) = MR_tempr1;
	MR_r1 = MR_tfield(0, MR_tempr3, 0);
	MR_r2 = MR_tfield(0, MR_tempr4, 0);
	}
	MR_np_call_localret_ent(__Compare___hlds__hlds_module__module_info_0_0,
		__Compare___check_hlds__inst_match__inst_match_info_0_0_i5);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i73);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_inputs);
	MR_r2 = MR_sv(1);
	MR_r3 = MR_sv(6);
	MR_np_call_localret_ent(__Compare___set_tree234__set_tree234_1_0,
		__Compare___check_hlds__inst_match__inst_match_info_0_0_i9);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i73);
	}
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,2,0);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(7);
	MR_np_call_localret_ent(__Compare___maybe__maybe_1_0,
		__Compare___check_hlds__inst_match__inst_match_info_0_0_i15);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,15)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i73);
	}
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(8);
	MR_np_call_localret_ent(private_builtin__builtin_compare_int_3_0,
		__Compare___check_hlds__inst_match__inst_match_info_0_0_i19);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,19)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i73);
	}
	MR_r1 = MR_sv(4);
	MR_r2 = MR_sv(9);
	MR_np_call_localret_ent(private_builtin__builtin_compare_int_3_0,
		__Compare___check_hlds__inst_match__inst_match_info_0_0_i23);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,23)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_info_0_0_i73);
	}
	MR_r1 = MR_sv(5);
	MR_r2 = MR_sv(10);
	MR_succip_word = MR_sv(11);
	MR_decr_sp(11);
	MR_np_tailcall_ent(private_builtin__builtin_compare_int_3_0);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_info_0_0,73)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_decr_sp_and_return(11);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module104)
	MR_init_entry1(__Unify___check_hlds__inst_match__inst_match_inputs_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__inst_match_inputs_0_0);
	MR_init_label4(__Unify___check_hlds__inst_match__inst_match_inputs_0_0,4,6,10,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__inst_match_inputs_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if ((MR_r1 == MR_r2)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_inputs_0_0_i10);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_tfield(0, MR_tempr1, 1);
	MR_tempr2 = MR_sv(2);
	MR_sv(2) = MR_tfield(0, MR_tempr1, 2);
	MR_sv(3) = MR_tfield(0, MR_tempr2, 1);
	MR_sv(4) = MR_tfield(0, MR_tempr2, 2);
	MR_r1 = MR_tfield(0, MR_tempr1, 0);
	MR_r2 = MR_tfield(0, MR_tempr2, 0);
	}
	MR_np_call_localret_ent(__Unify___parse_tree__prog_data__mer_inst_0_0,
		__Unify___check_hlds__inst_match__inst_match_inputs_0_0_i4);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_inputs_0_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_inputs_0_0_i1);
	}
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(3);
	MR_np_call_localret_ent(__Unify___parse_tree__prog_data__mer_inst_0_0,
		__Unify___check_hlds__inst_match__inst_match_inputs_0_0_i6);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_inputs_0_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(__Unify___check_hlds__inst_match__inst_match_inputs_0_0_i1);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_type);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(4);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(__Unify___maybe__maybe_1_0);
MR_def_label(__Unify___check_hlds__inst_match__inst_match_inputs_0_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(__Unify___check_hlds__inst_match__inst_match_inputs_0_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Compare___parse_tree__prog_data__mer_inst_0_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module105)
	MR_init_entry1(__Compare___check_hlds__inst_match__inst_match_inputs_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__inst_match_inputs_0_0);
	MR_init_label5(__Compare___check_hlds__inst_match__inst_match_inputs_0_0,3,2,5,9,29)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__inst_match_inputs_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if ((MR_r1 == MR_r2)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_inputs_0_0_i3);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r2;
	MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_inputs_0_0_i2);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_inputs_0_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_Integer) 0;
	MR_proceed();
MR_def_label(__Compare___check_hlds__inst_match__inst_match_inputs_0_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4, MR_tempr5, MR_tempr6;
	MR_tempr5 = MR_sv(2);
	MR_sv(4) = MR_tfield(0, MR_tempr5, 2);
	MR_sv(3) = MR_tfield(0, MR_tempr5, 1);
	MR_tempr6 = MR_sv(1);
	MR_tempr1 = MR_tfield(0, MR_tempr6, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr6, 1);
	MR_tempr3 = MR_tempr6;
	MR_sv(1) = MR_tempr2;
	MR_tempr4 = MR_tempr5;
	MR_sv(2) = MR_tempr1;
	MR_r1 = MR_tfield(0, MR_tempr3, 0);
	MR_r2 = MR_tfield(0, MR_tempr4, 0);
	}
	MR_np_call_localret_ent(__Compare___parse_tree__prog_data__mer_inst_0_0,
		__Compare___check_hlds__inst_match__inst_match_inputs_0_0_i5);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_inputs_0_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_inputs_0_0_i29);
	}
	MR_r1 = MR_sv(1);
	MR_r2 = MR_sv(3);
	MR_np_call_localret_ent(__Compare___parse_tree__prog_data__mer_inst_0_0,
		__Compare___check_hlds__inst_match__inst_match_inputs_0_0_i9);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_inputs_0_0,9)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r1,0)) {
		MR_GOTO_LAB(__Compare___check_hlds__inst_match__inst_match_inputs_0_0_i29);
	}
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_type);
	MR_r2 = MR_sv(2);
	MR_r3 = MR_sv(4);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(__Compare___maybe__maybe_1_0);
MR_def_label(__Compare___check_hlds__inst_match__inst_match_inputs_0_0,29)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(private_builtin__builtin_unify_pred_2_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module106)
	MR_init_entry1(__Unify___check_hlds__inst_match__inst_matches_pred_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__inst_matches_pred_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__inst_matches_pred_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(private_builtin__builtin_unify_pred_2_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(private_builtin__builtin_compare_pred_3_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module107)
	MR_init_entry1(__Compare___check_hlds__inst_match__inst_matches_pred_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__inst_matches_pred_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__inst_matches_pred_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(private_builtin__builtin_compare_pred_3_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Unify___set_ordlist__set_ordlist_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module108)
	MR_init_entry1(__Unify___check_hlds__inst_match__inst_names_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__inst_names_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__inst_names_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_tempr2;
	MR_np_tailcall_ent(__Unify___set_ordlist__set_ordlist_1_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(__Compare___set_ordlist__set_ordlist_1_0);

MR_BEGIN_MODULE(check_hlds__inst_match_module109)
	MR_init_entry1(__Compare___check_hlds__inst_match__inst_names_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__inst_names_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__inst_names_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, inst_name);
	MR_tempr2 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_tempr2;
	MR_np_tailcall_ent(__Compare___set_ordlist__set_ordlist_1_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module110)
	MR_init_entry1(__Unify___check_hlds__inst_match__uniqueness_comparison_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Unify___check_hlds__inst_match__uniqueness_comparison_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Unify__'/2 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Unify___check_hlds__inst_match__uniqueness_comparison_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = (MR_r1 == MR_r2);
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module111)
	MR_init_entry1(__Compare___check_hlds__inst_match__uniqueness_comparison_0_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury____Compare___check_hlds__inst_match__uniqueness_comparison_0_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for '__Compare__'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(__Compare___check_hlds__inst_match__uniqueness_comparison_0_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(private_builtin__builtin_compare_int_3_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module112)
	MR_init_entry1(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__handle_inst_var_subs__ho1_7_0);
	MR_init_label2(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0,3,6)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'handle_inst_var_subs__ho1'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r5 = MR_tfield(0, MR_r4, 3);
	if (MR_INT_NE(MR_r5,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0_i3);
	}
	MR_np_tailcall_ent(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r5,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0_i6);
	}
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_3_5_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs__ho1_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module113)
	MR_init_entry1(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__handle_inst_var_subs__ho3_7_0);
	MR_init_label2(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0,3,6)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'handle_inst_var_subs__ho3'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r5 = MR_tfield(0, MR_r4, 3);
	if (MR_INT_NE(MR_r5,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0_i3);
	}
	MR_np_tailcall_ent(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r5,2)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0_i6);
	}
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_4_5_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs__ho3_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

MR_decl_entry(check_hlds__inst_util__abstractly_unify_inst_8_0);
MR_decl_entry(set__fold_4_3);

MR_BEGIN_MODULE(check_hlds__inst_match_module114)
	MR_init_entry1(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0);
	MR_init_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,4,6,10,2,63,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'handle_inst_var_subs_2__ho5'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i2);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tfield(3, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__inst_match__swap_args__ho12_6_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i4);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = (MR_Integer) 1;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(4);
	MR_r4 = (MR_Integer) 1;
	MR_r5 = MR_tfield(0, MR_sv(1), 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_util__abstractly_unify_inst_8_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i6);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r3 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_r4;
	MR_tempr2 = MR_sv(1);
	MR_tfield(0, MR_tempr1, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	if (MR_LTAGS_TESTR(MR_tfield(0, MR_tempr1, 2),0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i10);
	}
	MR_r2 = MR_tempr1;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 5);
	MR_tfield(0, MR_tempr1, 0) = (MR_Word) MR_COMMON(3,0);
	MR_tfield(0, MR_tempr1, 1) = (MR_Word) MR_ENTRY_AP(check_hlds__inst_match__update_inst_var_sub_2_5_0);
	MR_tfield(0, MR_tempr1, 2) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 3) = MR_r2;
	MR_tfield(0, MR_tempr1, 4) = MR_sv(2);
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info);
	MR_tempr2 = MR_r3;
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_r5 = MR_tempr2;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(set__fold_4_3);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0_i63);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__swap_args__ho12_6_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,63)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(check_hlds__inst_match__swap_args__ho11_6_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho5_7_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module115)
	MR_init_entry1(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0);
	MR_init_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,4,6,10,2,63,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'handle_inst_var_subs_2__ho6'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i2);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tfield(3, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_initial_2_5_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i4);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = (MR_Integer) 1;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(4);
	MR_r4 = (MR_Integer) 1;
	MR_r5 = MR_tfield(0, MR_sv(1), 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_util__abstractly_unify_inst_8_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i6);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r3 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_r4;
	MR_tempr2 = MR_sv(1);
	MR_tfield(0, MR_tempr1, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	if (MR_LTAGS_TESTR(MR_tfield(0, MR_tempr1, 2),0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i10);
	}
	MR_r2 = MR_tempr1;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 5);
	MR_tfield(0, MR_tempr1, 0) = (MR_Word) MR_COMMON(3,1);
	MR_tfield(0, MR_tempr1, 1) = (MR_Word) MR_ENTRY_AP(check_hlds__inst_match__update_inst_var_sub_2_5_0);
	MR_tfield(0, MR_tempr1, 2) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 3) = MR_r2;
	MR_tfield(0, MR_tempr1, 4) = MR_sv(2);
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info);
	MR_tempr2 = MR_r3;
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_r5 = MR_tempr2;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(set__fold_4_3);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0_i63);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_2_5_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,63)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_4_5_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho6_7_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module116)
	MR_init_entry1(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0);
	MR_init_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,4,6,10,2,63,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'handle_inst_var_subs_2__ho7'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i2);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tfield(3, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__inst_match__swap_args__ho10_6_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i4);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = (MR_Integer) 1;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(4);
	MR_r4 = (MR_Integer) 1;
	MR_r5 = MR_tfield(0, MR_sv(1), 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_util__abstractly_unify_inst_8_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i6);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r3 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_r4;
	MR_tempr2 = MR_sv(1);
	MR_tfield(0, MR_tempr1, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	if (MR_LTAGS_TESTR(MR_tfield(0, MR_tempr1, 2),0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i10);
	}
	MR_r2 = MR_tempr1;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 5);
	MR_tfield(0, MR_tempr1, 0) = (MR_Word) MR_COMMON(3,2);
	MR_tfield(0, MR_tempr1, 1) = (MR_Word) MR_ENTRY_AP(check_hlds__inst_match__update_inst_var_sub_2_5_0);
	MR_tfield(0, MR_tempr1, 2) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 3) = MR_r2;
	MR_tfield(0, MR_tempr1, 4) = MR_sv(2);
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info);
	MR_tempr2 = MR_r3;
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_r5 = MR_tempr2;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(set__fold_4_3);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0_i63);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__swap_args__ho10_6_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,63)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(check_hlds__inst_match__swap_args__ho9_6_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho7_7_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module117)
	MR_init_entry1(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0);
	MR_init_label6(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,4,6,10,2,63,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'handle_inst_var_subs_2__ho8'/7 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r2,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i2);
	}
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	MR_sv(1) = MR_r1;
	MR_sv(2) = MR_r3;
	MR_sv(3) = MR_tfield(3, MR_r2, 1);
	MR_sv(4) = MR_tfield(3, MR_r2, 2);
	MR_r2 = MR_sv(4);
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_final_2_5_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i4);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_sv(1);
	MR_sv(1) = MR_r2;
	MR_r1 = (MR_Integer) 1;
	MR_r2 = MR_tempr1;
	MR_r3 = MR_sv(4);
	MR_r4 = (MR_Integer) 1;
	MR_r5 = MR_tfield(0, MR_sv(1), 0);
	}
	MR_np_call_localret_ent(check_hlds__inst_util__abstractly_unify_inst_8_0,
		check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i6);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i1);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_r3 = MR_tempr1;
	MR_tfield(0, MR_tempr1, 0) = MR_r4;
	MR_tempr2 = MR_sv(1);
	MR_tfield(0, MR_tempr1, 1) = MR_tfield(0, MR_tempr2, 1);
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_tempr2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_tfield(0, MR_tempr2, 3);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_tempr2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_tempr2, 5);
	if (MR_LTAGS_TESTR(MR_tfield(0, MR_tempr1, 2),0,0)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i10);
	}
	MR_r2 = MR_tempr1;
	MR_r1 = MR_TRUE;
	MR_decr_sp_and_return(5);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 5);
	MR_tfield(0, MR_tempr1, 0) = (MR_Word) MR_COMMON(3,3);
	MR_tfield(0, MR_tempr1, 1) = (MR_Word) MR_ENTRY_AP(check_hlds__inst_match__update_inst_var_sub_2_5_0);
	MR_tfield(0, MR_tempr1, 2) = (MR_Integer) 2;
	MR_tfield(0, MR_tempr1, 3) = MR_r2;
	MR_tfield(0, MR_tempr1, 4) = MR_sv(2);
	MR_r1 = (MR_Word) MR_TAG_COMMON(0,0,2);
	MR_r2 = (MR_Word) MR_CTOR0_ADDR(check_hlds__inst_match, inst_match_info);
	MR_tempr2 = MR_r3;
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(3);
	MR_r5 = MR_tempr2;
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(set__fold_4_3);
	}
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_RTAGS_TESTR(MR_r1,3,3)) {
		MR_GOTO_LAB(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0_i63);
	}
	MR_r1 = MR_tfield(3, MR_r1, 2);
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,63)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_3_5_0);
MR_def_label(check_hlds__inst_match__handle_inst_var_subs_2__ho8_7_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_r1 = MR_FALSE;
	MR_decr_sp_and_return(5);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module118)
	MR_init_entry1(check_hlds__inst_match__swap_args__ho9_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__swap_args__ho9_6_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'swap_args__ho9'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__swap_args__ho9_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_3_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module119)
	MR_init_entry1(check_hlds__inst_match__swap_args__ho10_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__swap_args__ho10_6_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'swap_args__ho10'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__swap_args__ho10_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_final_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module120)
	MR_init_entry1(check_hlds__inst_match__swap_args__ho11_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__swap_args__ho11_6_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'swap_args__ho11'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__swap_args__ho11_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_4_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module121)
	MR_init_entry1(check_hlds__inst_match__swap_args__ho12_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__check_hlds__inst_match__swap_args__ho12_6_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'swap_args__ho12'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(check_hlds__inst_match__swap_args__ho12_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_r2;
	MR_r2 = MR_tempr1;
	MR_np_tailcall_ent(check_hlds__inst_match__inst_matches_initial_2_5_0);
	}
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module122)
	MR_init_entry1(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_111_100_101_95_108_105_115_116_95_99_111_110_116_97_105_110_115_95_105_110_115_116_95_118_97_114_95_95_91_50_93_95_48_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_111_100_101_95_108_105_115_116_95_99_111_110_116_97_105_110_115_95_105_110_115_116_95_118_97_114_95_95_91_50_93_95_48_3_0);
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'UnusedArgs__pred__mode_list_contains_inst_var__[2]_0'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_define_entry(mercury__f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_111_100_101_95_108_105_115_116_95_99_111_110_116_97_105_110_115_95_105_110_115_116_95_118_97_114_95_95_91_50_93_95_48_3_0);
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_tailcall_ent(check_hlds__inst_match__mode_list_contains_inst_var_2_0);
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module123)
	MR_init_entry1(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0);
	MR_init_label8(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,5,3,10,11,8,16,17,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'UnusedArgs__pred__ho_inst_info_matches_initial__[3]_0'/6 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(5);
	MR_sv(5) = (MR_Word) MR_succip;
	if (MR_LTAGS_TESTR(MR_r2,0,0)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i3);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr2 = MR_r4;
	MR_sv(2) = MR_tempr2;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_tfield(0, MR_tempr2, 0);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_util__ho_inst_info_is_nonstandard_func_mode_2_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i5);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,5)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_r1) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i1);
	}
	MR_r2 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_r1 = MR_TRUE;
	MR_proceed();
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_LTAGS_TESTR(MR_r1,0,0)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i8);
	}
	{
	MR_Word MR_tempr1, MR_tempr2;
	MR_tempr1 = MR_tfield(1, MR_r2, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	if (MR_INT_NE(MR_tempr2,1)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i1);
	}
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_r4;
	MR_sv(3) = MR_tempr1;
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_tfield(0, MR_tempr1, 1);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i10);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,10)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_np_call_localret_ent(fn__check_hlds__inst_util__pred_inst_info_standard_func_mode_1_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i11);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,11)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr1 = MR_tfield(0, MR_r1, 0);
	MR_tempr3 = MR_sv(3);
	MR_tempr2 = MR_tfield(0, MR_tempr3, 0);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i1);
	}
	MR_tempr1 = MR_tfield(0, MR_r1, 2);
	MR_tempr2 = MR_tfield(0, MR_tempr3, 2);
	if ((MR_tempr1 != MR_tempr2)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i1);
	}
	MR_tempr1 = MR_tempr3;
	MR_sv(3) = MR_tfield(0, MR_r1, 1);
	MR_sv(4) = MR_tfield(0, MR_tempr1, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(3);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i16);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,8)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3, MR_tempr4;
	MR_tempr1 = MR_tfield(1, MR_r1, 0);
	MR_tempr2 = MR_tfield(0, MR_tempr1, 0);
	MR_tempr3 = MR_tfield(1, MR_r2, 0);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 0);
	if ((MR_tempr2 != MR_tempr4)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i1);
	}
	MR_tempr2 = MR_tfield(0, MR_tempr1, 2);
	MR_tempr4 = MR_tfield(0, MR_tempr3, 2);
	if ((MR_tempr2 != MR_tempr4)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i1);
	}
	MR_sv(1) = MR_r3;
	MR_sv(2) = MR_r4;
	MR_sv(3) = MR_tfield(0, MR_tempr1, 1);
	MR_sv(4) = MR_tfield(0, MR_tempr3, 1);
	MR_r1 = (MR_Word) MR_CTOR0_ADDR(parse_tree__prog_data, mer_mode);
	MR_r2 = MR_sv(3);
	}
	MR_np_call_localret_ent(fn__list__length_1_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i16);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,16)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(1);
	MR_r2 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__type_util__maybe_get_higher_order_arg_types_3_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0_i17);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,17)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r1;
	MR_r1 = MR_sv(3);
	MR_r2 = MR_sv(4);
	MR_r3 = MR_tempr1;
	MR_r4 = MR_sv(2);
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_np_tailcall_ent(check_hlds__inst_match__pred_inst_argmodes_matches_5_0);
	}
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_104_111_95_105_110_115_116_95_105_110_102_111_95_109_97_116_99_104_101_115_95_105_110_105_116_105_97_108_95_95_91_51_93_95_48_6_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(5);
	MR_decr_sp(5);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE


MR_BEGIN_MODULE(check_hlds__inst_match_module124)
	MR_init_entry1(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0);
	MR_INIT_PROC_LAYOUT_ADDR(mercury__f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0);
	MR_init_label5(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,3,4,2,6,1)
MR_BEGIN_CODE

/*-------------------------------------------------------------------------*/
/* code for 'UnusedArgs__pred__swap_sub__ho2__[4]_0'/3 mode 0 */
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_local_thread_engine_base
#endif
MR_def_static(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_incr_sp(2);
	MR_sv(2) = (MR_Word) MR_succip;
	{
	MR_Word MR_tempr1, MR_tempr2, MR_tempr3;
	MR_tempr3 = MR_r4;
	MR_tempr1 = MR_tfield(0, MR_tempr3, 3);
	MR_r5 = MR_tempr1;
	if (MR_INT_NE(MR_tempr1,0)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0_i3);
	}
	MR_sv(1) = MR_tempr1;
	MR_tempr2 = MR_tempr3;
	MR_r10 = MR_tempr2;
	MR_r4 = (MR_Integer) 1;
	MR_r5 = MR_tfield(0, MR_tempr2, 0);
	MR_r6 = MR_tfield(0, MR_tempr2, 1);
	MR_r7 = MR_tfield(0, MR_tempr2, 2);
	MR_r8 = MR_tfield(0, MR_tempr2, 4);
	MR_r9 = MR_tfield(0, MR_tempr2, 5);
	MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0_i2);
	}
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,3)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (MR_INT_NE(MR_r5,2)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0_i4);
	}
	MR_sv(1) = MR_r5;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_r10 = MR_tempr1;
	MR_r4 = (MR_Integer) 2;
	MR_r5 = MR_tfield(0, MR_tempr1, 0);
	MR_r6 = MR_tfield(0, MR_tempr1, 1);
	MR_r7 = MR_tfield(0, MR_tempr1, 2);
	MR_r8 = MR_tfield(0, MR_tempr1, 4);
	MR_r9 = MR_tfield(0, MR_tempr1, 5);
	MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0_i2);
	}
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,4)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_sv(1) = MR_r5;
	{
	MR_Word MR_tempr1;
	MR_tempr1 = MR_r4;
	MR_r4 = (MR_Integer) 0;
	MR_r5 = MR_tfield(0, MR_tempr1, 0);
	MR_r6 = MR_tfield(0, MR_tempr1, 1);
	MR_r7 = MR_tfield(0, MR_tempr1, 2);
	MR_r8 = MR_tfield(0, MR_tempr1, 4);
	MR_r9 = MR_tfield(0, MR_tempr1, 5);
	}
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,2)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_tfield(0, MR_tempr1, 0) = MR_r5;
	MR_tfield(0, MR_tempr1, 1) = MR_r6;
	MR_tfield(0, MR_tempr1, 2) = MR_r7;
	MR_tfield(0, MR_tempr1, 3) = MR_r4;
	MR_tfield(0, MR_tempr1, 4) = MR_r8;
	MR_tfield(0, MR_tempr1, 5) = MR_r9;
	MR_r4 = MR_tempr1;
	}
	MR_np_call_localret_ent(check_hlds__inst_match__inst_matches_final_2_5_0,
		f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0_i6);
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,6)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	if (!(MR_r1)) {
		MR_GOTO_LAB(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0_i1);
	}
	{
	MR_Word MR_tempr1;
	MR_tag_alloc_heap(MR_tempr1, 0, (MR_Integer) 6);
	MR_tfield(0, MR_tempr1, 0) = MR_tfield(0, MR_r2, 0);
	MR_tfield(0, MR_tempr1, 1) = MR_tfield(0, MR_r2, 1);
	MR_tfield(0, MR_tempr1, 2) = MR_tfield(0, MR_r2, 2);
	MR_tfield(0, MR_tempr1, 3) = MR_sv(1);
	MR_tfield(0, MR_tempr1, 4) = MR_tfield(0, MR_r2, 4);
	MR_tfield(0, MR_tempr1, 5) = MR_tfield(0, MR_r2, 5);
	MR_r2 = MR_tempr1;
	MR_succip_word = MR_sv(2);
	MR_decr_sp(2);
	MR_r1 = MR_TRUE;
	MR_proceed();
	}
MR_def_label(f_99_104_101_99_107_95_104_108_100_115_95_95_105_110_115_116_95_109_97_116_99_104_95_95_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_115_119_97_112_95_115_117_98_95_95_104_111_50_95_95_91_52_93_95_48_3_0,1)
	MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
	MR_succip_word = MR_sv(2);
	MR_decr_sp(2);
	MR_r1 = MR_FALSE;
	MR_proceed();
#ifdef MR_maybe_local_thread_engine_base
	#undef MR_maybe_local_thread_engine_base
	#define MR_maybe_local_thread_engine_base MR_thread_engine_base
#endif
MR_END_MODULE

static void mercury__check_hlds__inst_match_maybe_bunch_0(void)
{
	check_hlds__inst_match_module0();
	check_hlds__inst_match_module1();
	check_hlds__inst_match_module2();
	check_hlds__inst_match_module3();
	check_hlds__inst_match_module4();
	check_hlds__inst_match_module5();
	check_hlds__inst_match_module6();
	check_hlds__inst_match_module7();
	check_hlds__inst_match_module8();
	check_hlds__inst_match_module9();
	check_hlds__inst_match_module10();
	check_hlds__inst_match_module11();
	check_hlds__inst_match_module12();
	check_hlds__inst_match_module13();
	check_hlds__inst_match_module14();
	check_hlds__inst_match_module15();
	check_hlds__inst_match_module16();
	check_hlds__inst_match_module17();
	check_hlds__inst_match_module18();
	check_hlds__inst_match_module19();
	check_hlds__inst_match_module20();
	check_hlds__inst_match_module21();
	check_hlds__inst_match_module22();
	check_hlds__inst_match_module23();
	check_hlds__inst_match_module24();
	check_hlds__inst_match_module25();
	check_hlds__inst_match_module26();
	check_hlds__inst_match_module27();
	check_hlds__inst_match_module28();
	check_hlds__inst_match_module29();
	check_hlds__inst_match_module30();
	check_hlds__inst_match_module31();
	check_hlds__inst_match_module32();
	check_hlds__inst_match_module33();
	check_hlds__inst_match_module34();
	check_hlds__inst_match_module35();
	check_hlds__inst_match_module36();
	check_hlds__inst_match_module37();
	check_hlds__inst_match_module38();
	check_hlds__inst_match_module39();
}

static void mercury__check_hlds__inst_match_maybe_bunch_1(void)
{
	check_hlds__inst_match_module40();
	check_hlds__inst_match_module41();
	check_hlds__inst_match_module42();
	check_hlds__inst_match_module43();
	check_hlds__inst_match_module44();
	check_hlds__inst_match_module45();
	check_hlds__inst_match_module46();
	check_hlds__inst_match_module47();
	check_hlds__inst_match_module48();
	check_hlds__inst_match_module49();
	check_hlds__inst_match_module50();
	check_hlds__inst_match_module51();
	check_hlds__inst_match_module52();
	check_hlds__inst_match_module53();
	check_hlds__inst_match_module54();
	check_hlds__inst_match_module55();
	check_hlds__inst_match_module56();
	check_hlds__inst_match_module57();
	check_hlds__inst_match_module58();
	check_hlds__inst_match_module59();
	check_hlds__inst_match_module60();
	check_hlds__inst_match_module61();
	check_hlds__inst_match_module62();
	check_hlds__inst_match_module63();
	check_hlds__inst_match_module64();
	check_hlds__inst_match_module65();
	check_hlds__inst_match_module66();
	check_hlds__inst_match_module67();
	check_hlds__inst_match_module68();
	check_hlds__inst_match_module69();
	check_hlds__inst_match_module70();
	check_hlds__inst_match_module71();
	check_hlds__inst_match_module72();
	check_hlds__inst_match_module73();
	check_hlds__inst_match_module74();
	check_hlds__inst_match_module75();
	check_hlds__inst_match_module76();
	check_hlds__inst_match_module77();
	check_hlds__inst_match_module78();
	check_hlds__inst_match_module79();
}

static void mercury__check_hlds__inst_match_maybe_bunch_2(void)
{
	check_hlds__inst_match_module80();
	check_hlds__inst_match_module81();
	check_hlds__inst_match_module82();
	check_hlds__inst_match_module83();
	check_hlds__inst_match_module84();
	check_hlds__inst_match_module85();
	check_hlds__inst_match_module86();
	check_hlds__inst_match_module87();
	check_hlds__inst_match_module88();
	check_hlds__inst_match_module89();
	check_hlds__inst_match_module90();
	check_hlds__inst_match_module91();
	check_hlds__inst_match_module92();
	check_hlds__inst_match_module93();
	check_hlds__inst_match_module94();
	check_hlds__inst_match_module95();
	check_hlds__inst_match_module96();
	check_hlds__inst_match_module97();
	check_hlds__inst_match_module98();
	check_hlds__inst_match_module99();
	check_hlds__inst_match_module100();
	check_hlds__inst_match_module101();
	check_hlds__inst_match_module102();
	check_hlds__inst_match_module103();
	check_hlds__inst_match_module104();
	check_hlds__inst_match_module105();
	check_hlds__inst_match_module106();
	check_hlds__inst_match_module107();
	check_hlds__inst_match_module108();
	check_hlds__inst_match_module109();
	check_hlds__inst_match_module110();
	check_hlds__inst_match_module111();
	check_hlds__inst_match_module112();
	check_hlds__inst_match_module113();
	check_hlds__inst_match_module114();
	check_hlds__inst_match_module115();
	check_hlds__inst_match_module116();
	check_hlds__inst_match_module117();
	check_hlds__inst_match_module118();
	check_hlds__inst_match_module119();
}

static void mercury__check_hlds__inst_match_maybe_bunch_3(void)
{
	check_hlds__inst_match_module120();
	check_hlds__inst_match_module121();
	check_hlds__inst_match_module122();
	check_hlds__inst_match_module123();
	check_hlds__inst_match_module124();
}

/* suppress gcc -Wmissing-decls warnings */
void mercury__check_hlds__inst_match__init(void);
void mercury__check_hlds__inst_match__init_type_tables(void);
void mercury__check_hlds__inst_match__init_debugger(void);
#ifdef MR_DEEP_PROFILING
void mercury__check_hlds__inst_match__write_out_proc_statics(FILE *deep_fp, FILE *procrep_fp);
#endif
#ifdef MR_RECORD_TERM_SIZES
void mercury__check_hlds__inst_match__init_complexity_procs(void);
#endif
#ifdef MR_THREADSCOPE
void mercury__check_hlds__inst_match__init_threadscope_string_table(void);
#endif

void mercury__check_hlds__inst_match__init(void)
{
	static MR_bool done = MR_FALSE;
	if (done) {
		return;
	}
	done = MR_TRUE;
	mercury__check_hlds__inst_match_maybe_bunch_0();
	mercury__check_hlds__inst_match_maybe_bunch_1();
	mercury__check_hlds__inst_match_maybe_bunch_2();
	mercury__check_hlds__inst_match_maybe_bunch_3();
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_calculate_sub_0,
		check_hlds__inst_match__calculate_sub_0_0);
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_expansions_0,
		check_hlds__inst_match__expansions_0_0);
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0,
		check_hlds__inst_match__inst_match_info_0_0);
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_inputs_0,
		check_hlds__inst_match__inst_match_inputs_0_0);
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_inst_matches_pred_0,
		check_hlds__inst_match__inst_matches_pred_0_0);
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_inst_names_0,
		check_hlds__inst_match__inst_names_0_0);
	MR_INIT_TYPE_CTOR_INFO(
		mercury_data_check_hlds__inst_match__type_ctor_info_uniqueness_comparison_0,
		check_hlds__inst_match__uniqueness_comparison_0_0);
	mercury__check_hlds__inst_match__init_debugger();
}

void mercury__check_hlds__inst_match__init_type_tables(void)
{
	static MR_bool done = MR_FALSE;
	if (done) {
		return;
	}
	done = MR_TRUE;
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_calculate_sub_0);
	}
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_expansions_0);
	}
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_info_0);
	}
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_inst_match_inputs_0);
	}
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_inst_matches_pred_0);
	}
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_inst_names_0);
	}
	{
		MR_register_type_ctor_info(
		&mercury_data_check_hlds__inst_match__type_ctor_info_uniqueness_comparison_0);
	}
}


void mercury__check_hlds__inst_match__init_debugger(void)
{
	static MR_bool done = MR_FALSE;
	if (done) {
		return;
	}
	done = MR_TRUE;
}

#ifdef MR_DEEP_PROFILING

void mercury__check_hlds__inst_match__write_out_proc_statics(FILE *deep_fp, FILE *procrep_fp)
{
	MR_write_out_module_proc_reps_start(procrep_fp, &mercury_data__module_common_layout__check_hlds__inst_match);
	MR_write_out_module_proc_reps_end(procrep_fp);
}

#endif

#ifdef MR_RECORD_TERM_SIZES

void mercury__check_hlds__inst_match__init_complexity_procs(void)
{
}

#endif

#ifdef MR_THREADSCOPE

void mercury__check_hlds__inst_match__init_threadscope_string_table(void)
{
}

#endif

/* ensure everything is compiled with the same grade */
static const void *const MR_grade = &MR_GRADE_VAR;
