/*
** Automatically generated from `hlds_goal.m'
** by the Mercury compiler,
** version rotd-2026-07-19
** configured for x86_64-pc-linux-gnu.
** Do not edit.
**
** The autoconfigured grade settings governing
** the generation of this C file were
**
** TAG_BITS=2
** UNBOXED_FLOAT=no
** UNBOXED_INT64S=no
** PREGENERATED_DIST=yes
** HIGHLEVEL_CODE=yes
**
** END_OF_C_GRADE_INFO
*/


// :- module hlds.hlds_goal.
// :- implementation.

/*
INIT mercury__hlds__hlds_goal__init
ENDINIT
*/

#include "hlds.hlds_goal.mih"


#include "analysis.mih"
#include "array.mih"
#include "assoc_list.mih"
#include "bimap.mih"
#include "bitmap.mih"
#include "bool.mih"
#include "builtin.mih"
#include "char.mih"
#include "check_hlds.mih"
#include "construct.mih"
#include "cord.mih"
#include "deconstruct.mih"
#include "enum.mih"
#include "hlds.mih"
#include "io.mih"
#include "libs.mih"
#include "list.mih"
#include "map.mih"
#include "maybe.mih"
#include "mdbcomp.mih"
#include "mode_robdd.mih"
#include "one_or_more.mih"
#include "one_or_more_map.mih"
#include "ops.mih"
#include "pair.mih"
#include "parse_tree.mih"
#include "pretty_printer.mih"
#include "private_builtin.mih"
#include "require.mih"
#include "robdd.mih"
#include "set.mih"
#include "set_ordlist.mih"
#include "sparse_bitset.mih"
#include "stack.mih"
#include "stream.mih"
#include "string.mih"
#include "term.mih"
#include "term_context.mih"
#include "time.mih"
#include "transform_hlds.mih"
#include "tree234.mih"
#include "type_desc.mih"
#include "unit.mih"
#include "univ.mih"
#include "varset.mih"
#include "analysis.framework.mih"
#include "check_hlds.mode_constraint_robdd.mih"
#include "check_hlds.mode_errors.mih"
#include "check_hlds.mode_info.mih"
#include "hlds.goal_mode.mih"
#include "hlds.hlds_class.mih"
#include "hlds.hlds_clauses.mih"
#include "hlds.hlds_cons.mih"
#include "hlds.hlds_data.mih"
#include "hlds.hlds_llds.mih"
#include "hlds.hlds_markers.mih"
#include "hlds.hlds_module.mih"
#include "hlds.hlds_pred.mih"
#include "hlds.hlds_promise.mih"
#include "hlds.hlds_rtti.mih"
#include "hlds.inst_graph.mih"
#include "hlds.instmap.mih"
#include "hlds.pred_name.mih"
#include "hlds.pred_table.mih"
#include "hlds.status.mih"
#include "libs.compiler_util.mih"
#include "libs.file_util.mih"
#include "libs.globals.mih"
#include "libs.polyhedron.mih"
#include "libs.rat.mih"
#include "mdbcomp.goal_path.mih"
#include "mdbcomp.prim_data.mih"
#include "mdbcomp.program_representation.mih"
#include "mdbcomp.sym_name.mih"
#include "mode_robdd.tfeirn.mih"
#include "parse_tree.error_spec.mih"
#include "parse_tree.prog_data.mih"
#include "parse_tree.prog_data_foreign.mih"
#include "parse_tree.prog_data_pragma.mih"
#include "parse_tree.prog_detism.mih"
#include "parse_tree.prog_item.mih"
#include "parse_tree.prog_rename.mih"
#include "parse_tree.set_of_var.mih"
#include "parse_tree.var_db.mih"
#include "parse_tree.var_table.mih"
#include "string.format.mih"
#include "string.parse_util.mih"
#include "transform_hlds.term_constr_errors.mih"
#include "transform_hlds.term_constr_main_types.mih"
#include "transform_hlds.term_errors.mih"
#include "transform_hlds.term_util.mih"




static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_PseudoTypeInfo_Struct2 hlds__hlds_goal__pair__pti_pair_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_PseudoTypeInfo_Struct2 hlds__hlds_goal__tree234__pti_tree234_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_PseudoTypeInfo_Struct1 hlds__hlds_goal__sparse_bitset__pti_sparse_bitset_1__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_1;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_2;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_atomic_goal_type_0[3];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_atomic_goal_type_0[3];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_atomic_goal_type_0[3];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_atomic_interface_vars_0_0[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_atomic_interface_vars_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_atomic_interface_vars_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_atomic_interface_vars_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_atomic_interface_vars_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_atomic_interface_vars_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_atomic_interface_vars_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_builtin_state_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_builtin_state_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_builtin_state_0[2];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_call_unify_context_0_0[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_call_unify_context_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_call_unify_context_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_call_unify_context_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_call_unify_context_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_call_unify_context_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_can_cgc_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_can_cgc_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_can_cgc_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_cons_id_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_case_0_0[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_case_0_0[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_case_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_case_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_case_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_case_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_case_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_case_id_0[1];

static const MR_NotagFunctorDesc hlds__hlds_goal__hlds__hlds_goal__notag_functor_desc_case_id_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_1;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_2;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_3;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_4;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_cast_kind_0[5];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_cast_kind_0[5];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cast_kind_0[5];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_catch_part_0_0[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_catch_part_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_catch_part_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_catch_part_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_catch_part_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_catch_part_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_catch_part_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_cell_is_unique_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_cell_is_unique_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cell_is_unique_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_needs_update_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_cell_to_reuse_0_0[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_cell_to_reuse_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_cell_to_reuse_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_cell_to_reuse_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_cell_to_reuse_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cell_to_reuse_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_conj_type_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_conj_type_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_conj_type_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_int_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1list__ti_list_1builtin__type_ctor_info_int_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_term_size_value_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_construct_sub_info_0_0[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_construct_sub_info_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_0;

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_1;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_construct_sub_info_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_construct_sub_info_0_1[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_construct_sub_info_0[2];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_construct_sub_info_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_construct_sub_info_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_contains_trace_goal_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_contains_trace_goal_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_contains_trace_goal_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_ctgc_goal_info_0_0[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_ctgc_goal_info_0_0[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_ctgc_goal_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_ctgc_goal_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_ctgc_goal_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_ctgc_goal_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_ctgc_goal_info_0[1];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_dp_coverage_goal_info_0_0[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_dp_coverage_goal_info_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_coverage_goal_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_dp_coverage_goal_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_dp_coverage_goal_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_dp_coverage_goal_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_dp_coverage_goal_info_0[1];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_dp_goal_info_0_0[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_dp_goal_info_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_goal_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_dp_goal_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_dp_goal_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_dp_goal_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_dp_goal_info_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_force_pruning_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_force_pruning_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_force_pruning_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data_foreign__type_ctor_info_foreign_arg_name_mode_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_foreign_arg_0_0[4];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_foreign_arg_0_0[4];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_foreign_arg_0_0[4];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_foreign_arg_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_foreign_arg_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_foreign_arg_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_foreign_arg_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_foreign_arg_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_1;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_2;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_3;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_from_ground_term_kind_0[4];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_from_ground_term_kind_0[4];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_from_ground_term_kind_0[4];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_0[5];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_0[5];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_generic_call_0_0[5];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_1[4];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_1[4];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_1;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_2[1];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_2[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_2;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_3[1];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_3[1];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_generic_call_0_3[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_3;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_3[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_generic_call_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_generic_call_0[4];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_generic_call_0[4];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_goal_is_mdprof_inst_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_goal_is_mdprof_inst_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_goal_is_mdprof_inst_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_goal_trivial_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_goal_trivial_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_goal_trivial_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_higher_order_syntax_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_higher_order_syntax_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_higher_order_syntax_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0;

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_0_0[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_0[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_code_gen_info_0_1[1];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_code_gen_info_0_1[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_1;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_code_gen_info_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_code_gen_info_0_1[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_code_gen_info_0[2];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_code_gen_info_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_code_gen_info_0[2];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_0[5];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_0[5];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_call_unify_context_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_1[6];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_1[6];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_1[6];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_1;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_mer_mode_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_2[5];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_2[5];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_2[5];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_2;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_foreign_arg_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_3[7];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_3[7];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_3;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_hlds_goal_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_4[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_4[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_4;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_5[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_5;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_case_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_6[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_6[3];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_6[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_6;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_7[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_7;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_8[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_8[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_8;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_9[4];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_9[4];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_9;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_10[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_10;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_3[8];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_expr_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_expr_0[11];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_expr_0[11];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_dp_goal_info_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_extra_info_0_0[8];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_extra_info_0_0[8];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_extra_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_extra_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_extra_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_extra_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_extra_info_0[1];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__set_ordlist__ti_set_ordlist_1hlds__hlds_markers__type_ctor_info_goal_feature_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_info_0_0[8];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_info_0_0[8];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_info_0_0[8];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_info_0[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_1[1];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_how_to_construct_0_1[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_1;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_2[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_2;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_3[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_3;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_3[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_how_to_construct_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_how_to_construct_0[4];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_how_to_construct_0[4];

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__tree234__ti_tree234_2mdbcomp__goal_path__type_ctor_info_goal_id_0list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_conditional_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_conditional_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_conditional_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_exist_constr_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_exist_constr_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_exist_constr_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_first_disjunct_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_first_disjunct_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_first_disjunct_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_lc_use_parent_stack_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_lc_use_parent_stack_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_lc_use_parent_stack_0[2];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_mode_constr_goal_info_0_0[5];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_mode_constr_goal_info_0_0[5];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_mode_constr_goal_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_mode_constr_goal_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_mode_constr_goal_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_mode_constr_goal_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_mode_constr_goal_info_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_needs_update_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_needs_update_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_needs_update_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_port_counts_give_coverage_after_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_port_counts_give_coverage_after_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_port_counts_give_coverage_after_0[2];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_1;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_2;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_promise_solutions_kind_0[3];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_promise_solutions_kind_0[3];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_promise_solutions_kind_0[3];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_quant_creator_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_quant_creator_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_quant_creator_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_rbmm_goal_info_0_0[5];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_rbmm_goal_info_0_0[5];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_rbmm_goal_info_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_rbmm_goal_info_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_rbmm_goal_info_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_rbmm_goal_info_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_rbmm_goal_info_0[1];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_removable_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_removable_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_removable_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_0;

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_1;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_string_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_2[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_2;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_3[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_3;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_4[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_4;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_0[2];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_3[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_reuse_description_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_reuse_description_0[5];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_reuse_description_0[5];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_0[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_goal_warning_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_1[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_1[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_1;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_2[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_2[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_2;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_3[1];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_3[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_3;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_4[1];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_4[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_4;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_5[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_5;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_6[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_6[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_6;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_7[1];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_7[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_7;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_8[1];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_8[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_8;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_9[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_9[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_9;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_compiletime_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_compiletime_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1builtin__type_ctor_info_string_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_10[5];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_scope_reason_0_10[5];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_10;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_11[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_scope_reason_0_11[3];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_11[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_11;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_3[9];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_scope_reason_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_scope_reason_0[12];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_scope_reason_0[12];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_short_reuse_description_0_1[4];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_short_reuse_description_0_1[4];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_1;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_short_reuse_description_0_2[2];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_short_reuse_description_0_2[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_2;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_2[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_short_reuse_description_0[3];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_short_reuse_description_0[3];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_short_reuse_description_0[3];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_1[7];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_shorthand_goal_expr_0_1[7];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_shorthand_goal_expr_0_1[7];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_1;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_try_io_state_vars_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_2[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_shorthand_goal_expr_0_2[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_2;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_2[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_shorthand_goal_expr_0[3];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_shorthand_goal_expr_0[3];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_shorthand_goal_expr_0[3];

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_0;

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_1;

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_static_how_0[2];

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_static_how_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_static_how_0[2];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_data__type_ctor_info_tagged_cons_id_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_tagged_case_0_0[4];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_tagged_case_0_0[4];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_tagged_case_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_tagged_case_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_tagged_case_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_tagged_case_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_tagged_case_0[1];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_term_size_value_0_0[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_term_size_value_0_1[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_1;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_term_size_value_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_term_size_value_0_1[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_term_size_value_0[2];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_term_size_value_0[2];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_term_size_value_0[2];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_trace_mutable_var_hlds_0_0[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_trace_mutable_var_hlds_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_trace_mutable_var_hlds_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_trace_mutable_var_hlds_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_trace_mutable_var_hlds_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_trace_mutable_var_hlds_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_trace_mutable_var_hlds_0[1];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_try_io_state_vars_0_0[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_try_io_state_vars_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_try_io_state_vars_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_try_io_state_vars_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_try_io_state_vars_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_try_io_state_vars_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_try_io_state_vars_0[1];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_mode_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_0[7];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_0[7];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_0[7];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_1[6];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_1[6];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_1[6];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_1;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_2[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_2[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_2;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_3[2];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_3[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_3;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_4[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_4[3];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_4[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_4;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_3[2];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unification_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unification_0[5];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unification_0[5];

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_sub_context_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_context_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_context_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_context_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_context_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_context_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_context_0[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_1[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_1;

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_2;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_3[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_3;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_4[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_4;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_0[2];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_2[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_3[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_main_context_0[4];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_main_context_0[5];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_main_context_0[5];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_mode_0_0[4];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_mode_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_mode_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_mode_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_mode_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_mode_0[1];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_0[1];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_1[3];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unify_rhs_0_1[3];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unify_rhs_0_1[3];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_1;

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0parse_tree__prog_data__type_ctor_info_mer_mode_0;

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0parse_tree__prog_data__type_ctor_info_mer_mode_0;

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_2[7];

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unify_rhs_0_2[7];

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unify_rhs_0_2[7];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_2;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_1[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_2[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_rhs_0[3];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_rhs_0[3];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_rhs_0[3];

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_sub_context_0_0[2];

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_sub_context_0_0;

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_sub_context_0_0[1];

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_sub_context_0[1];

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_sub_context_0[1];

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_sub_context_0[1];

static void MR_CALL 
hlds__hlds_goal__IntroducedFrom__pred__goal_list_purity__2989__1_3_p_0(
  MR_Word LambdaHeadVar__1_12,
  MR_Word LambdaHeadVar__2_13,
  MR_Word * LambdaHeadVar__3_14);

static void MR_CALL 
hlds__hlds_goal__IntroducedFrom__pred__goal_list_determinism__2980__1_3_p_0(
  MR_Word LambdaHeadVar__1_12,
  MR_Word LambdaHeadVar__2_13,
  MR_Word * LambdaHeadVar__3_14);

static void MR_CALL 
hlds__hlds_goal__IntroducedFrom__pred__goal_list_instmap_delta__2970__1_3_p_0(
  MR_Word LambdaHeadVar__1_13,
  MR_Word LambdaHeadVar__2_14,
  MR_Word * LambdaHeadVar__3_15);

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_extra_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_extra_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2);

static void MR_CALL 
hlds__hlds_goal__set_case_contexts_3_p_0(
  MR_Word Context_4,
  MR_Word Case0_5,
  MR_Word * Case_6);

static void MR_CALL 
hlds__hlds_goal__follow_subn_until_fixpoint_3_p_0(
  MR_Word HeadVar__1_1,
  MR_Word STATE_VARIABLE_Subn_0_13,
  MR_Word * STATE_VARIABLE_Subn_14);

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal__goal_list_purity_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3);

static void MR_CALL 
hlds__hlds_goal__goal_list_determinism_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3);

static void MR_CALL 
hlds__hlds_goal__goal_list_instmap_delta_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3);

static MR_Box MR_CALL 
hlds__hlds_goal__goal_list_nonlocals_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1);

static MR_bool MR_CALL 
hlds__hlds_goal__all_negated_2_p_0(
  MR_Word HeadVar__1_1,
  MR_Word * HeadVar__2_2);

static void MR_CALL 
hlds__hlds_goal__incremental_rename_var_in_unify_rhs_4_p_0(
  MR_Word Subn_5,
  MR_Word SubnUpdates_6,
  MR_Word RHS0_7,
  MR_Word * RHS_8);

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goal_expr_4_p_0(
  MR_Word Subn_5,
  MR_Word SubnUpdates_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8);

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_cases_4_p_0(
  MR_Word Subn_1,
  MR_Word SubnUpdates_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4);

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goals_4_p_0(
  MR_Word Subn_1,
  MR_Word SubnUpdates_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4);

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3);

static void MR_CALL 
hlds__hlds_goal__rename_var_in_call_unify_context_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word MaybeCallUnifyContext0_7,
  MR_Word * MaybeCallUnifyContext_8);

static void MR_CALL 
hlds__hlds_goal__rename_var_in_unify_rhs_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word RHS0_7,
  MR_Word * RHS_8);

static void MR_CALL 
hlds__hlds_goal__rename_vars_in_cases_4_p_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4);

static void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Goal0_7,
  MR_Word * Goal_8);

static void MR_CALL 
hlds__hlds_goal__rename_generic_call_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Call0_7,
  MR_Word * Call_8);

static void MR_CALL 
hlds__hlds_goal__rename_var_in_unify_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Unify0_7,
  MR_Word * Unify_8);

static void MR_CALL 
hlds__hlds_goal__rename_arg_list_4_p_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____atomic_goal_type_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____atomic_goal_type_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____atomic_interface_vars_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____atomic_interface_vars_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____builtin_state_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____builtin_state_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____call_unify_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____call_unify_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____can_cgc_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____can_cgc_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____case_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____case_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____case_id_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____case_id_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____cast_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____cast_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____catch_part_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____catch_part_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____cell_is_unique_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____cell_is_unique_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____cell_to_reuse_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____cell_to_reuse_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____conj_type_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____conj_type_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____construct_sub_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____construct_sub_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____contains_trace_goal_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____contains_trace_goal_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____ctgc_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____ctgc_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____dp_coverage_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____dp_coverage_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____dp_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____dp_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____force_pruning_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____force_pruning_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____foreign_arg_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____foreign_arg_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____from_ground_term_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____from_ground_term_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____generic_call_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____generic_call_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____goal_is_mdprof_inst_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____goal_is_mdprof_inst_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____goal_trivial_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____goal_trivial_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____higher_order_syntax_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____higher_order_syntax_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____higher_order_value_map_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____higher_order_value_map_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_code_gen_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_code_gen_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_expr_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_expr_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_extra_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_extra_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____how_to_construct_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____how_to_construct_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____incremental_rename_map_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____incremental_rename_map_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_conditional_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____is_conditional_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_exist_constr_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____is_exist_constr_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_first_disjunct_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____is_first_disjunct_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____lc_use_parent_stack_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____lc_use_parent_stack_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____missed_message_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____missed_message_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____mode_constr_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____mode_constr_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____needs_update_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____needs_update_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____port_counts_give_coverage_after_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____port_counts_give_coverage_after_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____promise_solutions_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____promise_solutions_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____quant_creator_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____quant_creator_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____rbmm_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____rbmm_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____removable_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____removable_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____reuse_description_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____reuse_description_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____scope_reason_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____scope_reason_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____short_reuse_description_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____short_reuse_description_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____shorthand_goal_expr_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____shorthand_goal_expr_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____static_how_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____static_how_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____tagged_case_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____tagged_case_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____term_size_value_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____term_size_value_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____trace_mutable_var_hlds_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____trace_mutable_var_hlds_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____try_io_state_vars_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____try_io_state_vars_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unification_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____unification_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____unify_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_main_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____unify_main_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_mode_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____unify_mode_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_rhs_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____unify_rhs_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_sub_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2);

static void MR_CALL 
hlds__hlds_goal____Compare____unify_sub_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3);


static /* final */ const MR_Box hlds__hlds_goal_scalar_common_1[38][2];

static /* final */ const MR_Box hlds__hlds_goal_scalar_common_2[10][3];

static /* final */ const MR_Box hlds__hlds_goal_scalar_common_3[6][6];

static /* final */ const MR_Box hlds__hlds_goal_scalar_common_4[1][5];




static /* final */ const MR_Box hlds__hlds_goal_scalar_common_1[38][2] = {
  /* row   0 */
  {
    ((MR_Box) (&mercury__term__term__type_ctor_info_var_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0))
  },
  /* row   1 */
  {
    ((MR_Box) (&mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1)),
    ((MR_Box) (&hlds__hlds_pred__hlds__hlds_pred__type_ctor_info_pred_proc_id_0))
  },
  /* row   2 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_2[1]))
  },
  /* row   3 */
  {
    ((MR_Box) (&parse_tree__set_of_var__parse_tree__set_of_var__type_ctor_info_set_of_var_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0))
  },
  /* row   4 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0))
  },
  /* row   5 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_needs_update_0))
  },
  /* row   6 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0))
  },
  /* row   7 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[6]))
  },
  /* row   8 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_term_size_value_0))
  },
  /* row   9 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0))
  },
  /* row  10 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&parse_tree__prog_data_foreign__parse_tree__prog_data_foreign__type_ctor_info_foreign_arg_name_mode_0))
  },
  /* row  11 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0]))
  },
  /* row  12 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0))
  },
  /* row  13 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0))
  },
  /* row  14 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_foreign_arg_0))
  },
  /* row  15 */
  {
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_expr_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_runtime_0))
  },
  /* row  16 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[15]))
  },
  /* row  17 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0))
  },
  /* row  18 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_call_unify_context_0))
  },
  /* row  19 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0))
  },
  /* row  20 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0))
  },
  /* row  21 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0))
  },
  /* row  22 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_goal_info_0))
  },
  /* row  23 */
  {
    ((MR_Box) (&mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1)),
    ((MR_Box) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0))
  },
  /* row  24 */
  {
    ((MR_Box) (&mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0]))
  },
  /* row  25 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
  /* row  26 */
  {
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_expr_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_compiletime_0))
  },
  /* row  27 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[26]))
  },
  /* row  28 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
  /* row  29 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0))
  },
  /* row  30 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_goal_warning_0))
  },
  /* row  31 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_try_io_state_vars_0))
  },
  /* row  32 */
  {
    ((MR_Box) (&mercury__maybe__maybe__type_ctor_info_maybe_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[11]))
  },
  /* row  33 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0))
  },
  /* row  34 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_data__hlds__hlds_data__type_ctor_info_tagged_cons_id_0))
  },
  /* row  35 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_mode_0))
  },
  /* row  36 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_sub_context_0))
  },
  /* row  37 */
  {
    ((MR_Box) (&mercury__list__list__type_ctor_info_list_1)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_2[4]))
  },
};

static /* final */ const MR_Box hlds__hlds_goal_scalar_common_2[10][3] = {
  /* row   0 */
  {
    ((MR_Box) (&mercury__tree234__tree234__type_ctor_info_tree234_2)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0])),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[1]))
  },
  /* row   1 */
  {
    ((MR_Box) (&mercury__pair__pair__type_ctor_info_pair_2)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0])),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0]))
  },
  /* row   2 */
  {
    ((MR_Box) (&mercury__tree234__tree234__type_ctor_info_tree234_2)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0])),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0]))
  },
  /* row   3 */
  {
    ((MR_Box) (&mercury__tree234__tree234__type_ctor_info_tree234_2)),
    ((MR_Box) (&mdbcomp__goal_path__mdbcomp__goal_path__type_ctor_info_goal_id_0)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[2]))
  },
  /* row   4 */
  {
    ((MR_Box) (&mercury__pair__pair__type_ctor_info_pair_2)),
    ((MR_Box) (&hlds__hlds_goal_scalar_common_1[0])),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0))
  },
  /* row   5 */
  {
    ((MR_Box) (&hlds__hlds_goal_scalar_common_3[0])),
    ((MR_Box) (hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   6 */
  {
    ((MR_Box) (&hlds__hlds_goal_scalar_common_4[0])),
    ((MR_Box) (hlds__hlds_goal__goal_list_nonlocals_2_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   7 */
  {
    ((MR_Box) (&hlds__hlds_goal_scalar_common_3[1])),
    ((MR_Box) (hlds__hlds_goal__goal_list_instmap_delta_2_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   8 */
  {
    ((MR_Box) (&hlds__hlds_goal_scalar_common_3[2])),
    ((MR_Box) (hlds__hlds_goal__goal_list_determinism_2_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   9 */
  {
    ((MR_Box) (&hlds__hlds_goal_scalar_common_3[3])),
    ((MR_Box) (hlds__hlds_goal__goal_list_purity_2_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
};

static /* final */ const MR_Box hlds__hlds_goal_scalar_common_3[6][6] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&hlds__hlds_goal__pair__pti_pair_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)),
    ((MR_Box) (&hlds__hlds_goal__tree234__pti_tree234_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)),
    ((MR_Box) (&hlds__hlds_goal__tree234__pti_tree234_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0))
  },
  /* row   1 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)),
    ((MR_Box) (&hlds__instmap__hlds__instmap__type_ctor_info_instmap_0)),
    ((MR_Box) (&hlds__instmap__hlds__instmap__type_ctor_info_instmap_0))
  },
  /* row   2 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0))
  },
  /* row   3 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0))
  },
  /* row   4 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&mercury__term_context__term_context__type_ctor_info_term_context_0)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0))
  },
  /* row   5 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&mercury__term_context__term_context__type_ctor_info_term_context_0)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0))
  },
};

static /* final */ const MR_Box hlds__hlds_goal_scalar_common_4[1][5] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)),
    ((MR_Box) (&hlds__hlds_goal__sparse_bitset__pti_sparse_bitset_1__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0))
  },
};



#include "array.mh"
#include "bitmap.mh"
#include "io.mh"
#include "string.mh"
#include "time.mh"
#include "io.stream_ops.mh"


static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__term__term__type_ctor_info_var_1,
  { (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_FA_PseudoTypeInfo_Struct2 hlds__hlds_goal__pair__pti_pair_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__pair__pair__type_ctor_info_pair_2,
  {
    (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
    (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
  }
};

static const MR_FA_PseudoTypeInfo_Struct2 hlds__hlds_goal__tree234__pti_tree234_2__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__tree234__tree234__type_ctor_info_tree234_2,
  {
    (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
    (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
  }
};

static const MR_FA_PseudoTypeInfo_Struct1 hlds__hlds_goal__sparse_bitset__pti_sparse_bitset_1__plain_term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__sparse_bitset__sparse_bitset__type_ctor_info_sparse_bitset_1,
  { (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_0 = {
  (MR_String) "unknown_atomic_goal_type",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_1 = {
  (MR_String) "top_level_atomic_goal",
  INT32_C(1)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_2 = {
  (MR_String) "nested_atomic_goal",
  INT32_C(2)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_atomic_goal_type_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_2
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_atomic_goal_type_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_atomic_goal_type_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_atomic_goal_type_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_goal_type_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____atomic_goal_type_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____atomic_goal_type_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "atomic_goal_type",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_atomic_goal_type_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_atomic_goal_type_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_atomic_goal_type_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_atomic_interface_vars_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_atomic_interface_vars_0_0[2] = {
  (MR_String) "atomic_initial",
  (MR_String) "atomic_final"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_atomic_interface_vars_0_0 = {
  (MR_String) "atomic_interface_vars",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_atomic_interface_vars_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_atomic_interface_vars_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_atomic_interface_vars_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_atomic_interface_vars_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_atomic_interface_vars_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_atomic_interface_vars_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_atomic_interface_vars_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_atomic_interface_vars_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_atomic_interface_vars_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____atomic_interface_vars_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____atomic_interface_vars_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "atomic_interface_vars",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_atomic_interface_vars_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_atomic_interface_vars_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_atomic_interface_vars_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_0 = {
  (MR_String) "inline_builtin",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_1 = {
  (MR_String) "not_builtin",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_builtin_state_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_builtin_state_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_builtin_state_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_builtin_state_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_builtin_state_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____builtin_state_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____builtin_state_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "builtin_state",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_builtin_state_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_builtin_state_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_builtin_state_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_call_unify_context_0_0[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_rhs_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_context_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_call_unify_context_0_0 = {
  (MR_String) "call_unify_context",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_call_unify_context_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_call_unify_context_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_call_unify_context_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_call_unify_context_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_call_unify_context_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_call_unify_context_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_call_unify_context_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_call_unify_context_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_call_unify_context_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____call_unify_context_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____call_unify_context_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "call_unify_context",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_call_unify_context_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_call_unify_context_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_call_unify_context_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_0 = {
  (MR_String) "can_cgc",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_1 = {
  (MR_String) "cannot_cgc",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_can_cgc_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_can_cgc_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_can_cgc_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_can_cgc_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_can_cgc_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____can_cgc_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____can_cgc_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "can_cgc",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_can_cgc_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_can_cgc_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_can_cgc_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_cons_id_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_case_0_0[3] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_case_0_0[3] = {
  (MR_String) "case_first_functor",
  (MR_String) "case_later_functors",
  (MR_String) "case_goal"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_case_0_0 = {
  (MR_String) "case",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_case_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_case_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_case_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_case_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_case_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_case_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_case_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_case_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_case_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____case_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____case_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "case",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_case_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_case_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_case_0,

};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_case_id_0[1] = { (MR_Integer) 0 };

static const MR_NotagFunctorDesc hlds__hlds_goal__hlds__hlds_goal__notag_functor_desc_case_id_0 = {
  (MR_String) "case_id",
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0),
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_id_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_NOTAG_GROUND,
  ((MR_Box) (hlds__hlds_goal____Unify____case_id_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____case_id_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "case_id",
  { &hlds__hlds_goal__hlds__hlds_goal__notag_functor_desc_case_id_0 },
  { &hlds__hlds_goal__hlds__hlds_goal__notag_functor_desc_case_id_0 },
  (MR_Integer) 1,
  UINT16_C(4),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_case_id_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_0 = {
  (MR_String) "unsafe_type_cast",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_1 = {
  (MR_String) "unsafe_type_inst_cast",
  INT32_C(1)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_2 = {
  (MR_String) "equiv_type_cast",
  INT32_C(2)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_3 = {
  (MR_String) "exists_cast",
  INT32_C(3)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_4 = {
  (MR_String) "subtype_coerce",
  INT32_C(4)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_cast_kind_0[5] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_4
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_cast_kind_0[5] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_4,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cast_kind_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cast_kind_0[5] = {
  (MR_Integer) 3,
  (MR_Integer) 4,
  (MR_Integer) 0,
  (MR_Integer) 1,
  (MR_Integer) 2
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cast_kind_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____cast_kind_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____cast_kind_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "cast_kind",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_cast_kind_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_cast_kind_0 },
  (MR_Integer) 5,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cast_kind_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_catch_part_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_expr_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_catch_part_0_0[2] = {
  (MR_String) "catch_expr",
  (MR_String) "catch_goal"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_catch_part_0_0 = {
  (MR_String) "catch_part",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_catch_part_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_catch_part_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_catch_part_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_catch_part_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_catch_part_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_catch_part_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_catch_part_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_catch_part_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_catch_part_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_catch_part_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____catch_part_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____catch_part_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "catch_part",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_catch_part_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_catch_part_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_catch_part_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_0 = {
  (MR_String) "cell_is_unique",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_1 = {
  (MR_String) "cell_is_shared",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_cell_is_unique_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_cell_is_unique_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_cell_is_unique_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cell_is_unique_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cell_is_unique_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____cell_is_unique_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____cell_is_unique_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "cell_is_unique",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_cell_is_unique_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_cell_is_unique_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cell_is_unique_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_needs_update_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_needs_update_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_cell_to_reuse_0_0[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_needs_update_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_cell_to_reuse_0_0 = {
  (MR_String) "cell_to_reuse",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_cell_to_reuse_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_cell_to_reuse_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_cell_to_reuse_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_cell_to_reuse_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_cell_to_reuse_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_cell_to_reuse_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_cell_to_reuse_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cell_to_reuse_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cell_to_reuse_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____cell_to_reuse_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____cell_to_reuse_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "cell_to_reuse",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_cell_to_reuse_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_cell_to_reuse_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_cell_to_reuse_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_0 = {
  (MR_String) "plain_conj",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_1 = {
  (MR_String) "parallel_conj",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_conj_type_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_conj_type_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_conj_type_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_conj_type_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_conj_type_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____conj_type_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____conj_type_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "conj_type",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_conj_type_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_conj_type_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_conj_type_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_int_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1list__ti_list_1builtin__type_ctor_info_int_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_int_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_term_size_value_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_term_size_value_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_construct_sub_info_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1list__ti_list_1builtin__type_ctor_info_int_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_term_size_value_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_construct_sub_info_0_0[2] = {
  (MR_String) "take_address_args",
  (MR_String) "term_size_slot"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_0 = {
  (MR_String) "construct_sub_info",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_construct_sub_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_construct_sub_info_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_1 = {
  (MR_String) "no_construct_sub_info",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(1),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_construct_sub_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_construct_sub_info_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_construct_sub_info_0[2] = {
  {
    UINT32_C(1),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_construct_sub_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_construct_sub_info_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_construct_sub_info_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_construct_sub_info_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_construct_sub_info_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_construct_sub_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(2),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____construct_sub_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____construct_sub_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "construct_sub_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_construct_sub_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_construct_sub_info_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_construct_sub_info_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_0 = {
  (MR_String) "contains_trace_goal",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_1 = {
  (MR_String) "contains_no_trace_goal",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_contains_trace_goal_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_contains_trace_goal_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_contains_trace_goal_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_contains_trace_goal_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_contains_trace_goal_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____contains_trace_goal_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____contains_trace_goal_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "contains_trace_goal",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_contains_trace_goal_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_contains_trace_goal_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_contains_trace_goal_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__sparse_bitset__sparse_bitset__type_ctor_info_sparse_bitset_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_ctgc_goal_info_0_0[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_reuse_description_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_ctgc_goal_info_0_0[3] = {
  (MR_String) "ctgc_lfu",
  (MR_String) "ctgc_lbu",
  (MR_String) "ctgc_reuse"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_ctgc_goal_info_0_0 = {
  (MR_String) "ctgc_goal_info",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_ctgc_goal_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_ctgc_goal_info_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_ctgc_goal_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_ctgc_goal_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_ctgc_goal_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_ctgc_goal_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_ctgc_goal_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_ctgc_goal_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_ctgc_goal_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____ctgc_goal_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____ctgc_goal_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "ctgc_goal_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_ctgc_goal_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_ctgc_goal_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_ctgc_goal_info_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_dp_coverage_goal_info_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_goal_trivial_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_port_counts_give_coverage_after_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_dp_coverage_goal_info_0_0[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 1,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_coverage_goal_info_0_0 = {
  (MR_String) "dp_coverage_goal_info",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_dp_coverage_goal_info_0_0,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_dp_coverage_goal_info_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_dp_coverage_goal_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_coverage_goal_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_dp_coverage_goal_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_dp_coverage_goal_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_dp_coverage_goal_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_coverage_goal_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_dp_coverage_goal_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____dp_coverage_goal_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____dp_coverage_goal_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "dp_coverage_goal_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_dp_coverage_goal_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_dp_coverage_goal_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_dp_coverage_goal_info_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_dp_goal_info_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_goal_is_mdprof_inst_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_dp_goal_info_0_0[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_goal_info_0_0 = {
  (MR_String) "dp_goal_info",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_dp_goal_info_0_0,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_dp_goal_info_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_dp_goal_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_goal_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_dp_goal_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_dp_goal_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_dp_goal_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_dp_goal_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_dp_goal_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_goal_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____dp_goal_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____dp_goal_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "dp_goal_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_dp_goal_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_dp_goal_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_dp_goal_info_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_0 = {
  (MR_String) "do_not_force_pruning",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_1 = {
  (MR_String) "force_pruning",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_force_pruning_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_force_pruning_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_force_pruning_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_force_pruning_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_force_pruning_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____force_pruning_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____force_pruning_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "force_pruning",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_force_pruning_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_force_pruning_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_force_pruning_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data_foreign__type_ctor_info_foreign_arg_name_mode_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&parse_tree__prog_data_foreign__parse_tree__prog_data_foreign__type_ctor_info_foreign_arg_name_mode_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_foreign_arg_0_0[4] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data_foreign__type_ctor_info_foreign_arg_name_mode_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data_foreign__parse_tree__prog_data_foreign__type_ctor_info_box_policy_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_foreign_arg_0_0[4] = {
  (MR_String) "arg_var",
  (MR_String) "arg_name_mode",
  (MR_String) "arg_type",
  (MR_String) "arg_box_policy"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_foreign_arg_0_0[4] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_foreign_arg_0_0 = {
  (MR_String) "foreign_arg",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_foreign_arg_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_foreign_arg_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_foreign_arg_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_foreign_arg_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_foreign_arg_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_foreign_arg_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_foreign_arg_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_foreign_arg_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_foreign_arg_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_foreign_arg_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_foreign_arg_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____foreign_arg_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____foreign_arg_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "foreign_arg",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_foreign_arg_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_foreign_arg_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_foreign_arg_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_0 = {
  (MR_String) "from_ground_term_initial",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_1 = {
  (MR_String) "from_ground_term_construct",
  INT32_C(1)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_2 = {
  (MR_String) "from_ground_term_deconstruct",
  INT32_C(2)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_3 = {
  (MR_String) "from_ground_term_other",
  INT32_C(3)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_from_ground_term_kind_0[4] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_3
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_from_ground_term_kind_0[4] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_from_ground_term_kind_0_3
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_from_ground_term_kind_0[4] = {
  (MR_Integer) 2,
  (MR_Integer) 0,
  (MR_Integer) 1,
  (MR_Integer) 3
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_from_ground_term_kind_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____from_ground_term_kind_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____from_ground_term_kind_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "from_ground_term_kind",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_from_ground_term_kind_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_from_ground_term_kind_0 },
  (MR_Integer) 4,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_from_ground_term_kind_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_0[5] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0),
  (MR_PseudoTypeInfo) (&mdbcomp__prim_data__mdbcomp__prim_data__type_ctor_info_pred_or_func_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_pred_form_arity_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_higher_order_syntax_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_0[5] = {
  (MR_String) "ho_call_var",
  (MR_String) "ho_call_purity",
  (MR_String) "ho_call_kind",
  (MR_String) "ho_call_arity",
  (MR_String) "ho_syntax"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_generic_call_0_0[5] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 1,
    (MR_Integer) 2
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_0 = {
  (MR_String) "higher_order",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_generic_call_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_1[4] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_class__hlds__hlds_class__type_ctor_info_method_proc_num_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_class_id_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_pf_sym_name_arity_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_1[4] = {
  (MR_String) "method_tci",
  (MR_String) "method_num",
  (MR_String) "method_class_id",
  (MR_String) "method_name"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_1 = {
  (MR_String) "class_method",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_2[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_2[1] = { (MR_String) "event_name" };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_2 = {
  (MR_String) "event_call",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_3[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cast_kind_0) };

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_3[1] = { (MR_String) "cast_kind" };

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_generic_call_0_3[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 3
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_3 = {
  (MR_String) "cast",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(3),
  (MR_Integer) -1,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_generic_call_0_3,
  hlds__hlds_goal__hlds__hlds_goal__field_names_generic_call_0_3,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_generic_call_0_3,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_2 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_3[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_3 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_generic_call_0[4] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_generic_call_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_generic_call_0[4] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_generic_call_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_generic_call_0[4] = {
  (MR_Integer) 3,
  (MR_Integer) 1,
  (MR_Integer) 2,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_generic_call_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____generic_call_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____generic_call_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "generic_call",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_generic_call_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_generic_call_0 },
  (MR_Integer) 4,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_generic_call_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_0 = {
  (MR_String) "goal_is_mdprof_inst",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_1 = {
  (MR_String) "goal_is_not_mdprof_inst",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_goal_is_mdprof_inst_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_goal_is_mdprof_inst_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_is_mdprof_inst_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_goal_is_mdprof_inst_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_goal_is_mdprof_inst_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____goal_is_mdprof_inst_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____goal_is_mdprof_inst_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "goal_is_mdprof_inst",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_goal_is_mdprof_inst_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_goal_is_mdprof_inst_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_goal_is_mdprof_inst_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_0 = {
  (MR_String) "goal_is_trivial",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_1 = {
  (MR_String) "goal_is_nontrivial",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_goal_trivial_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_goal_trivial_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_goal_trivial_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_goal_trivial_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_goal_trivial_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____goal_trivial_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____goal_trivial_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "goal_trivial",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_goal_trivial_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_goal_trivial_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_goal_trivial_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_0 = {
  (MR_String) "hos_call_or_apply",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_1 = {
  (MR_String) "hos_var",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_higher_order_syntax_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_higher_order_syntax_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_higher_order_syntax_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_higher_order_syntax_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_higher_order_syntax_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____higher_order_syntax_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____higher_order_syntax_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "higher_order_syntax",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_higher_order_syntax_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_higher_order_syntax_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_higher_order_syntax_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0 = {
  &mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1,
  { (MR_TypeInfo) (&hlds__hlds_pred__hlds__hlds_pred__type_ctor_info_pred_proc_id_0) }
};

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0 = {
  &mercury__tree234__tree234__type_ctor_info_tree234_2,
  {
    (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
    (MR_TypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0)
  }
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_higher_order_value_map_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_EQUIV_GROUND,
  ((MR_Box) (hlds__hlds_goal____Unify____higher_order_value_map_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____higher_order_value_map_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "higher_order_value_map",
  { NULL },
  { (MR_PseudoTypeInfo) (&hlds__hlds_goal__tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0) },
  (MR_Integer) -1,
  UINT16_C(0),
  NULL,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_expr_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_info_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_0_0[2] = {
  (MR_String) "hg_expr",
  (MR_String) "hg_info"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_0_0 = {
  (MR_String) "hlds_goal",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____hlds_goal_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____hlds_goal_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "hlds_goal",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_0,

};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_0 = {
  (MR_String) "no_code_gen_info",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_code_gen_info_0_1[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_llds__hlds__hlds_llds__type_ctor_info_llds_code_gen_details_0) };

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_code_gen_info_0_1[1] = { (MR_String) "llds_code_gen" };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_1 = {
  (MR_String) "llds_code_gen_info",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_code_gen_info_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_code_gen_info_0_1,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_code_gen_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_code_gen_info_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_1 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_code_gen_info_0[2] = {
  {
    UINT32_C(1),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_code_gen_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_code_gen_info_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_code_gen_info_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_code_gen_info_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_code_gen_info_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_code_gen_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(2),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____hlds_goal_code_gen_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____hlds_goal_code_gen_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "hlds_goal_code_gen_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_code_gen_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_code_gen_info_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_code_gen_info_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_0[5] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_rhs_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_mode_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unification_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_context_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_0[5] = {
  (MR_String) "unify_lhs",
  (MR_String) "unify_rhs",
  (MR_String) "unify_mode",
  (MR_String) "unify_kind",
  (MR_String) "unify_context"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_0 = {
  (MR_String) "unify",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_call_unify_context_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_call_unify_context_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_1[6] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_pred__hlds__hlds_pred__type_ctor_info_pred_id_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_builtin_state_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_call_unify_context_0),
  (MR_PseudoTypeInfo) (&mdbcomp__sym_name__mdbcomp__sym_name__type_ctor_info_sym_name_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_1[6] = {
  (MR_String) "call_pred_id",
  (MR_String) "call_proc_id",
  (MR_String) "call_args",
  (MR_String) "call_builtin",
  (MR_String) "call_unify_context",
  (MR_String) "call_sym_name"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_1[6] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 5,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_1 = {
  (MR_String) "plain_call",
  INT16_C(6),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_mer_mode_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_2[5] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_generic_call_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_mer_mode_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_arg_reg_type_info_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_2[5] = {
  (MR_String) "gcall_details",
  (MR_String) "gcall_args",
  (MR_String) "gcall_modes",
  (MR_String) "gcall_reg_types",
  (MR_String) "gcall_detism"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_2[5] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 3
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_2 = {
  (MR_String) "generic_call",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 0,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_2,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_foreign_arg_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_foreign_arg_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0 = {
  &parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_expr_1,
  { (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_runtime_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_3[7] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data_foreign__parse_tree__prog_data_foreign__type_ctor_info_foreign_proc_attributes_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_pred__hlds__hlds_pred__type_ctor_info_pred_id_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_foreign_arg_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_foreign_arg_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data_foreign__parse_tree__prog_data_foreign__type_ctor_info_pragma_foreign_proc_impl_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_3[7] = {
  (MR_String) "foreign_attr",
  (MR_String) "foreign_pred_id",
  (MR_String) "foreign_proc_id",
  (MR_String) "foreign_args",
  (MR_String) "foreign_extra_args",
  (MR_String) "foreign_trace_cond",
  (MR_String) "foreign_impl"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_3 = {
  (MR_String) "call_foreign_proc",
  INT16_C(7),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 1,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_3,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_3,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_hlds_goal_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_4[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_conj_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_4[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_4 = {
  (MR_String) "conj",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 2,
  INT32_C(4),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_4,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_4,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_5[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_hlds_goal_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_5 = {
  (MR_String) "disj",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 3,
  INT32_C(5),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_5,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_case_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_6[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_can_fail_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_case_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_6[3] = {
  (MR_String) "switch_var",
  (MR_String) "switch_canfail",
  (MR_String) "switch_cases"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_6[3] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_6 = {
  (MR_String) "switch",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 4,
  INT32_C(6),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_6,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_6,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_expr_0_6,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_7[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_7 = {
  (MR_String) "negation",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE_DIRECT_ARG,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(7),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_7,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_8[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_scope_reason_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_8[2] = {
  (MR_String) "scope_reason",
  (MR_String) "scope_goal"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_8 = {
  (MR_String) "scope",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 5,
  INT32_C(8),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_8,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_8,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_9[4] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_9[4] = {
  (MR_String) "ite_exist_vars",
  (MR_String) "ite_cond",
  (MR_String) "ite_then",
  (MR_String) "ite_else"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_9 = {
  (MR_String) "if_then_else",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 6,
  INT32_C(9),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_9,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_expr_0_9,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_10[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_shorthand_goal_expr_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_10 = {
  (MR_String) "shorthand",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 7,
  INT32_C(10),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_expr_0_10,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_7 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_3[8] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_4,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_5,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_6,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_8,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_9,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_10
};

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_expr_0[4] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE_DIRECT_ARG,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(8),
    MR_SECTAG_REMOTE_FULL_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_expr_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_expr_0[11] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_4,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_5,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_9,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_7,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_8,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_10,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_6,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_expr_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_expr_0[11] = {
  (MR_Integer) 10,
  (MR_Integer) 6,
  (MR_Integer) 3,
  (MR_Integer) 0,
  (MR_Integer) 1,
  (MR_Integer) 2,
  (MR_Integer) 9,
  (MR_Integer) 5,
  (MR_Integer) 7,
  (MR_Integer) 4,
  (MR_Integer) 8
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_expr_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____hlds_goal_expr_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____hlds_goal_expr_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "hlds_goal_expr",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_expr_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_expr_0 },
  (MR_Integer) 11,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_expr_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_dp_goal_info_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_goal_info_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_extra_info_0_0[8] = {
  (MR_PseudoTypeInfo) (&mercury__term_context__term_context__type_ctor_info_term_context_0),
  (MR_PseudoTypeInfo) (&mdbcomp__goal_path__mdbcomp__goal_path__type_ctor_info_reverse_goal_path_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__tree234__ti_tree234_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0set_ordlist__ti_set_ordlist_1hlds__hlds_pred__type_ctor_info_pred_proc_id_0),
  (MR_PseudoTypeInfo) (&hlds__goal_mode__hlds__goal_mode__type_ctor_info_goal_mode_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_dp_goal_info_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_extra_info_0_0[8] = {
  (MR_String) "egi_context",
  (MR_String) "egi_rev_goal_path",
  (MR_String) "egi_ho_value_map",
  (MR_String) "egi_goal_mode",
  (MR_String) "egi_maybe_ctgc",
  (MR_String) "egi_maybe_rbmm",
  (MR_String) "egi_maybe_mode_constr",
  (MR_String) "egi_maybe_dp"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_extra_info_0_0 = {
  (MR_String) "extra_goal_info",
  INT16_C(8),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_extra_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_extra_info_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_extra_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_extra_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_extra_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_extra_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_extra_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_extra_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_extra_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_extra_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____hlds_goal_extra_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____hlds_goal_extra_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "hlds_goal_extra_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_extra_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_extra_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_extra_info_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__set_ordlist__ti_set_ordlist_1hlds__hlds_markers__type_ctor_info_goal_feature_0 = {
  &mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1,
  { (MR_TypeInfo) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_info_0_0[8] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0),
  (MR_PseudoTypeInfo) (&hlds__instmap__hlds__instmap__type_ctor_info_instmap_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1hlds__hlds_markers__type_ctor_info_goal_feature_0),
  (MR_PseudoTypeInfo) (&mdbcomp__goal_path__mdbcomp__goal_path__type_ctor_info_goal_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_code_gen_info_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_extra_info_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_info_0_0[8] = {
  (MR_String) "gi_determinism",
  (MR_String) "gi_purity",
  (MR_String) "gi_instmap_delta",
  (MR_String) "gi_nonlocals",
  (MR_String) "gi_features",
  (MR_String) "gi_goal_id",
  (MR_String) "gi_code_gen_info",
  (MR_String) "gi_extra"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_info_0_0[8] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 2,
    (MR_Integer) 3
  },
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 2
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 5,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 6,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_info_0_0 = {
  (MR_String) "goal_info",
  INT16_C(8),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_hlds_goal_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_hlds_goal_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_hlds_goal_info_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_hlds_goal_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_hlds_goal_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____hlds_goal_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____hlds_goal_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "hlds_goal_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_hlds_goal_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_hlds_goal_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_hlds_goal_info_0,

};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_0 = {
  (MR_String) "construct_dynamically",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_1[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_static_how_0) };

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_how_to_construct_0_1[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_1 = {
  (MR_String) "construct_statically",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_1,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_how_to_construct_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_2[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_2 = {
  (MR_String) "construct_in_region",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(3),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_2,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_3[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cell_to_reuse_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_3 = {
  (MR_String) "reuse_cell",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE_DIRECT_ARG,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_how_to_construct_0_3,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_3 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_3[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_2 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_how_to_construct_0[4] = {
  {
    UINT32_C(1),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE_DIRECT_ARG,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_how_to_construct_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_how_to_construct_0[4] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_how_to_construct_0_3
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_how_to_construct_0[4] = {
  (MR_Integer) 0,
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 3
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_how_to_construct_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____how_to_construct_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____how_to_construct_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "how_to_construct",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_how_to_construct_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_how_to_construct_0 },
  (MR_Integer) 4,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_how_to_construct_0,

};

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__pair__pair__type_ctor_info_pair_2,
  {
    (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
    (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
  }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__tree234__ti_tree234_2mdbcomp__goal_path__type_ctor_info_goal_id_0list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__tree234__tree234__type_ctor_info_tree234_2,
  {
    (MR_TypeInfo) (&mdbcomp__goal_path__mdbcomp__goal_path__type_ctor_info_goal_id_0),
    (MR_TypeInfo) (&hlds__hlds_goal__list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
  }
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_incremental_rename_map_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_EQUIV_GROUND,
  ((MR_Box) (hlds__hlds_goal____Unify____incremental_rename_map_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____incremental_rename_map_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "incremental_rename_map",
  { NULL },
  { (MR_PseudoTypeInfo) (&hlds__hlds_goal__tree234__ti_tree234_2mdbcomp__goal_path__type_ctor_info_goal_id_0list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) },
  (MR_Integer) -1,
  UINT16_C(0),
  NULL,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_0 = {
  (MR_String) "conditional_reuse",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_1 = {
  (MR_String) "unconditional_reuse",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_conditional_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_conditional_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_conditional_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_conditional_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_conditional_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____is_conditional_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____is_conditional_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "is_conditional",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_conditional_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_conditional_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_conditional_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_0 = {
  (MR_String) "is_not_exist_constr",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_1 = {
  (MR_String) "is_exist_constr",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_exist_constr_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_exist_constr_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_exist_constr_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_exist_constr_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_exist_constr_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____is_exist_constr_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____is_exist_constr_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "is_exist_constr",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_exist_constr_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_exist_constr_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_exist_constr_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_0 = {
  (MR_String) "is_first_disjunct",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_1 = {
  (MR_String) "is_not_first_disjunct",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_first_disjunct_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_first_disjunct_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_is_first_disjunct_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_first_disjunct_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_first_disjunct_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____is_first_disjunct_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____is_first_disjunct_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "is_first_disjunct",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_is_first_disjunct_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_is_first_disjunct_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_is_first_disjunct_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_0 = {
  (MR_String) "lc_use_parent_stack_frame",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_1 = {
  (MR_String) "lc_create_frame_on_child_stack",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_lc_use_parent_stack_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_lc_use_parent_stack_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_lc_use_parent_stack_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_lc_use_parent_stack_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_lc_use_parent_stack_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____lc_use_parent_stack_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____lc_use_parent_stack_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "lc_use_parent_stack",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_lc_use_parent_stack_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_lc_use_parent_stack_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_lc_use_parent_stack_0,

};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_missed_message_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_EQUIV_GROUND,
  ((MR_Box) (hlds__hlds_goal____Unify____missed_message_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____missed_message_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "missed_message",
  { NULL },
  { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) },
  (MR_Integer) -1,
  UINT16_C(0),
  NULL,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_mode_constr_goal_info_0_0[5] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__sparse_bitset__ti_sparse_bitset_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_mode_constr_goal_info_0_0[5] = {
  (MR_String) "mci_occurring_vars",
  (MR_String) "mci_producing_vars",
  (MR_String) "mci_consuming_vars",
  (MR_String) "mci_make_visible_vars",
  (MR_String) "mci_need_visible_vars"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_mode_constr_goal_info_0_0 = {
  (MR_String) "mode_constr_goal_info",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_mode_constr_goal_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_mode_constr_goal_info_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_mode_constr_goal_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_mode_constr_goal_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_mode_constr_goal_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_mode_constr_goal_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_mode_constr_goal_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_mode_constr_goal_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_mode_constr_goal_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____mode_constr_goal_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____mode_constr_goal_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "mode_constr_goal_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_mode_constr_goal_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_mode_constr_goal_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_mode_constr_goal_info_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_0 = {
  (MR_String) "needs_update",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_1 = {
  (MR_String) "does_not_need_update",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_needs_update_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_needs_update_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_needs_update_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_needs_update_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_needs_update_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____needs_update_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____needs_update_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "needs_update",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_needs_update_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_needs_update_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_needs_update_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_0 = {
  (MR_String) "port_counts_give_coverage_after",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_1 = {
  (MR_String) "no_port_counts_give_coverage_after",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_port_counts_give_coverage_after_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_port_counts_give_coverage_after_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_port_counts_give_coverage_after_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_port_counts_give_coverage_after_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_port_counts_give_coverage_after_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____port_counts_give_coverage_after_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____port_counts_give_coverage_after_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "port_counts_give_coverage_after",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_port_counts_give_coverage_after_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_port_counts_give_coverage_after_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_port_counts_give_coverage_after_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_0 = {
  (MR_String) "equivalent_solutions",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_1 = {
  (MR_String) "equivalent_solution_sets",
  INT32_C(1)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_2 = {
  (MR_String) "equivalent_solution_sets_arbitrary",
  INT32_C(2)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_promise_solutions_kind_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_2
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_promise_solutions_kind_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_promise_solutions_kind_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_promise_solutions_kind_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_promise_solutions_kind_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____promise_solutions_kind_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____promise_solutions_kind_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "promise_solutions_kind",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_promise_solutions_kind_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_promise_solutions_kind_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_promise_solutions_kind_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_0 = {
  (MR_String) "user_quant",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_1 = {
  (MR_String) "compiler_quant",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_quant_creator_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_quant_creator_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_quant_creator_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_quant_creator_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_quant_creator_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____quant_creator_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____quant_creator_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "quant_creator",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_quant_creator_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_quant_creator_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_quant_creator_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__set_ordlist__set_ordlist__type_ctor_info_set_ordlist_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_rbmm_goal_info_0_0[5] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__set_ordlist__ti_set_ordlist_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_rbmm_goal_info_0_0[5] = {
  (MR_String) "created_regions",
  (MR_String) "removed_regions",
  (MR_String) "carried_regions",
  (MR_String) "allocated_into_regions",
  (MR_String) "used_regions"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_rbmm_goal_info_0_0 = {
  (MR_String) "rbmm_goal_info",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_rbmm_goal_info_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_rbmm_goal_info_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_rbmm_goal_info_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_rbmm_goal_info_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_rbmm_goal_info_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_rbmm_goal_info_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_rbmm_goal_info_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_rbmm_goal_info_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_rbmm_goal_info_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____rbmm_goal_info_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____rbmm_goal_info_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "rbmm_goal_info",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_rbmm_goal_info_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_rbmm_goal_info_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_rbmm_goal_info_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_0 = {
  (MR_String) "removable",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_1 = {
  (MR_String) "not_removable",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_removable_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_removable_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_removable_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_removable_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_removable_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____removable_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____removable_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "removable",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_removable_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_removable_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_removable_0,

};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_0 = {
  (MR_String) "no_reuse_info",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_1 = {
  (MR_String) "no_possible_reuse",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 1,
  INT32_C(1),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_string_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_2[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_2 = {
  (MR_String) "missed_reuse",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_2,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_3[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_short_reuse_description_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_3 = {
  (MR_String) "potential_reuse",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_3,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_4[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_short_reuse_description_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_4 = {
  (MR_String) "reuse",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(3),
  (MR_Integer) -1,
  INT32_C(4),
  hlds__hlds_goal__hlds__hlds_goal__field_types_reuse_description_0_4,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_1
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_2 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_3 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_3[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_4 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_reuse_description_0[4] = {
  {
    UINT32_C(2),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_reuse_description_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_reuse_description_0[5] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_reuse_description_0_4
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_reuse_description_0[5] = {
  (MR_Integer) 2,
  (MR_Integer) 1,
  (MR_Integer) 0,
  (MR_Integer) 3,
  (MR_Integer) 4
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_reuse_description_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____reuse_description_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____reuse_description_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "reuse_description",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_reuse_description_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_reuse_description_0 },
  (MR_Integer) 5,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_reuse_description_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_quant_creator_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_0[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_0 = {
  (MR_String) "exist_quant",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_0,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_goal_warning_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_goal_warning_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_1[2] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_goal_warning_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_goal_warning_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_1[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 3
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_1 = {
  (MR_String) "disable_warnings",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_1,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_2[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_promise_solutions_kind_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_2[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 2
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_2 = {
  (MR_String) "promise_solutions",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_2,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_2,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_3[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0) };

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_3[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 2
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_3 = {
  (MR_String) "promise_purity",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 0,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_3,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_3,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_4[1] = { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0) };

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_4[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 3
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_4 = {
  (MR_String) "require_detism",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 1,
  INT32_C(4),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_4,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_4,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_5[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_5 = {
  (MR_String) "require_complete_switch",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 2,
  INT32_C(5),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_5,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_6[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_6[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 3
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_6 = {
  (MR_String) "require_switch_arms_detism",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 3,
  INT32_C(6),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_6,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_6,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_7[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_force_pruning_0) };

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_7[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_7 = {
  (MR_String) "commit",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 4,
  INT32_C(7),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_7,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_7,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_8[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_removable_0) };

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_8[1] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_8 = {
  (MR_String) "barrier",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 5,
  INT32_C(8),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_8,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_8,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_9[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_from_ground_term_kind_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_9[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 2
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_9 = {
  (MR_String) "from_ground_term",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 6,
  INT32_C(9),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_9,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_9,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_compiletime_0 = {
  &parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_expr_1,
  { (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_trace_compiletime_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_compiletime_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_compiletime_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1builtin__type_ctor_info_string_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_10[5] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_compiletime_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1parse_tree__prog_data__ti_trace_expr_1parse_tree__prog_data__type_ctor_info_trace_runtime_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_scope_reason_0_10[5] = {
  (MR_String) "trace_compiletime",
  (MR_String) "trace_runtime",
  (MR_String) "trace_maybe_io",
  (MR_String) "trace_mutable_vars",
  (MR_String) "trace_quant_vars"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_10 = {
  (MR_String) "trace_goal",
  INT16_C(5),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 7,
  INT32_C(10),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_10,
  hlds__hlds_goal__hlds__hlds_goal__field_names_scope_reason_0_10,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_11[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_lc_use_parent_stack_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_scope_reason_0_11[3] = {
  (MR_String) "lc_lc_var",
  (MR_String) "lc_lcs_var",
  (MR_String) "lc_use_parent_stack"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_11[3] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_11 = {
  (MR_String) "loop_control",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 8,
  INT32_C(11),
  hlds__hlds_goal__hlds__hlds_goal__field_types_scope_reason_0_11,
  hlds__hlds_goal__hlds__hlds_goal__field_names_scope_reason_0_11,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_scope_reason_0_11,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_2 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_3[9] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_4,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_5,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_6,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_7,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_8,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_9,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_10,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_11
};

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_scope_reason_0[4] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(9),
    MR_SECTAG_REMOTE_FULL_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_scope_reason_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_scope_reason_0[12] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_8,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_7,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_9,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_11,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_5,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_4,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_6,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_scope_reason_0_10
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_scope_reason_0[12] = {
  (MR_Integer) 3,
  (MR_Integer) 2,
  (MR_Integer) 7,
  (MR_Integer) 6,
  (MR_Integer) 9,
  (MR_Integer) 8,
  (MR_Integer) 10,
  (MR_Integer) 1,
  (MR_Integer) 0,
  (MR_Integer) 4,
  (MR_Integer) 11,
  (MR_Integer) 5
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_scope_reason_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____scope_reason_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____scope_reason_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "scope_reason",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_scope_reason_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_scope_reason_0 },
  (MR_Integer) 12,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_scope_reason_0,

};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_0 = {
  (MR_String) "cell_died",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_short_reuse_description_0_1[4] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_conditional_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_needs_update_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_short_reuse_description_0_1[4] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_1 = {
  (MR_String) "cell_reused",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_short_reuse_description_0_1,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_short_reuse_description_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_short_reuse_description_0_2[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_conditional_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1builtin__type_ctor_info_int_0)
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_short_reuse_description_0_2[2] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_2 = {
  (MR_String) "reuse_call",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_short_reuse_description_0_2,
  NULL,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_short_reuse_description_0_2,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_2 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_short_reuse_description_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_short_reuse_description_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_short_reuse_description_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_short_reuse_description_0_2
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_short_reuse_description_0[3] = {
  (MR_Integer) 0,
  (MR_Integer) 1,
  (MR_Integer) 2
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_short_reuse_description_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____short_reuse_description_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____short_reuse_description_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "short_reuse_description",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_short_reuse_description_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_short_reuse_description_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_short_reuse_description_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_0 = {
  (MR_String) "bi_implication",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_1[7] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_goal_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_hlds_goal_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_shorthand_goal_expr_0_1[7] = {
  (MR_String) "atomic_goal_type",
  (MR_String) "atomic_outer",
  (MR_String) "atomic_inner",
  (MR_String) "atomic_output_vars",
  (MR_String) "atomic_main_goal",
  (MR_String) "orelse_alternatives",
  (MR_String) "orelse_inners"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_shorthand_goal_expr_0_1[7] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 2
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 5,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 6,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_1 = {
  (MR_String) "atomic_goal",
  INT16_C(7),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_names_shorthand_goal_expr_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_shorthand_goal_expr_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_try_io_state_vars_0 = {
  &mercury__maybe__maybe__type_ctor_info_maybe_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_try_io_state_vars_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_2[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__maybe__ti_maybe_1hlds__hlds_goal__type_ctor_info_try_io_state_vars_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_shorthand_goal_expr_0_2[3] = {
  (MR_String) "try_maybe_io",
  (MR_String) "try_result_var",
  (MR_String) "try_goal"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_2 = {
  (MR_String) "try_goal",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_shorthand_goal_expr_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_names_shorthand_goal_expr_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_2 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_shorthand_goal_expr_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_shorthand_goal_expr_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_shorthand_goal_expr_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_shorthand_goal_expr_0_2
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_shorthand_goal_expr_0[3] = {
  (MR_Integer) 1,
  (MR_Integer) 0,
  (MR_Integer) 2
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_shorthand_goal_expr_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____shorthand_goal_expr_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____shorthand_goal_expr_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "shorthand_goal_expr",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_shorthand_goal_expr_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_shorthand_goal_expr_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_shorthand_goal_expr_0,

};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_0 = {
  (MR_String) "born_static",
  INT32_C(0)
};

static const MR_EnumFunctorDesc hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_1 = {
  (MR_String) "marked_static",
  INT32_C(1)
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_static_how_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_1
};

static const MR_EnumFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_static_how_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__enum_functor_desc_static_how_0_1
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_static_how_0[2] = {
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_static_how_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(-1),
  MR_TYPECTOR_REP_ENUM,
  ((MR_Box) (hlds__hlds_goal____Unify____static_how_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____static_how_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "static_how",
  { hlds__hlds_goal__hlds__hlds_goal__enum_name_ordered_static_how_0 },
  { hlds__hlds_goal__hlds__hlds_goal__enum_ordinal_ordered_static_how_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_static_how_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_data__type_ctor_info_tagged_cons_id_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_data__hlds__hlds_data__type_ctor_info_tagged_cons_id_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_tagged_case_0_0[4] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_data__hlds__hlds_data__type_ctor_info_tagged_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_data__type_ctor_info_tagged_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_tagged_case_0_0[4] = {
  (MR_String) "tagged_case_first_functor",
  (MR_String) "tagged_case_later_functors",
  (MR_String) "tagged_case_id",
  (MR_String) "tagged_case_goal"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_tagged_case_0_0 = {
  (MR_String) "tagged_case",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_tagged_case_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_tagged_case_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_tagged_case_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_tagged_case_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_tagged_case_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_tagged_case_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_tagged_case_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_tagged_case_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_tagged_case_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_tagged_case_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____tagged_case_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____tagged_case_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "tagged_case",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_tagged_case_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_tagged_case_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_tagged_case_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_term_size_value_0_0[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_0 = {
  (MR_String) "known_size",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_term_size_value_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_term_size_value_0_1[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_1 = {
  (MR_String) "dynamic_size",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_term_size_value_0_1,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_term_size_value_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_term_size_value_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_1 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_term_size_value_0[2] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_term_size_value_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_term_size_value_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_term_size_value_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_term_size_value_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_term_size_value_0[2] = {
  (MR_Integer) 1,
  (MR_Integer) 0
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_term_size_value_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(2),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____term_size_value_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____term_size_value_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "term_size_value",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_term_size_value_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_term_size_value_0 },
  (MR_Integer) 2,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_term_size_value_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_trace_mutable_var_hlds_0_0[2] = {
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_trace_mutable_var_hlds_0_0[2] = {
  (MR_String) "tmvh_mutable_name",
  (MR_String) "tmvh_state_var_name"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_trace_mutable_var_hlds_0_0 = {
  (MR_String) "trace_mutable_var_hlds",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_trace_mutable_var_hlds_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_trace_mutable_var_hlds_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_trace_mutable_var_hlds_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_trace_mutable_var_hlds_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_trace_mutable_var_hlds_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_trace_mutable_var_hlds_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_trace_mutable_var_hlds_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_trace_mutable_var_hlds_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_trace_mutable_var_hlds_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____trace_mutable_var_hlds_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____trace_mutable_var_hlds_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "trace_mutable_var_hlds",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_trace_mutable_var_hlds_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_trace_mutable_var_hlds_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_trace_mutable_var_hlds_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_try_io_state_vars_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_try_io_state_vars_0_0[2] = {
  (MR_String) "try_io_initial",
  (MR_String) "try_io_final"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_try_io_state_vars_0_0 = {
  (MR_String) "try_io_state_vars",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_try_io_state_vars_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_try_io_state_vars_0_0,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_try_io_state_vars_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_try_io_state_vars_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_try_io_state_vars_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_try_io_state_vars_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_try_io_state_vars_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_try_io_state_vars_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_try_io_state_vars_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_try_io_state_vars_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____try_io_state_vars_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____try_io_state_vars_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "try_io_state_vars",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_try_io_state_vars_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_try_io_state_vars_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_try_io_state_vars_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_mode_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_mode_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_0[7] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_mode_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_how_to_construct_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cell_is_unique_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_construct_sub_info_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_0[7] = {
  (MR_String) "construct_cell_var",
  (MR_String) "construct_cons_id",
  (MR_String) "construct_args",
  (MR_String) "construct_arg_modes",
  (MR_String) "construct_how",
  (MR_String) "construct_is_unique",
  (MR_String) "construct_sub_info"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_0[7] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 5,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 6,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_0 = {
  (MR_String) "construct",
  INT16_C(7),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_0,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_0,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_1[6] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_mode_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_can_fail_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_can_cgc_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_1[6] = {
  (MR_String) "deconstruct_cell_var",
  (MR_String) "deconstruct_cons_id",
  (MR_String) "deconstruct_args",
  (MR_String) "deconstruct_arg_modes",
  (MR_String) "deconstruct_can_fail",
  (MR_String) "deconstruct_can_cgc"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_1[6] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 1,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 1
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_1 = {
  (MR_String) "deconstruct",
  INT16_C(6),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_2[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_2[2] = {
  (MR_String) "assign_to_var",
  (MR_String) "assign_from_var"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_2 = {
  (MR_String) "assign",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_2,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_3[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_3[2] = {
  (MR_String) "test_var1",
  (MR_String) "test_var2"
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_3 = {
  (MR_String) "simple_test",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 0,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_3,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_3,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_4[3] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_mode_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_can_fail_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_4[3] = {
  (MR_String) "compl_unify_mode",
  (MR_String) "compl_unify_can_fail",
  (MR_String) "compl_unify_typeinfos"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_4[3] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_4 = {
  (MR_String) "complicated_unify",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_REMOTE_FULL_WORD,
  UINT8_C(3),
  (MR_Integer) 1,
  INT32_C(4),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unification_0_4,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unification_0_4,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_unification_0_4,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_2 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_3[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_4
};

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unification_0[4] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(2),
    MR_SECTAG_REMOTE_FULL_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unification_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unification_0[5] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_4,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unification_0_3
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unification_0[5] = {
  (MR_Integer) 2,
  (MR_Integer) 3,
  (MR_Integer) 0,
  (MR_Integer) 4,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unification_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____unification_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____unification_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "unification",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unification_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unification_0 },
  (MR_Integer) 5,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unification_0,

};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_sub_context_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_sub_context_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_context_0_0[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_main_context_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1hlds__hlds_goal__type_ctor_info_unify_sub_context_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_context_0_0 = {
  (MR_String) "unify_context",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_context_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_context_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_context_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_context_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_context_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_context_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_context_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_context_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_context_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____unify_context_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____unify_context_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "unify_context",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_context_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_context_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_context_0,

};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_0 = {
  (MR_String) "umc_explicit",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 0,
  INT32_C(0),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_1[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_1 = {
  (MR_String) "umc_head",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_1,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_2 = {
  (MR_String) "umc_head_result",
  INT16_C(0),
  UINT16_C(0),
  MR_SECTAG_LOCAL_REST_OF_WORD,
  UINT8_C(0),
  (MR_Integer) 1,
  INT32_C(2),
  NULL,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_3[2] = {
  (MR_PseudoTypeInfo) (&hlds__hlds_pred__hlds__hlds_pred__type_ctor_info_call_id_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_3 = {
  (MR_String) "umc_call",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(3),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_3,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_4[1] = { (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_string_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_4 = {
  (MR_String) "umc_implicit",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(3),
  (MR_Integer) -1,
  INT32_C(4),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_main_context_0_4,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_0[2] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_2
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_3 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_3[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_4 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_main_context_0[4] = {
  {
    UINT32_C(2),
    MR_SECTAG_LOCAL_REST_OF_WORD,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_main_context_0_3,
    INT8_C(-1),
    UINT8_C(3),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_main_context_0[5] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_3,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_0,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_main_context_0_4
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_main_context_0[5] = {
  (MR_Integer) 1,
  (MR_Integer) 2,
  (MR_Integer) 3,
  (MR_Integer) 0,
  (MR_Integer) 4
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_main_context_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(4),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____unify_main_context_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____unify_main_context_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "unify_main_context",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_main_context_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_main_context_0 },
  (MR_Integer) 5,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_main_context_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_mode_0_0[4] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_inst_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_inst_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_inst_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_inst_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_mode_0_0 = {
  (MR_String) "unify_modes_li_lf_ri_rf",
  INT16_C(4),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_mode_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_mode_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_mode_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_mode_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_mode_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_mode_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_mode_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_mode_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_mode_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____unify_mode_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____unify_mode_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "unify_mode",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_mode_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_mode_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_mode_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_0[1] = { (MR_PseudoTypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0) };

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_0 = {
  (MR_String) "rhs_var",
  INT16_C(1),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_1[3] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_exist_constr_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unify_rhs_0_1[3] = {
  (MR_String) "rhs_cons_id",
  (MR_String) "rhs_is_exist_constr",
  (MR_String) "rhs_args"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unify_rhs_0_1[3] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_1 = {
  (MR_String) "rhs_functor",
  INT16_C(3),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(1),
  (MR_Integer) -1,
  INT32_C(1),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unify_rhs_0_1,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_unify_rhs_0_1,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_FA_TypeInfo_Struct2 hlds__hlds_goal__pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0parse_tree__prog_data__type_ctor_info_mer_mode_0 = {
  &mercury__pair__pair__type_ctor_info_pair_2,
  {
    (MR_TypeInfo) (&hlds__hlds_goal__term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
    (MR_TypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0)
  }
};

static const MR_FA_TypeInfo_Struct1 hlds__hlds_goal__list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0parse_tree__prog_data__type_ctor_info_mer_mode_0 = {
  &mercury__list__list__type_ctor_info_list_1,
  { (MR_TypeInfo) (&hlds__hlds_goal__pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0parse_tree__prog_data__type_ctor_info_mer_mode_0) }
};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_2[7] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_ho_groundness_0),
  (MR_PseudoTypeInfo) (&mdbcomp__prim_data__mdbcomp__prim_data__type_ctor_info_pred_or_func_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__list__ti_list_1pair__ti_pair_2term__ti_var_1parse_tree__prog_data__type_ctor_info_prog_var_type_0parse_tree__prog_data__type_ctor_info_mer_mode_0),
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0),
  (MR_PseudoTypeInfo) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0)
};

static const MR_ConstString hlds__hlds_goal__hlds__hlds_goal__field_names_unify_rhs_0_2[7] = {
  (MR_String) "rhs_purity",
  (MR_String) "rhs_groundness",
  (MR_String) "rhs_p_or_f",
  (MR_String) "rhs_closure_vars",
  (MR_String) "rhs_arg_vars_modes",
  (MR_String) "rhs_detism",
  (MR_String) "rhs_lambda_goal"
};

static const MR_DuArgLocn hlds__hlds_goal__hlds__hlds_goal__field_locns_unify_rhs_0_2[7] = {
  {
    (MR_Integer) 0,
    (MR_Integer) 2,
    (MR_Integer) 2
  },
  {
    (MR_Integer) 0,
    (MR_Integer) 1,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 0,
    (MR_Integer) 0,
    (MR_Integer) 1
  },
  {
    (MR_Integer) 1,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 2,
    (MR_Integer) 0,
    (MR_Integer) 0
  },
  {
    (MR_Integer) 3,
    (MR_Integer) 0,
    (MR_Integer) 3
  },
  {
    (MR_Integer) 4,
    (MR_Integer) 0,
    (MR_Integer) 0
  }
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_2 = {
  (MR_String) "rhs_lambda_goal",
  INT16_C(7),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(2),
  (MR_Integer) -1,
  INT32_C(2),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_rhs_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_names_unify_rhs_0_2,
  hlds__hlds_goal__hlds__hlds_goal__field_locns_unify_rhs_0_2,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_0 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_1[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_1 };

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_2[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_2 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_rhs_0[3] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_1,
    INT8_C(-1),
    UINT8_C(1),
    UINT8_C(1)
  },
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_rhs_0_2,
    INT8_C(-1),
    UINT8_C(2),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_rhs_0[3] = {
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_1,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_2,
  &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_rhs_0_0
};

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_rhs_0[3] = {
  (MR_Integer) 2,
  (MR_Integer) 0,
  (MR_Integer) 1
};

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_rhs_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(3),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____unify_rhs_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____unify_rhs_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "unify_rhs",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_rhs_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_rhs_0 },
  (MR_Integer) 3,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_rhs_0,

};

static const MR_PseudoTypeInfo hlds__hlds_goal__hlds__hlds_goal__field_types_unify_sub_context_0_0[2] = {
  (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_cons_id_0),
  (MR_PseudoTypeInfo) (&mercury__builtin__builtin__type_ctor_info_int_0)
};

static const MR_DuFunctorDesc hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_sub_context_0_0 = {
  (MR_String) "unify_sub_context",
  INT16_C(2),
  UINT16_C(0),
  MR_SECTAG_NONE,
  UINT8_C(0),
  (MR_Integer) -1,
  INT32_C(0),
  hlds__hlds_goal__hlds__hlds_goal__field_types_unify_sub_context_0_0,
  NULL,
  NULL,
  NULL,
  MR_FUNCTOR_SUBTYPE_NONE,
  UINT8_C(0)
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_sub_context_0_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_sub_context_0_0 };

static const MR_DuPtagLayout hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_sub_context_0[1] = {
  {
    UINT32_C(1),
    MR_SECTAG_NONE,
    hlds__hlds_goal__hlds__hlds_goal__du_stag_ordered_unify_sub_context_0_0,
    INT8_C(-1),
    UINT8_C(0),
    UINT8_C(1)
  }
};

static const MR_DuFunctorDescPtr hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_sub_context_0[1] = { &hlds__hlds_goal__hlds__hlds_goal__du_functor_desc_unify_sub_context_0_0 };

static const MR_Integer hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_sub_context_0[1] = { (MR_Integer) 0 };

const MR_TypeCtorInfo_Struct hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_sub_context_0 = {
  (MR_Integer) 0,
  UINT8_C(18),
  INT8_C(1),
  MR_TYPECTOR_REP_DU,
  ((MR_Box) (hlds__hlds_goal____Unify____unify_sub_context_0_0_10001)),
  ((MR_Box) (hlds__hlds_goal____Compare____unify_sub_context_0_0_10001)),
  (MR_String) "hlds.hlds_goal",
  (MR_String) "unify_sub_context",
  { hlds__hlds_goal__hlds__hlds_goal__du_name_ordered_unify_sub_context_0 },
  { hlds__hlds_goal__hlds__hlds_goal__du_ptag_ordered_unify_sub_context_0 },
  (MR_Integer) 1,
  UINT16_C(12),
  hlds__hlds_goal__hlds__hlds_goal__functor_number_map_unify_sub_context_0,

};

static void MR_CALL 
hlds__hlds_goal__IntroducedFrom__pred__goal_list_purity__2989__1_3_p_0(
  MR_Word LambdaHeadVar__1_12,
  MR_Word LambdaHeadVar__2_13,
  MR_Word * LambdaHeadVar__3_14)
{
  MR_Word GoalInfo_10 = ((MR_Word) ((MR_hl_field(0, LambdaHeadVar__1_12, 1))));
  MR_Word Purity1_11 = ((MR_Unsigned) ((MR_hl_field(0, GoalInfo_10, 0))) & (MR_Integer) 3);

  *LambdaHeadVar__3_14 = parse_tree__prog_data__worst_purity_2_f_0(LambdaHeadVar__2_13, Purity1_11);
}

static void MR_CALL 
hlds__hlds_goal__IntroducedFrom__pred__goal_list_determinism__2980__1_3_p_0(
  MR_Word LambdaHeadVar__1_12,
  MR_Word LambdaHeadVar__2_13,
  MR_Word * LambdaHeadVar__3_14)
{
  MR_Word GoalInfo_10 = ((MR_Word) ((MR_hl_field(0, LambdaHeadVar__1_12, 1))));
  MR_Word Det1_11 = ((((MR_Unsigned) ((MR_hl_field(0, GoalInfo_10, 0))) >> 2)) & (MR_Integer) 7);

  parse_tree__prog_detism__det_conjunction_detism_3_p_0(LambdaHeadVar__2_13, Det1_11, LambdaHeadVar__3_14);
}

static void MR_CALL 
hlds__hlds_goal__IntroducedFrom__pred__goal_list_instmap_delta__2970__1_3_p_0(
  MR_Word LambdaHeadVar__1_13,
  MR_Word LambdaHeadVar__2_14,
  MR_Word * LambdaHeadVar__3_15)
{
  MR_Word GoalInfo_10 = ((MR_Word) ((MR_hl_field(0, LambdaHeadVar__1_13, 1))));
  MR_Word Delta1_11 = ((MR_Word) ((MR_hl_field(0, GoalInfo_10, 1))));

  hlds__instmap__instmap_delta_apply_instmap_delta_4_p_0(LambdaHeadVar__2_14, Delta1_11, (MR_Integer) 2, LambdaHeadVar__3_15);
}

void MR_CALL 
hlds__hlds_goal____Compare____unify_sub_context_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Integer ArgX2_7 = ((MR_Integer) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Integer ArgY2_8 = ((MR_Integer) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    parse_tree__prog_data____Compare____cons_id_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      succeeded = (ArgX2_7 < ArgY2_8);
      if (succeeded)
        *HeadVar__1_1 = (MR_Integer) 1;
      else
      {
        succeeded = (ArgX2_7 > ArgY2_8);
        if (succeeded)
          *HeadVar__1_1 = (MR_Integer) 2;
        else
          *HeadVar__1_1 = (MR_Integer) 0;
      }
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_sub_context_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Integer ArgX2_5 = ((MR_Integer) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Integer ArgY2_6 = ((MR_Integer) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
      succeeded = (ArgX2_5 == ArgY2_6);
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____try_io_state_vars_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____try_io_state_vars_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_10_10;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_10_10 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_10_10, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____trace_mutable_var_hlds_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_String ArgX1_4 = ((MR_String) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_String ArgY1_5 = ((MR_String) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_String ArgX2_7 = ((MR_String) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_String ArgY2_8 = ((MR_String) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    mercury__private_builtin__builtin_compare_string_3_p_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__private_builtin__builtin_compare_string_3_p_0(HeadVar__1_1, ArgX2_7, ArgY2_8);
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____trace_mutable_var_hlds_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_String ArgX1_3 = ((MR_String) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_String ArgY1_4 = ((MR_String) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_String ArgX2_5 = ((MR_String) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_String ArgY2_6 = ((MR_String) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = (strcmp(ArgX1_3, ArgY1_4) == 0);
    if (succeeded)
      succeeded = (strcmp(ArgX2_5, ArgY2_6) == 0);
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____term_size_value_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_8 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_9 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_8 == CastY_9);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  if (((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1))
    if (((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 1))
    {
      MR_Word ArgX1_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
      MR_Word ArgY1_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX1_6)), ((MR_Box) (ArgY1_7)));
    }
    else
      *HeadVar__1_1 = (MR_Integer) 2;
  else
  if (((MR_tag((MR_Word) HeadVar__3_3)) == (MR_Integer) 1))
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    MR_Integer ArgX1_4 = ((MR_Integer) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Integer ArgY1_5 = ((MR_Integer) ((MR_hl_field(0, HeadVar__3_3, 0))));

    succeeded = (ArgX1_4 < ArgY1_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 1;
    else
    {
      succeeded = (ArgX1_4 > ArgY1_5);
      if (succeeded)
        *HeadVar__1_1 = (MR_Integer) 2;
      else
        *HeadVar__1_1 = (MR_Integer) 0;
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____term_size_value_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  if (((MR_tag((MR_Word) HeadVar__1_1)) == (MR_Integer) 1))
  {
    MR_Word TypeInfo_9_9;
    MR_Word ArgX1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
    MR_Word ArgY1_6;

    succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
    if (succeeded)
    {
      ArgY1_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
      TypeInfo_9_9 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_9_9, ((MR_Box) (ArgX1_5)), ((MR_Box) (ArgY1_6)));
    }
  }
  else
  {
    MR_Integer ArgX1_3 = ((MR_Integer) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Integer ArgY1_4;

    succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
    if (succeeded)
    {
      ArgY1_4 = ((MR_Integer) ((MR_hl_field(0, HeadVar__2_2, 0))));
      succeeded = (ArgX1_3 == ArgY1_4);
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____tagged_case_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_15 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_16 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_15 == CastY_16);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
    MR_Word SubResult1_6;

    hlds__hlds_data____Compare____tagged_cons_id_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[34]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;
        MR_Integer Var_21 = (MR_Integer) (ArgX3_10);
        MR_Integer Var_22 = (MR_Integer) (ArgY3_11);

        succeeded = (Var_21 < Var_22);
        if (succeeded)
        {
          SubResult3_12 = (MR_Integer) 1;
          succeeded = MR_TRUE;
        }
        else
        {
          succeeded = (Var_21 > Var_22);
          if (succeeded)
          {
            SubResult3_12 = (MR_Integer) 2;
            succeeded = MR_TRUE;
          }
        }
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
          hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX4_13, ArgY4_14);
      }
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____tagged_case_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_11 == CastY_12);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_14_14;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
    MR_Word ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Integer CastX_17;
    MR_Integer CastY_18;

    succeeded = hlds__hlds_data____Unify____tagged_cons_id_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
    {
      TypeInfo_14_14 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[34]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_14_14, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
      {
        CastX_17 = (MR_Integer) (ArgX3_7);
        CastY_18 = (MR_Integer) (ArgY3_8);
        succeeded = (CastX_17 == CastY_18);
        if (succeeded)
          succeeded = MR_TRUE;
        else
        {
          MR_Integer ArgX1_15 = (MR_Integer) (ArgX3_7);
          MR_Integer ArgY1_16 = (MR_Integer) (ArgY3_8);

          succeeded = (ArgX1_15 == ArgY1_16);
        }
        if (succeeded)
          succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX4_9, ArgY4_10);
      }
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____static_how_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____static_how_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____removable_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____removable_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____rbmm_goal_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_18 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_19 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_18 == CastY_19);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
    MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
    MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 4))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[24]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[24]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;

        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[24]), &SubResult3_12, ((MR_Box) (ArgX3_10)), ((MR_Box) (ArgY3_11)));
        succeeded = (SubResult3_12 != (MR_Integer) 0);
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
        {
          MR_Word SubResult4_15;

          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[24]), &SubResult4_15, ((MR_Box) (ArgX4_13)), ((MR_Box) (ArgY4_14)));
          succeeded = (SubResult4_15 != (MR_Integer) 0);
          if (succeeded)
            *HeadVar__1_1 = SubResult4_15;
          else
            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[24]), HeadVar__1_1, ((MR_Box) (ArgX5_16)), ((MR_Box) (ArgY5_17)));
        }
      }
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____rbmm_goal_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_13 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_14 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_13 == CastY_14);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_16_16;
    MR_Word TypeInfo_17_17;
    MR_Word TypeInfo_18_18;
    MR_Word TypeInfo_19_19;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
    MR_Word ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 4))));
    MR_Word ArgY5_12 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[24]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_16_16 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[24]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_16_16, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
      {
        TypeInfo_17_17 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[24]);
        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_17_17, ((MR_Box) (ArgX3_7)), ((MR_Box) (ArgY3_8)));
        if (succeeded)
        {
          TypeInfo_18_18 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[24]);
          succeeded = mercury__builtin__unify_2_p_0(TypeInfo_18_18, ((MR_Box) (ArgX4_9)), ((MR_Box) (ArgY4_10)));
          if (succeeded)
          {
            TypeInfo_19_19 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[24]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_19_19, ((MR_Box) (ArgX5_11)), ((MR_Box) (ArgY5_12)));
          }
        }
      }
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____quant_creator_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____quant_creator_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____promise_solutions_kind_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____promise_solutions_kind_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____port_counts_give_coverage_after_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____port_counts_give_coverage_after_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____needs_update_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____needs_update_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____mode_constr_goal_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_18 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_19 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_18 == CastY_19);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
    MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
    MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 4))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;

        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult3_12, ((MR_Box) (ArgX3_10)), ((MR_Box) (ArgY3_11)));
        succeeded = (SubResult3_12 != (MR_Integer) 0);
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
        {
          MR_Word SubResult4_15;

          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult4_15, ((MR_Box) (ArgX4_13)), ((MR_Box) (ArgY4_14)));
          succeeded = (SubResult4_15 != (MR_Integer) 0);
          if (succeeded)
            *HeadVar__1_1 = SubResult4_15;
          else
            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), HeadVar__1_1, ((MR_Box) (ArgX5_16)), ((MR_Box) (ArgY5_17)));
        }
      }
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____mode_constr_goal_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_13 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_14 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_13 == CastY_14);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_16_16;
    MR_Word TypeInfo_17_17;
    MR_Word TypeInfo_18_18;
    MR_Word TypeInfo_19_19;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
    MR_Word ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 4))));
    MR_Word ArgY5_12 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_16_16 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_16_16, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
      {
        TypeInfo_17_17 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]);
        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_17_17, ((MR_Box) (ArgX3_7)), ((MR_Box) (ArgY3_8)));
        if (succeeded)
        {
          TypeInfo_18_18 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]);
          succeeded = mercury__builtin__unify_2_p_0(TypeInfo_18_18, ((MR_Box) (ArgX4_9)), ((MR_Box) (ArgY4_10)));
          if (succeeded)
          {
            TypeInfo_19_19 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_19_19, ((MR_Box) (ArgX5_11)), ((MR_Box) (ArgY5_12)));
          }
        }
      }
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____missed_message_0_0(
  MR_Word * HeadVar__1_1,
  MR_String HeadVar__2_2,
  MR_String HeadVar__3_3)
{
  MR_String Cast_HeadVar1_4 = HeadVar__2_2;
  MR_String Cast_HeadVar2_5 = HeadVar__3_3;

  mercury__private_builtin__builtin_compare_string_3_p_0(HeadVar__1_1, Cast_HeadVar1_4, Cast_HeadVar2_5);
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____missed_message_0_0(
  MR_String HeadVar__1_1,
  MR_String HeadVar__2_2)
{
  MR_bool succeeded;
  MR_String Cast_HeadVar1_3 = HeadVar__1_1;
  MR_String Cast_HeadVar2_4 = HeadVar__2_2;

  succeeded = (strcmp(Cast_HeadVar1_3, Cast_HeadVar2_4) == 0);
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____lc_use_parent_stack_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____lc_use_parent_stack_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____is_first_disjunct_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_first_disjunct_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____is_exist_constr_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_exist_constr_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____is_conditional_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_conditional_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____incremental_rename_map_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = HeadVar__2_2;
  MR_Word Cast_HeadVar2_5 = HeadVar__3_3;

  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[3]), HeadVar__1_1, ((MR_Box) (Cast_HeadVar1_4)), ((MR_Box) (Cast_HeadVar2_5)));
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____incremental_rename_map_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = HeadVar__1_1;
  MR_Word Cast_HeadVar2_4 = HeadVar__2_2;

  succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[3]), ((MR_Box) (Cast_HeadVar1_3)), ((MR_Box) (Cast_HeadVar2_4)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_extra_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_27 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_28 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_27 == CastY_28);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
    MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
    MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 4))));
    MR_Word ArgX6_19 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 5))));
    MR_Word ArgY6_20 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 5))));
    MR_Word ArgX7_22 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 6))));
    MR_Word ArgY7_23 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 6))));
    MR_Word ArgX8_25 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 7))));
    MR_Word ArgY8_26 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 7))));
    MR_Word SubResult1_6;

    mercury__term_context____Compare____term_context_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mdbcomp__goal_path____Compare____reverse_goal_path_0_0(&SubResult2_9, ArgX2_7, ArgY2_8);
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;

        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[0]), &SubResult3_12, ((MR_Box) (ArgX3_10)), ((MR_Box) (ArgY3_11)));
        succeeded = (SubResult3_12 != (MR_Integer) 0);
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
        {
          MR_Word SubResult4_15;

          hlds__goal_mode____Compare____goal_mode_0_0(&SubResult4_15, ArgX4_13, ArgY4_14);
          succeeded = (SubResult4_15 != (MR_Integer) 0);
          if (succeeded)
            *HeadVar__1_1 = SubResult4_15;
          else
          {
            MR_Word SubResult5_18;

            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[19]), &SubResult5_18, ((MR_Box) (ArgX5_16)), ((MR_Box) (ArgY5_17)));
            succeeded = (SubResult5_18 != (MR_Integer) 0);
            if (succeeded)
              *HeadVar__1_1 = SubResult5_18;
            else
            {
              MR_Word SubResult6_21;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[20]), &SubResult6_21, ((MR_Box) (ArgX6_19)), ((MR_Box) (ArgY6_20)));
              succeeded = (SubResult6_21 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult6_21;
              else
              {
                MR_Word SubResult7_24;

                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[21]), &SubResult7_24, ((MR_Box) (ArgX7_22)), ((MR_Box) (ArgY7_23)));
                succeeded = (SubResult7_24 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult7_24;
                else
                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[22]), HeadVar__1_1, ((MR_Box) (ArgX8_25)), ((MR_Box) (ArgY8_26)));
              }
            }
          }
        }
      }
    }
  }
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_extra_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_19 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_20 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_19 == CastY_20);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_23_23;
    MR_Word TypeInfo_25_25;
    MR_Word TypeInfo_26_26;
    MR_Word TypeInfo_27_27;
    MR_Word TypeInfo_28_28;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
    MR_Word ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 4))));
    MR_Word ArgY5_12 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
    MR_Word ArgX6_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 5))));
    MR_Word ArgY6_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 5))));
    MR_Word ArgX7_15 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 6))));
    MR_Word ArgY7_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 6))));
    MR_Word ArgX8_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 7))));
    MR_Word ArgY8_18 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 7))));

    succeeded = mercury__term_context____Unify____term_context_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
    {
      succeeded = mdbcomp__goal_path____Unify____reverse_goal_path_0_0(ArgX2_5, ArgY2_6);
      if (succeeded)
      {
        TypeInfo_23_23 = (MR_Word) (&hlds__hlds_goal_scalar_common_2[0]);
        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_23_23, ((MR_Box) (ArgX3_7)), ((MR_Box) (ArgY3_8)));
        if (succeeded)
        {
          succeeded = hlds__goal_mode____Unify____goal_mode_0_0(ArgX4_9, ArgY4_10);
          if (succeeded)
          {
            TypeInfo_25_25 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[19]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_25_25, ((MR_Box) (ArgX5_11)), ((MR_Box) (ArgY5_12)));
            if (succeeded)
            {
              TypeInfo_26_26 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[20]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_26_26, ((MR_Box) (ArgX6_13)), ((MR_Box) (ArgY6_14)));
              if (succeeded)
              {
                TypeInfo_27_27 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[21]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_27_27, ((MR_Box) (ArgX7_15)), ((MR_Box) (ArgY7_16)));
                if (succeeded)
                {
                  TypeInfo_28_28 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[22]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_28_28, ((MR_Box) (ArgX8_17)), ((MR_Box) (ArgY8_18)));
                }
              }
            }
          }
        }
      }
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____higher_order_value_map_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_Word Cast_HeadVar1_4 = HeadVar__2_2;
  MR_Word Cast_HeadVar2_5 = HeadVar__3_3;

  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[0]), HeadVar__1_1, ((MR_Box) (Cast_HeadVar1_4)), ((MR_Box) (Cast_HeadVar2_5)));
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____higher_order_value_map_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Word Cast_HeadVar1_3 = HeadVar__1_1;
  MR_Word Cast_HeadVar2_4 = HeadVar__2_2;

  succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[0]), ((MR_Box) (Cast_HeadVar1_3)), ((MR_Box) (Cast_HeadVar2_4)));
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____higher_order_syntax_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____higher_order_syntax_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____goal_trivial_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____goal_trivial_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____goal_is_mdprof_inst_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____goal_is_mdprof_inst_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____from_ground_term_kind_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____from_ground_term_kind_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____foreign_arg_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_15 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_16 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_15 == CastY_16);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX4_13 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 3))) & (MR_Integer) 1);
    MR_Word ArgY4_14 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 3))) & (MR_Integer) 1);
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[10]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;

        parse_tree__prog_data____Compare____mer_type_0_0(&SubResult3_12, ArgX3_10, ArgY3_11);
        succeeded = (SubResult3_12 != (MR_Integer) 0);
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
        {
          MR_Integer Var_21 = (MR_Integer) (ArgX4_13);
          MR_Integer Var_22 = (MR_Integer) (ArgY4_14);

          succeeded = (Var_21 < Var_22);
          if (succeeded)
            *HeadVar__1_1 = (MR_Integer) 1;
          else
          {
            succeeded = (Var_21 > Var_22);
            if (succeeded)
              *HeadVar__1_1 = (MR_Integer) 2;
            else
              *HeadVar__1_1 = (MR_Integer) 0;
          }
        }
      }
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____foreign_arg_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_11 == CastY_12);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_14_14;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX4_9 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 3))) & (MR_Integer) 1);
    MR_Word ArgY4_10 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 3))) & (MR_Integer) 1);

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_14_14 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[10]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_14_14, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
      {
        succeeded = parse_tree__prog_data____Unify____mer_type_0_0(ArgX3_7, ArgY3_8);
        if (succeeded)
          succeeded = (ArgX4_9 == ArgY4_10);
      }
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____force_pruning_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____force_pruning_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____dp_goal_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) & (MR_Integer) 1);
    MR_Word ArgY1_5 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 0))) & (MR_Integer) 1);
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;
    MR_Integer Var_13 = (MR_Integer) (ArgX1_4);
    MR_Integer Var_14 = (MR_Integer) (ArgY1_5);

    succeeded = (Var_13 < Var_14);
    if (succeeded)
    {
      SubResult1_6 = (MR_Integer) 1;
      succeeded = MR_TRUE;
    }
    else
    {
      succeeded = (Var_13 > Var_14);
      if (succeeded)
      {
        SubResult1_6 = (MR_Integer) 2;
        succeeded = MR_TRUE;
      }
    }
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[9]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____dp_goal_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_9_9;
    MR_Word ArgX1_3 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 0))) & (MR_Integer) 1);
    MR_Word ArgY1_4 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) & (MR_Integer) 1);
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = (ArgX1_3 == ArgY1_4);
    if (succeeded)
    {
      TypeInfo_9_9 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[9]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_9_9, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____dp_coverage_goal_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) >> 1)) & (MR_Integer) 1);
    MR_Word ArgY1_5 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 0))) >> 1)) & (MR_Integer) 1);
    MR_Word ArgX2_7 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) & (MR_Integer) 1);
    MR_Word ArgY2_8 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 0))) & (MR_Integer) 1);
    MR_Word SubResult1_6;
    MR_Integer Var_13 = (MR_Integer) (ArgX1_4);
    MR_Integer Var_14 = (MR_Integer) (ArgY1_5);

    succeeded = (Var_13 < Var_14);
    if (succeeded)
    {
      SubResult1_6 = (MR_Integer) 1;
      succeeded = MR_TRUE;
    }
    else
    {
      succeeded = (Var_13 > Var_14);
      if (succeeded)
      {
        SubResult1_6 = (MR_Integer) 2;
        succeeded = MR_TRUE;
      }
    }
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Integer Var_15 = (MR_Integer) (ArgX2_7);
      MR_Integer Var_16 = (MR_Integer) (ArgY2_8);

      succeeded = (Var_15 < Var_16);
      if (succeeded)
        *HeadVar__1_1 = (MR_Integer) 1;
      else
      {
        succeeded = (Var_15 > Var_16);
        if (succeeded)
          *HeadVar__1_1 = (MR_Integer) 2;
        else
          *HeadVar__1_1 = (MR_Integer) 0;
      }
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____dp_coverage_goal_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 0))) >> 1)) & (MR_Integer) 1);
    MR_Word ArgY1_4 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) >> 1)) & (MR_Integer) 1);
    MR_Word ArgX2_5 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 0))) & (MR_Integer) 1);
    MR_Word ArgY2_6 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) & (MR_Integer) 1);

    succeeded = (ArgX1_3 == ArgY1_4);
    if (succeeded)
      succeeded = (ArgX2_5 == ArgY2_6);
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____ctgc_goal_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_12 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_13 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_12 == CastY_13);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
        hlds__hlds_goal____Compare____reuse_description_0_0(HeadVar__1_1, ArgX3_10, ArgY3_11);
    }
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____reuse_description_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_10 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_11 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_10 == CastY_11);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_unmkbody(HeadVar__2_2)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                switch (MR_unmkbody(HeadVar__3_3)) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 0;
                    break;
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
              case (MR_Integer) 3:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
            }
            break;
          case (MR_Integer) 1:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                switch (MR_unmkbody(HeadVar__3_3)) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 0;
                    break;
                }
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
              case (MR_Integer) 3:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
            }
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[25]), HeadVar__1_1, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
            }
            break;
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_6 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_7 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));

              hlds__hlds_goal____Compare____short_reuse_description_0_0(HeadVar__1_1, ArgX1_6, ArgY1_7);
            }
            break;
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 3:
            {
              MR_Word ArgX1_8 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 0))));
              MR_Word ArgY1_9 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 0))));

              hlds__hlds_goal____Compare____short_reuse_description_0_0(HeadVar__1_1, ArgX1_8, ArgY1_9);
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____short_reuse_description_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_20 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_21 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_20 == CastY_21);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 0;
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 1))) & (MR_Integer) 1);
              MR_Word ArgY2_8 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 1))) & (MR_Integer) 1);
              MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
              MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 3))));
              MR_Word SubResult1_6;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
              {
                MR_Word SubResult2_9;
                MR_Integer Var_30 = (MR_Integer) (ArgX2_7);
                MR_Integer Var_31 = (MR_Integer) (ArgY2_8);

                succeeded = (Var_30 < Var_31);
                if (succeeded)
                {
                  SubResult2_9 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (Var_30 > Var_31);
                  if (succeeded)
                  {
                    SubResult2_9 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_9;
                else
                {
                  MR_Word SubResult3_12;

                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[4]), &SubResult3_12, ((MR_Box) (ArgX3_10)), ((MR_Box) (ArgY3_11)));
                  succeeded = (SubResult3_12 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_12;
                  else
                    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[5]), HeadVar__1_1, ((MR_Box) (ArgX4_13)), ((MR_Box) (ArgY4_14)));
                }
              }
            }
            break;
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_15 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
              MR_Word ArgY1_16 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) & (MR_Integer) 1);
              MR_Word ArgX2_18 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY2_19 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word SubResult1_17;
              MR_Integer Var_28 = (MR_Integer) (ArgX1_15);
              MR_Integer Var_29 = (MR_Integer) (ArgY1_16);

              succeeded = (Var_28 < Var_29);
              if (succeeded)
              {
                SubResult1_17 = (MR_Integer) 1;
                succeeded = MR_TRUE;
              }
              else
              {
                succeeded = (Var_28 > Var_29);
                if (succeeded)
                {
                  SubResult1_17 = (MR_Integer) 2;
                  succeeded = MR_TRUE;
                }
              }
              if (succeeded)
                *HeadVar__1_1 = SubResult1_17;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[6]), HeadVar__1_1, ((MR_Box) (ArgX2_18)), ((MR_Box) (ArgY2_19)));
            }
            break;
        }
        break;
    }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____ctgc_goal_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_12_12;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_12_12 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_12_12, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
        succeeded = hlds__hlds_goal____Unify____reuse_description_0_0(ArgX3_7, ArgY3_8);
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____reuse_description_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_11 == CastY_12);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_10 == CastX_9);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_13_13;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            TypeInfo_13_13 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[25]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_13_13, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word ArgX1_5 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_6 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            succeeded = hlds__hlds_goal____Unify____short_reuse_description_0_0(ArgX1_5, ArgY1_6);
          }
        }
        break;
      case (MR_Integer) 3:
        {
          MR_Word ArgX1_7 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 0))));
          MR_Word ArgY1_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3);
          if (succeeded)
          {
            ArgY1_8 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 0))));
            succeeded = hlds__hlds_goal____Unify____short_reuse_description_0_0(ArgX1_7, ArgY1_8);
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____short_reuse_description_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_17 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_18 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_17 == CastY_18);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_15 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_16 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_16 == CastX_15);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_19_19;
          MR_Word TypeInfo_20_20;
          MR_Word TypeInfo_21_21;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 1))) & (MR_Integer) 1);
          MR_Word ArgY2_6;
          MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_8;
          MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 3))));
          MR_Word ArgY4_10;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 1))) & (MR_Integer) 1);
            ArgY3_8 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            ArgY4_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
            TypeInfo_19_19 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_19_19, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
            if (succeeded)
            {
              succeeded = (ArgX2_5 == ArgY2_6);
              if (succeeded)
              {
                TypeInfo_20_20 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[4]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_20_20, ((MR_Box) (ArgX3_7)), ((MR_Box) (ArgY3_8)));
                if (succeeded)
                {
                  TypeInfo_21_21 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[5]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_21_21, ((MR_Box) (ArgX4_9)), ((MR_Box) (ArgY4_10)));
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_22_22;
          MR_Word ArgX1_11 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) & (MR_Integer) 1);
          MR_Word ArgY1_12;
          MR_Word ArgX2_13 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY2_14;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_12 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
            ArgY2_14 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            succeeded = (ArgX1_11 == ArgY1_12);
            if (succeeded)
            {
              TypeInfo_22_22 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[6]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_22_22, ((MR_Box) (ArgX2_13)), ((MR_Box) (ArgY2_14)));
            }
          }
        }
        break;
    }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____contains_trace_goal_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____contains_trace_goal_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____conj_type_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____conj_type_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____cell_is_unique_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____cell_is_unique_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____catch_part_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    hlds__hlds_goal____Compare____hlds_goal_expr_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX2_7, ArgY2_8);
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____catch_part_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = hlds__hlds_goal____Unify____hlds_goal_expr_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
      succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX2_5, ArgY2_6);
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____cast_kind_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____cast_kind_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____case_id_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_6 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_7 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_6 == CastY_7);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Integer ArgX1_4 = (MR_Integer) (HeadVar__2_2);
    MR_Integer ArgY1_5 = (MR_Integer) (HeadVar__3_3);

    succeeded = (ArgX1_4 < ArgY1_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 1;
    else
    {
      succeeded = (ArgX1_4 > ArgY1_5);
      if (succeeded)
        *HeadVar__1_1 = (MR_Integer) 2;
      else
        *HeadVar__1_1 = (MR_Integer) 0;
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____case_id_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_5 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_6 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_5 == CastY_6);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Integer ArgX1_3 = (MR_Integer) (HeadVar__1_1);
    MR_Integer ArgY1_4 = (MR_Integer) (HeadVar__2_2);

    succeeded = (ArgX1_3 == ArgY1_4);
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____case_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_12 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_13 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_12 == CastY_13);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word SubResult1_6;

    parse_tree__prog_data____Compare____cons_id_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[4]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
        hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX3_10, ArgY3_11);
    }
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____case_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_12_12;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));

    succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
    {
      TypeInfo_12_12 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[4]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_12_12, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
        succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX3_7, ArgY3_8);
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____can_cgc_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____can_cgc_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____call_unify_context_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_12 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_13 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_12 == CastY_13);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      hlds__hlds_goal____Compare____unify_rhs_0_0(&SubResult2_9, ArgX2_7, ArgY2_8);
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
        hlds__hlds_goal____Compare____unify_context_0_0(HeadVar__1_1, ArgX3_10, ArgY3_11);
    }
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____unify_rhs_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_34 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_35 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_34 == CastY_35);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
              MR_Word ArgX2_9 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 1))) & (MR_Integer) 1);
              MR_Word ArgY2_10 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 1))) & (MR_Integer) 1);
              MR_Word ArgX3_12 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word SubResult1_8;

              parse_tree__prog_data____Compare____cons_id_0_0(&SubResult1_8, ArgX1_6, ArgY1_7);
              succeeded = (SubResult1_8 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_8;
              else
              {
                MR_Word SubResult2_11;
                MR_Integer Var_55 = (MR_Integer) (ArgX2_9);
                MR_Integer Var_56 = (MR_Integer) (ArgY2_10);

                succeeded = (Var_55 < Var_56);
                if (succeeded)
                {
                  SubResult2_11 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (Var_55 > Var_56);
                  if (succeeded)
                  {
                    SubResult2_11 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_11;
                else
                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), HeadVar__1_1, ((MR_Box) (ArgX3_12)), ((MR_Box) (ArgY3_13)));
              }
            }
            break;
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_14 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) >> 2)) & (MR_Integer) 3);
              MR_Word ArgY1_15 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) >> 2)) & (MR_Integer) 3);
              MR_Word ArgX2_17 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) >> 1)) & (MR_Integer) 1);
              MR_Word ArgY2_18 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) >> 1)) & (MR_Integer) 1);
              MR_Word ArgX3_20 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
              MR_Word ArgY3_21 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) & (MR_Integer) 1);
              MR_Word ArgX4_23 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY4_24 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word ArgX5_26 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
              MR_Word ArgY5_27 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 2))));
              MR_Word ArgX6_29 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 3))) & (MR_Integer) 7);
              MR_Word ArgY6_30 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 3))) & (MR_Integer) 7);
              MR_Word ArgX7_32 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 4))));
              MR_Word ArgY7_33 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 4))));
              MR_Word SubResult1_16;
              MR_Integer Var_47 = (MR_Integer) (ArgX1_14);
              MR_Integer Var_48 = (MR_Integer) (ArgY1_15);

              succeeded = (Var_47 < Var_48);
              if (succeeded)
              {
                SubResult1_16 = (MR_Integer) 1;
                succeeded = MR_TRUE;
              }
              else
              {
                succeeded = (Var_47 > Var_48);
                if (succeeded)
                {
                  SubResult1_16 = (MR_Integer) 2;
                  succeeded = MR_TRUE;
                }
              }
              if (succeeded)
                *HeadVar__1_1 = SubResult1_16;
              else
              {
                MR_Word SubResult2_19;
                MR_Integer Var_49 = (MR_Integer) (ArgX2_17);
                MR_Integer Var_50 = (MR_Integer) (ArgY2_18);

                succeeded = (Var_49 < Var_50);
                if (succeeded)
                {
                  SubResult2_19 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (Var_49 > Var_50);
                  if (succeeded)
                  {
                    SubResult2_19 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_19;
                else
                {
                  MR_Word SubResult3_22;
                  MR_Integer Var_51 = (MR_Integer) (ArgX3_20);
                  MR_Integer Var_52 = (MR_Integer) (ArgY3_21);

                  succeeded = (Var_51 < Var_52);
                  if (succeeded)
                  {
                    SubResult3_22 = (MR_Integer) 1;
                    succeeded = MR_TRUE;
                  }
                  else
                  {
                    succeeded = (Var_51 > Var_52);
                    if (succeeded)
                    {
                      SubResult3_22 = (MR_Integer) 2;
                      succeeded = MR_TRUE;
                    }
                  }
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_22;
                  else
                  {
                    MR_Word SubResult4_25;

                    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult4_25, ((MR_Box) (ArgX4_23)), ((MR_Box) (ArgY4_24)));
                    succeeded = (SubResult4_25 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_25;
                    else
                    {
                      MR_Word SubResult5_28;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[37]), &SubResult5_28, ((MR_Box) (ArgX5_26)), ((MR_Box) (ArgY5_27)));
                      succeeded = (SubResult5_28 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult5_28;
                      else
                      {
                        MR_Word SubResult6_31;
                        MR_Integer Var_53 = (MR_Integer) (ArgX6_29);
                        MR_Integer Var_54 = (MR_Integer) (ArgY6_30);

                        succeeded = (Var_53 < Var_54);
                        if (succeeded)
                        {
                          SubResult6_31 = (MR_Integer) 1;
                          succeeded = MR_TRUE;
                        }
                        else
                        {
                          succeeded = (Var_53 > Var_54);
                          if (succeeded)
                          {
                            SubResult6_31 = (MR_Integer) 2;
                            succeeded = MR_TRUE;
                          }
                        }
                        if (succeeded)
                          *HeadVar__1_1 = SubResult6_31;
                        else
                          hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX7_32, ArgY7_33);
                      }
                    }
                  }
                }
              }
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_expr_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_104 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_105 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_104 == CastY_105);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_84 = (MR_Word) ((MR_Word) (HeadVar__2_2));
              MR_Word ArgY1_85 = (MR_Word) ((MR_Word) (HeadVar__3_3));

              hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX1_84, ArgY1_85);
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 3:
            switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
              case (MR_Integer) 3:
              case (MR_Integer) 4:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 5:
              case (MR_Integer) 6:
              case (MR_Integer) 7:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
            }
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
              MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 3))));
              MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 4))));
              MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 4))));
              MR_Word SubResult1_6;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
              {
                MR_Word SubResult2_9;

                hlds__hlds_goal____Compare____unify_rhs_0_0(&SubResult2_9, ArgX2_7, ArgY2_8);
                succeeded = (SubResult2_9 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_9;
                else
                {
                  MR_Word SubResult3_12;

                  hlds__hlds_goal____Compare____unify_mode_0_0(&SubResult3_12, ArgX3_10, ArgY3_11);
                  succeeded = (SubResult3_12 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_12;
                  else
                  {
                    MR_Word SubResult4_15;

                    hlds__hlds_goal____Compare____unification_0_0(&SubResult4_15, ArgX4_13, ArgY4_14);
                    succeeded = (SubResult4_15 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_15;
                    else
                      hlds__hlds_goal____Compare____unify_context_0_0(HeadVar__1_1, ArgX5_16, ArgY5_17);
                  }
                }
              }
            }
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_18 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_19 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Integer ArgX2_21 = ((MR_Integer) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Integer ArgY2_22 = ((MR_Integer) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word ArgX3_24 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
              MR_Word ArgY3_25 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 2))));
              MR_Word ArgX4_27 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 3))) & (MR_Integer) 1);
              MR_Word ArgY4_28 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 3))) & (MR_Integer) 1);
              MR_Word ArgX5_30 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 4))));
              MR_Word ArgY5_31 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 4))));
              MR_Word ArgX6_33 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 5))));
              MR_Word ArgY6_34 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 5))));
              MR_Word SubResult1_20;

              hlds__hlds_pred____Compare____pred_id_0_0(&SubResult1_20, ArgX1_18, ArgY1_19);
              succeeded = (SubResult1_20 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_20;
              else
              {
                MR_Word SubResult2_23;

                succeeded = (ArgX2_21 < ArgY2_22);
                if (succeeded)
                {
                  SubResult2_23 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (ArgX2_21 > ArgY2_22);
                  if (succeeded)
                  {
                    SubResult2_23 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_23;
                else
                {
                  MR_Word SubResult3_26;

                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult3_26, ((MR_Box) (ArgX3_24)), ((MR_Box) (ArgY3_25)));
                  succeeded = (SubResult3_26 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_26;
                  else
                  {
                    MR_Word SubResult4_29;
                    MR_Integer Var_149 = (MR_Integer) (ArgX4_27);
                    MR_Integer Var_150 = (MR_Integer) (ArgY4_28);

                    succeeded = (Var_149 < Var_150);
                    if (succeeded)
                    {
                      SubResult4_29 = (MR_Integer) 1;
                      succeeded = MR_TRUE;
                    }
                    else
                    {
                      succeeded = (Var_149 > Var_150);
                      if (succeeded)
                      {
                        SubResult4_29 = (MR_Integer) 2;
                        succeeded = MR_TRUE;
                      }
                    }
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_29;
                    else
                    {
                      MR_Word SubResult5_32;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[18]), &SubResult5_32, ((MR_Box) (ArgX5_30)), ((MR_Box) (ArgY5_31)));
                      succeeded = (SubResult5_32 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult5_32;
                      else
                        mdbcomp__sym_name____Compare____sym_name_0_0(HeadVar__1_1, ArgX6_33, ArgY6_34);
                    }
                  }
                }
              }
            }
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    {
                      MR_Word ArgX1_35 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_36 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_38 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_39 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word ArgX3_41 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Word ArgY3_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word ArgX4_44 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                      MR_Word ArgY4_45 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 4))));
                      MR_Word ArgX5_47 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 5))) & (MR_Integer) 7);
                      MR_Word ArgY5_48 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 5))) & (MR_Integer) 7);
                      MR_Word SubResult1_37;

                      hlds__hlds_goal____Compare____generic_call_0_0(&SubResult1_37, ArgX1_35, ArgY1_36);
                      succeeded = (SubResult1_37 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_37;
                      else
                      {
                        MR_Word SubResult2_40;

                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult2_40, ((MR_Box) (ArgX2_38)), ((MR_Box) (ArgY2_39)));
                        succeeded = (SubResult2_40 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_40;
                        else
                        {
                          MR_Word SubResult3_43;

                          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[17]), &SubResult3_43, ((MR_Box) (ArgX3_41)), ((MR_Box) (ArgY3_42)));
                          succeeded = (SubResult3_43 != (MR_Integer) 0);
                          if (succeeded)
                            *HeadVar__1_1 = SubResult3_43;
                          else
                          {
                            MR_Word SubResult4_46;

                            parse_tree__prog_data____Compare____arg_reg_type_info_0_0(&SubResult4_46, ArgX4_44, ArgY4_45);
                            succeeded = (SubResult4_46 != (MR_Integer) 0);
                            if (succeeded)
                              *HeadVar__1_1 = SubResult4_46;
                            else
                            {
                              MR_Integer Var_147 = (MR_Integer) (ArgX5_47);
                              MR_Integer Var_148 = (MR_Integer) (ArgY5_48);

                              succeeded = (Var_147 < Var_148);
                              if (succeeded)
                                *HeadVar__1_1 = (MR_Integer) 1;
                              else
                              {
                                succeeded = (Var_147 > Var_148);
                                if (succeeded)
                                  *HeadVar__1_1 = (MR_Integer) 2;
                                else
                                  *HeadVar__1_1 = (MR_Integer) 0;
                              }
                            }
                          }
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 1:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 1:
                    {
                      MR_Word ArgX1_49 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_50 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_52 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_53 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Integer ArgX3_55 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Integer ArgY3_56 = ((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word ArgX4_58 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                      MR_Word ArgY4_59 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 4))));
                      MR_Word ArgX5_61 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 5))));
                      MR_Word ArgY5_62 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 5))));
                      MR_Word ArgX6_64 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 6))));
                      MR_Word ArgY6_65 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 6))));
                      MR_Word ArgX7_67 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 7))));
                      MR_Word ArgY7_68 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 7))));
                      MR_Word SubResult1_51;

                      parse_tree__prog_data_foreign____Compare____foreign_proc_attributes_0_0(&SubResult1_51, ArgX1_49, ArgY1_50);
                      succeeded = (SubResult1_51 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_51;
                      else
                      {
                        MR_Word SubResult2_54;

                        hlds__hlds_pred____Compare____pred_id_0_0(&SubResult2_54, ArgX2_52, ArgY2_53);
                        succeeded = (SubResult2_54 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_54;
                        else
                        {
                          MR_Word SubResult3_57;

                          succeeded = (ArgX3_55 < ArgY3_56);
                          if (succeeded)
                          {
                            SubResult3_57 = (MR_Integer) 1;
                            succeeded = MR_TRUE;
                          }
                          else
                          {
                            succeeded = (ArgX3_55 > ArgY3_56);
                            if (succeeded)
                            {
                              SubResult3_57 = (MR_Integer) 2;
                              succeeded = MR_TRUE;
                            }
                          }
                          if (succeeded)
                            *HeadVar__1_1 = SubResult3_57;
                          else
                          {
                            MR_Word SubResult4_60;

                            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[14]), &SubResult4_60, ((MR_Box) (ArgX4_58)), ((MR_Box) (ArgY4_59)));
                            succeeded = (SubResult4_60 != (MR_Integer) 0);
                            if (succeeded)
                              *HeadVar__1_1 = SubResult4_60;
                            else
                            {
                              MR_Word SubResult5_63;

                              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[14]), &SubResult5_63, ((MR_Box) (ArgX5_61)), ((MR_Box) (ArgY5_62)));
                              succeeded = (SubResult5_63 != (MR_Integer) 0);
                              if (succeeded)
                                *HeadVar__1_1 = SubResult5_63;
                              else
                              {
                                MR_Word SubResult6_66;

                                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[16]), &SubResult6_66, ((MR_Box) (ArgX6_64)), ((MR_Box) (ArgY6_65)));
                                succeeded = (SubResult6_66 != (MR_Integer) 0);
                                if (succeeded)
                                  *HeadVar__1_1 = SubResult6_66;
                                else
                                  parse_tree__prog_data_foreign____Compare____pragma_foreign_proc_impl_0_0(HeadVar__1_1, ArgX7_67, ArgY7_68);
                              }
                            }
                          }
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 2:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 2:
                    {
                      MR_Word ArgX1_69 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                      MR_Word ArgY1_70 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 1);
                      MR_Word ArgX2_72 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_73 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word SubResult1_71;
                      MR_Integer Var_145 = (MR_Integer) (ArgX1_69);
                      MR_Integer Var_146 = (MR_Integer) (ArgY1_70);

                      succeeded = (Var_145 < Var_146);
                      if (succeeded)
                      {
                        SubResult1_71 = (MR_Integer) 1;
                        succeeded = MR_TRUE;
                      }
                      else
                      {
                        succeeded = (Var_145 > Var_146);
                        if (succeeded)
                        {
                          SubResult1_71 = (MR_Integer) 2;
                          succeeded = MR_TRUE;
                        }
                      }
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_71;
                      else
                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[13]), HeadVar__1_1, ((MR_Box) (ArgX2_72)), ((MR_Box) (ArgY2_73)));
                    }
                    break;
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 3:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 3:
                    {
                      MR_Word ArgX1_74 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_75 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[13]), HeadVar__1_1, ((MR_Box) (ArgX1_74)), ((MR_Box) (ArgY1_75)));
                    }
                    break;
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 4:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 4:
                    {
                      MR_Word ArgX1_76 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_77 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_79 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                      MR_Word ArgY2_80 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 1);
                      MR_Word ArgX3_82 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Word ArgY3_83 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word SubResult1_78;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_78, ((MR_Box) (ArgX1_76)), ((MR_Box) (ArgY1_77)));
                      succeeded = (SubResult1_78 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_78;
                      else
                      {
                        MR_Word SubResult2_81;
                        MR_Integer Var_143 = (MR_Integer) (ArgX2_79);
                        MR_Integer Var_144 = (MR_Integer) (ArgY2_80);

                        succeeded = (Var_143 < Var_144);
                        if (succeeded)
                        {
                          SubResult2_81 = (MR_Integer) 1;
                          succeeded = MR_TRUE;
                        }
                        else
                        {
                          succeeded = (Var_143 > Var_144);
                          if (succeeded)
                          {
                            SubResult2_81 = (MR_Integer) 2;
                            succeeded = MR_TRUE;
                          }
                        }
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_81;
                        else
                          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[12]), HeadVar__1_1, ((MR_Box) (ArgX3_82)), ((MR_Box) (ArgY3_83)));
                      }
                    }
                    break;
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 5:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 5:
                    {
                      MR_Word ArgX1_86 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_87 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_89 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_90 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word SubResult1_88;

                      hlds__hlds_goal____Compare____scope_reason_0_0(&SubResult1_88, ArgX1_86, ArgY1_87);
                      succeeded = (SubResult1_88 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_88;
                      else
                        hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX2_89, ArgY2_90);
                    }
                    break;
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 6:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 6:
                    {
                      MR_Word ArgX1_91 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_92 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_94 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_95 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word ArgX3_97 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Word ArgY3_98 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word ArgX4_100 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                      MR_Word ArgY4_101 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 4))));
                      MR_Word SubResult1_93;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult1_93, ((MR_Box) (ArgX1_91)), ((MR_Box) (ArgY1_92)));
                      succeeded = (SubResult1_93 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_93;
                      else
                      {
                        MR_Word SubResult2_96;

                        hlds__hlds_goal____Compare____hlds_goal_0_0(&SubResult2_96, ArgX2_94, ArgY2_95);
                        succeeded = (SubResult2_96 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_96;
                        else
                        {
                          MR_Word SubResult3_99;

                          hlds__hlds_goal____Compare____hlds_goal_0_0(&SubResult3_99, ArgX3_97, ArgY3_98);
                          succeeded = (SubResult3_99 != (MR_Integer) 0);
                          if (succeeded)
                            *HeadVar__1_1 = SubResult3_99;
                          else
                            hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX4_100, ArgY4_101);
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 7:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 7:
                    {
                      MR_Word ArgX1_102 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_103 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));

                      hlds__hlds_goal____Compare____shorthand_goal_expr_0_0(HeadVar__1_1, ArgX1_102, ArgY1_103);
                    }
                    break;
                }
                break;
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____shorthand_goal_expr_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_37 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_38 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_37 == CastY_38);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
              MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
              MR_Word SubResult1_6;

              hlds__hlds_goal____Compare____hlds_goal_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
                hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX2_7, ArgY2_8);
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_9 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 3);
              MR_Word ArgY1_10 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 0))) & (MR_Integer) 3);
              MR_Word ArgX2_12 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word ArgX3_15 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_16 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word ArgX4_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
              MR_Word ArgY4_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 3))));
              MR_Word ArgX5_21 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 4))));
              MR_Word ArgY5_22 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 4))));
              MR_Word ArgX6_24 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 5))));
              MR_Word ArgY6_25 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 5))));
              MR_Word ArgX7_27 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 6))));
              MR_Word ArgY7_28 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 6))));
              MR_Word SubResult1_11;
              MR_Integer Var_51 = (MR_Integer) (ArgX1_9);
              MR_Integer Var_52 = (MR_Integer) (ArgY1_10);

              succeeded = (Var_51 < Var_52);
              if (succeeded)
              {
                SubResult1_11 = (MR_Integer) 1;
                succeeded = MR_TRUE;
              }
              else
              {
                succeeded = (Var_51 > Var_52);
                if (succeeded)
                {
                  SubResult1_11 = (MR_Integer) 2;
                  succeeded = MR_TRUE;
                }
              }
              if (succeeded)
                *HeadVar__1_1 = SubResult1_11;
              else
              {
                MR_Word SubResult2_14;

                hlds__hlds_goal____Compare____atomic_interface_vars_0_0(&SubResult2_14, ArgX2_12, ArgY2_13);
                succeeded = (SubResult2_14 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_14;
                else
                {
                  MR_Word SubResult3_17;

                  hlds__hlds_goal____Compare____atomic_interface_vars_0_0(&SubResult3_17, ArgX3_15, ArgY3_16);
                  succeeded = (SubResult3_17 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_17;
                  else
                  {
                    MR_Word SubResult4_20;

                    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[32]), &SubResult4_20, ((MR_Box) (ArgX4_18)), ((MR_Box) (ArgY4_19)));
                    succeeded = (SubResult4_20 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_20;
                    else
                    {
                      MR_Word SubResult5_23;

                      hlds__hlds_goal____Compare____hlds_goal_0_0(&SubResult5_23, ArgX5_21, ArgY5_22);
                      succeeded = (SubResult5_23 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult5_23;
                      else
                      {
                        MR_Word SubResult6_26;

                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[13]), &SubResult6_26, ((MR_Box) (ArgX6_24)), ((MR_Box) (ArgY6_25)));
                        succeeded = (SubResult6_26 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult6_26;
                        else
                          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[33]), HeadVar__1_1, ((MR_Box) (ArgX7_27)), ((MR_Box) (ArgY7_28)));
                      }
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_29 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_30 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Word ArgX2_32 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY2_33 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word ArgX3_35 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
              MR_Word ArgY3_36 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 2))));
              MR_Word SubResult1_31;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[31]), &SubResult1_31, ((MR_Box) (ArgX1_29)), ((MR_Box) (ArgY1_30)));
              succeeded = (SubResult1_31 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_31;
              else
              {
                MR_Word SubResult2_34;

                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult2_34, ((MR_Box) (ArgX2_32)), ((MR_Box) (ArgY2_33)));
                succeeded = (SubResult2_34 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_34;
                else
                  hlds__hlds_goal____Compare____hlds_goal_0_0(HeadVar__1_1, ArgX3_35, ArgY3_36);
              }
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    hlds__hlds_goal____Compare____hlds_goal_expr_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      hlds__hlds_goal____Compare____hlds_goal_info_0_0(HeadVar__1_1, ArgX2_7, ArgY2_8);
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_27 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_28 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_27 == CastY_28);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) >> 2)) & (MR_Integer) 7);
    MR_Word ArgY1_5 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 0))) >> 2)) & (MR_Integer) 7);
    MR_Word ArgX2_7 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) & (MR_Integer) 3);
    MR_Word ArgY2_8 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 0))) & (MR_Integer) 3);
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
    MR_Word ArgX6_19 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
    MR_Word ArgY6_20 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 4))));
    MR_Word ArgX7_22 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 5))));
    MR_Word ArgY7_23 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 5))));
    MR_Word ArgX8_25 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 6))));
    MR_Word ArgY8_26 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 6))));
    MR_Word SubResult1_6;
    MR_Integer Var_37 = (MR_Integer) (ArgX1_4);
    MR_Integer Var_38 = (MR_Integer) (ArgY1_5);

    succeeded = (Var_37 < Var_38);
    if (succeeded)
    {
      SubResult1_6 = (MR_Integer) 1;
      succeeded = MR_TRUE;
    }
    else
    {
      succeeded = (Var_37 > Var_38);
      if (succeeded)
      {
        SubResult1_6 = (MR_Integer) 2;
        succeeded = MR_TRUE;
      }
    }
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;
      MR_Integer Var_39 = (MR_Integer) (ArgX2_7);
      MR_Integer Var_40 = (MR_Integer) (ArgY2_8);

      succeeded = (Var_39 < Var_40);
      if (succeeded)
      {
        SubResult2_9 = (MR_Integer) 1;
        succeeded = MR_TRUE;
      }
      else
      {
        succeeded = (Var_39 > Var_40);
        if (succeeded)
        {
          SubResult2_9 = (MR_Integer) 2;
          succeeded = MR_TRUE;
        }
      }
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;

        hlds__instmap____Compare____instmap_0_0(&SubResult3_12, ArgX3_10, ArgY3_11);
        succeeded = (SubResult3_12 != (MR_Integer) 0);
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
        {
          MR_Word SubResult4_15;

          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), &SubResult4_15, ((MR_Box) (ArgX4_13)), ((MR_Box) (ArgY4_14)));
          succeeded = (SubResult4_15 != (MR_Integer) 0);
          if (succeeded)
            *HeadVar__1_1 = SubResult4_15;
          else
          {
            MR_Word SubResult5_18;

            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[23]), &SubResult5_18, ((MR_Box) (ArgX5_16)), ((MR_Box) (ArgY5_17)));
            succeeded = (SubResult5_18 != (MR_Integer) 0);
            if (succeeded)
              *HeadVar__1_1 = SubResult5_18;
            else
            {
              MR_Word SubResult6_21;
              MR_Unsigned Var_41 = (MR_Unsigned) (ArgX6_19);
              MR_Unsigned Var_42 = (MR_Unsigned) (ArgY6_20);

              succeeded = (Var_41 < Var_42);
              if (succeeded)
              {
                SubResult6_21 = (MR_Integer) 1;
                succeeded = MR_TRUE;
              }
              else
              {
                succeeded = (Var_41 > Var_42);
                if (succeeded)
                {
                  SubResult6_21 = (MR_Integer) 2;
                  succeeded = MR_TRUE;
                }
              }
              if (succeeded)
                *HeadVar__1_1 = SubResult6_21;
              else
              {
                MR_Word SubResult7_24;

                hlds__hlds_goal____Compare____hlds_goal_code_gen_info_0_0(&SubResult7_24, ArgX7_22, ArgY7_23);
                succeeded = (SubResult7_24 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult7_24;
                else
                {
                  MR_Integer CastX_66 = (MR_Integer) (ArgX8_25);
                  MR_Integer CastY_67 = (MR_Integer) (ArgY8_26);

                  succeeded = (CastX_66 == CastY_67);
                  if (succeeded)
                    *HeadVar__1_1 = (MR_Integer) 0;
                  else
                  {
                    MR_Word ArgX1_43 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 0))));
                    MR_Word ArgY1_44 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 0))));
                    MR_Word ArgX2_46 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 1))));
                    MR_Word ArgY2_47 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 1))));
                    MR_Word ArgX3_49 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 2))));
                    MR_Word ArgY3_50 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 2))));
                    MR_Word ArgX4_52 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 3))));
                    MR_Word ArgY4_53 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 3))));
                    MR_Word ArgX5_55 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 4))));
                    MR_Word ArgY5_56 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 4))));
                    MR_Word ArgX6_58 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 5))));
                    MR_Word ArgY6_59 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 5))));
                    MR_Word ArgX7_61 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 6))));
                    MR_Word ArgY7_62 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 6))));
                    MR_Word ArgX8_64 = ((MR_Word) ((MR_hl_field(0, ArgX8_25, 7))));
                    MR_Word ArgY8_65 = ((MR_Word) ((MR_hl_field(0, ArgY8_26, 7))));
                    MR_Word SubResult1_45;

                    mercury__term_context____Compare____term_context_0_0(&SubResult1_45, ArgX1_43, ArgY1_44);
                    succeeded = (SubResult1_45 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult1_45;
                    else
                    {
                      MR_Word SubResult2_48;

                      mdbcomp__goal_path____Compare____reverse_goal_path_0_0(&SubResult2_48, ArgX2_46, ArgY2_47);
                      succeeded = (SubResult2_48 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult2_48;
                      else
                      {
                        MR_Word SubResult3_51;

                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[0]), &SubResult3_51, ((MR_Box) (ArgX3_49)), ((MR_Box) (ArgY3_50)));
                        succeeded = (SubResult3_51 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult3_51;
                        else
                        {
                          MR_Word SubResult4_54;

                          hlds__goal_mode____Compare____goal_mode_0_0(&SubResult4_54, ArgX4_52, ArgY4_53);
                          succeeded = (SubResult4_54 != (MR_Integer) 0);
                          if (succeeded)
                            *HeadVar__1_1 = SubResult4_54;
                          else
                          {
                            MR_Word SubResult5_57;

                            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[19]), &SubResult5_57, ((MR_Box) (ArgX5_55)), ((MR_Box) (ArgY5_56)));
                            succeeded = (SubResult5_57 != (MR_Integer) 0);
                            if (succeeded)
                              *HeadVar__1_1 = SubResult5_57;
                            else
                            {
                              MR_Word SubResult6_60;

                              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[20]), &SubResult6_60, ((MR_Box) (ArgX6_58)), ((MR_Box) (ArgY6_59)));
                              succeeded = (SubResult6_60 != (MR_Integer) 0);
                              if (succeeded)
                                *HeadVar__1_1 = SubResult6_60;
                              else
                              {
                                MR_Word SubResult7_63;

                                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[21]), &SubResult7_63, ((MR_Box) (ArgX7_61)), ((MR_Box) (ArgY7_62)));
                                succeeded = (SubResult7_63 != (MR_Integer) 0);
                                if (succeeded)
                                  *HeadVar__1_1 = SubResult7_63;
                                else
                                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[22]), HeadVar__1_1, ((MR_Box) (ArgX8_64)), ((MR_Box) (ArgY8_65)));
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_code_gen_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_6 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_7 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_6 == CastY_7);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  if ((HeadVar__2_2 == (MR_Word) ((MR_Unsigned) 0U)))
    if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
      *HeadVar__1_1 = (MR_Integer) 0;
    else
      *HeadVar__1_1 = (MR_Integer) 1;
  else
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__1_1 = (MR_Integer) 2;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));

    hlds__hlds_llds____Compare____llds_code_gen_details_0_0(HeadVar__1_1, ArgX1_4, ArgY1_5);
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____unification_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_59 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_60 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_59 == CastY_60);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
              MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
              MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
              MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
              MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
              MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
              MR_Word ArgX5_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
              MR_Word ArgY5_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 4))));
              MR_Word ArgX6_19 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 5))) & (MR_Integer) 1);
              MR_Word ArgY6_20 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 5))) & (MR_Integer) 1);
              MR_Word ArgX7_22 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 6))));
              MR_Word ArgY7_23 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 6))));
              MR_Word SubResult1_6;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
              {
                MR_Word SubResult2_9;

                parse_tree__prog_data____Compare____cons_id_0_0(&SubResult2_9, ArgX2_7, ArgY2_8);
                succeeded = (SubResult2_9 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_9;
                else
                {
                  MR_Word SubResult3_12;

                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult3_12, ((MR_Box) (ArgX3_10)), ((MR_Box) (ArgY3_11)));
                  succeeded = (SubResult3_12 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_12;
                  else
                  {
                    MR_Word SubResult4_15;

                    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[35]), &SubResult4_15, ((MR_Box) (ArgX4_13)), ((MR_Box) (ArgY4_14)));
                    succeeded = (SubResult4_15 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_15;
                    else
                    {
                      MR_Word SubResult5_18;

                      hlds__hlds_goal____Compare____how_to_construct_0_0(&SubResult5_18, ArgX5_16, ArgY5_17);
                      succeeded = (SubResult5_18 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult5_18;
                      else
                      {
                        MR_Word SubResult6_21;
                        MR_Integer Var_87 = (MR_Integer) (ArgX6_19);
                        MR_Integer Var_88 = (MR_Integer) (ArgY6_20);

                        succeeded = (Var_87 < Var_88);
                        if (succeeded)
                        {
                          SubResult6_21 = (MR_Integer) 1;
                          succeeded = MR_TRUE;
                        }
                        else
                        {
                          succeeded = (Var_87 > Var_88);
                          if (succeeded)
                          {
                            SubResult6_21 = (MR_Integer) 2;
                            succeeded = MR_TRUE;
                          }
                        }
                        if (succeeded)
                          *HeadVar__1_1 = SubResult6_21;
                        else
                          hlds__hlds_goal____Compare____construct_sub_info_0_0(HeadVar__1_1, ArgX7_22, ArgY7_23);
                      }
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_24 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_25 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
              MR_Word ArgX2_27 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_28 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word ArgX3_30 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_31 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word ArgX4_33 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
              MR_Word ArgY4_34 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 3))));
              MR_Word ArgX5_36 = ((((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 4))) >> 1)) & (MR_Integer) 1);
              MR_Word ArgY5_37 = ((((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 4))) >> 1)) & (MR_Integer) 1);
              MR_Word ArgX6_39 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 4))) & (MR_Integer) 1);
              MR_Word ArgY6_40 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 4))) & (MR_Integer) 1);
              MR_Word SubResult1_26;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_26, ((MR_Box) (ArgX1_24)), ((MR_Box) (ArgY1_25)));
              succeeded = (SubResult1_26 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_26;
              else
              {
                MR_Word SubResult2_29;

                parse_tree__prog_data____Compare____cons_id_0_0(&SubResult2_29, ArgX2_27, ArgY2_28);
                succeeded = (SubResult2_29 != (MR_Integer) 0);
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_29;
                else
                {
                  MR_Word SubResult3_32;

                  mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult3_32, ((MR_Box) (ArgX3_30)), ((MR_Box) (ArgY3_31)));
                  succeeded = (SubResult3_32 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_32;
                  else
                  {
                    MR_Word SubResult4_35;

                    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[35]), &SubResult4_35, ((MR_Box) (ArgX4_33)), ((MR_Box) (ArgY4_34)));
                    succeeded = (SubResult4_35 != (MR_Integer) 0);
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_35;
                    else
                    {
                      MR_Word SubResult5_38;
                      MR_Integer Var_83 = (MR_Integer) (ArgX5_36);
                      MR_Integer Var_84 = (MR_Integer) (ArgY5_37);

                      succeeded = (Var_83 < Var_84);
                      if (succeeded)
                      {
                        SubResult5_38 = (MR_Integer) 1;
                        succeeded = MR_TRUE;
                      }
                      else
                      {
                        succeeded = (Var_83 > Var_84);
                        if (succeeded)
                        {
                          SubResult5_38 = (MR_Integer) 2;
                          succeeded = MR_TRUE;
                        }
                      }
                      if (succeeded)
                        *HeadVar__1_1 = SubResult5_38;
                      else
                      {
                        MR_Integer Var_85 = (MR_Integer) (ArgX6_39);
                        MR_Integer Var_86 = (MR_Integer) (ArgY6_40);

                        succeeded = (Var_85 < Var_86);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 1;
                        else
                        {
                          succeeded = (Var_85 > Var_86);
                          if (succeeded)
                            *HeadVar__1_1 = (MR_Integer) 2;
                          else
                            *HeadVar__1_1 = (MR_Integer) 0;
                        }
                      }
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_41 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_42 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Word ArgX2_44 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Word ArgY2_45 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word SubResult1_43;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_43, ((MR_Box) (ArgX1_41)), ((MR_Box) (ArgY1_42)));
              succeeded = (SubResult1_43 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_43;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX2_44)), ((MR_Box) (ArgY2_45)));
            }
            break;
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    {
                      MR_Word ArgX1_46 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_47 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_49 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_50 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word SubResult1_48;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_48, ((MR_Box) (ArgX1_46)), ((MR_Box) (ArgY1_47)));
                      succeeded = (SubResult1_48 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_48;
                      else
                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX2_49)), ((MR_Box) (ArgY2_50)));
                    }
                    break;
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 1:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 1:
                    {
                      MR_Word ArgX1_51 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_52 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_54 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                      MR_Word ArgY2_55 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 1);
                      MR_Word ArgX3_57 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Word ArgY3_58 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word SubResult1_53;

                      hlds__hlds_goal____Compare____unify_mode_0_0(&SubResult1_53, ArgX1_51, ArgY1_52);
                      succeeded = (SubResult1_53 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_53;
                      else
                      {
                        MR_Word SubResult2_56;
                        MR_Integer Var_81 = (MR_Integer) (ArgX2_54);
                        MR_Integer Var_82 = (MR_Integer) (ArgY2_55);

                        succeeded = (Var_81 < Var_82);
                        if (succeeded)
                        {
                          SubResult2_56 = (MR_Integer) 1;
                          succeeded = MR_TRUE;
                        }
                        else
                        {
                          succeeded = (Var_81 > Var_82);
                          if (succeeded)
                          {
                            SubResult2_56 = (MR_Integer) 2;
                            succeeded = MR_TRUE;
                          }
                        }
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_56;
                        else
                          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), HeadVar__1_1, ((MR_Box) (ArgX3_57)), ((MR_Box) (ArgY3_58)));
                      }
                    }
                    break;
                }
                break;
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____unify_mode_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_15 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_16 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_15 == CastY_16);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 3))));
    MR_Word SubResult1_6;

    parse_tree__prog_data____Compare____mer_inst_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      parse_tree__prog_data____Compare____mer_inst_0_0(&SubResult2_9, ArgX2_7, ArgY2_8);
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
      {
        MR_Word SubResult3_12;

        parse_tree__prog_data____Compare____mer_inst_0_0(&SubResult3_12, ArgX3_10, ArgY3_11);
        succeeded = (SubResult3_12 != (MR_Integer) 0);
        if (succeeded)
          *HeadVar__1_1 = SubResult3_12;
        else
          parse_tree__prog_data____Compare____mer_inst_0_0(HeadVar__1_1, ArgX4_13, ArgY4_14);
      }
    }
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____how_to_construct_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_10 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_11 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_10 == CastY_11);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 0;
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_8 = (MR_Word) (MR_body((MR_Word) (HeadVar__2_2), (MR_Integer) 1));
              MR_Word ArgY1_9 = (MR_Word) (MR_body((MR_Word) (HeadVar__3_3), (MR_Integer) 1));

              hlds__hlds_goal____Compare____cell_to_reuse_0_0(HeadVar__1_1, ArgX1_8, ArgY1_9);
            }
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_4 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
              MR_Word ArgY1_5 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 0))) & (MR_Integer) 1);
              MR_Integer Var_15 = (MR_Integer) (ArgX1_4);
              MR_Integer Var_16 = (MR_Integer) (ArgY1_5);

              succeeded = (Var_15 < Var_16);
              if (succeeded)
                *HeadVar__1_1 = (MR_Integer) 1;
              else
              {
                succeeded = (Var_15 > Var_16);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 2;
                else
                  *HeadVar__1_1 = (MR_Integer) 0;
              }
            }
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
          case (MR_Integer) 3:
            {
              MR_Word ArgX1_6 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 0))));
              MR_Word ArgY1_7 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 0))));

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX1_6)), ((MR_Box) (ArgY1_7)));
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____cell_to_reuse_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_12 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_13 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_12 == CastY_13);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word ArgX3_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgY3_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
    {
      MR_Word SubResult2_9;

      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[4]), &SubResult2_9, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
      succeeded = (SubResult2_9 != (MR_Integer) 0);
      if (succeeded)
        *HeadVar__1_1 = SubResult2_9;
      else
        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[5]), HeadVar__1_1, ((MR_Box) (ArgX3_10)), ((MR_Box) (ArgY3_11)));
    }
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____construct_sub_info_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  if ((HeadVar__2_2 == (MR_Word) ((MR_Unsigned) 0U)))
    if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
      *HeadVar__1_1 = (MR_Integer) 0;
    else
      *HeadVar__1_1 = (MR_Integer) 2;
  else
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[7]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[8]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____scope_reason_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_61 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_62 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_61 == CastY_62);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 1))) & (MR_Integer) 1);
              MR_Word ArgY2_8 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 1))) & (MR_Integer) 1);
              MR_Word SubResult1_6;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
              {
                MR_Integer Var_104 = (MR_Integer) (ArgX2_7);
                MR_Integer Var_105 = (MR_Integer) (ArgY2_8);

                succeeded = (Var_104 < Var_105);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 1;
                else
                {
                  succeeded = (Var_104 > Var_105);
                  if (succeeded)
                    *HeadVar__1_1 = (MR_Integer) 2;
                  else
                    *HeadVar__1_1 = (MR_Integer) 0;
                }
              }
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_9 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 7);
              MR_Word ArgY1_10 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__3_3, 0))) & (MR_Integer) 7);
              MR_Word ArgX2_12 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word SubResult1_11;
              MR_Integer Var_102 = (MR_Integer) (ArgX1_9);
              MR_Integer Var_103 = (MR_Integer) (ArgY1_10);

              succeeded = (Var_102 < Var_103);
              if (succeeded)
              {
                SubResult1_11 = (MR_Integer) 1;
                succeeded = MR_TRUE;
              }
              else
              {
                succeeded = (Var_102 > Var_103);
                if (succeeded)
                {
                  SubResult1_11 = (MR_Integer) 2;
                  succeeded = MR_TRUE;
                }
              }
              if (succeeded)
                *HeadVar__1_1 = SubResult1_11;
              else
                mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[30]), HeadVar__1_1, ((MR_Box) (ArgX2_12)), ((MR_Box) (ArgY2_13)));
            }
            break;
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_14 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_15 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Word ArgX2_17 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 1))) & (MR_Integer) 3);
              MR_Word ArgY2_18 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__3_3, 1))) & (MR_Integer) 3);
              MR_Word SubResult1_16;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), &SubResult1_16, ((MR_Box) (ArgX1_14)), ((MR_Box) (ArgY1_15)));
              succeeded = (SubResult1_16 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_16;
              else
              {
                MR_Integer Var_100 = (MR_Integer) (ArgX2_17);
                MR_Integer Var_101 = (MR_Integer) (ArgY2_18);

                succeeded = (Var_100 < Var_101);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 1;
                else
                {
                  succeeded = (Var_100 > Var_101);
                  if (succeeded)
                    *HeadVar__1_1 = (MR_Integer) 2;
                  else
                    *HeadVar__1_1 = (MR_Integer) 0;
                }
              }
            }
            break;
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    {
                      MR_Word ArgX1_19 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                      MR_Word ArgY1_20 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 3);
                      MR_Integer Var_98 = (MR_Integer) (ArgX1_19);
                      MR_Integer Var_99 = (MR_Integer) (ArgY1_20);

                      succeeded = (Var_98 < Var_99);
                      if (succeeded)
                        *HeadVar__1_1 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_98 > Var_99);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 2;
                        else
                          *HeadVar__1_1 = (MR_Integer) 0;
                      }
                    }
                    break;
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 1:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 1:
                    {
                      MR_Word ArgX1_21 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 7);
                      MR_Word ArgY1_22 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 7);
                      MR_Integer Var_96 = (MR_Integer) (ArgX1_21);
                      MR_Integer Var_97 = (MR_Integer) (ArgY1_22);

                      succeeded = (Var_96 < Var_97);
                      if (succeeded)
                        *HeadVar__1_1 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_96 > Var_97);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 2;
                        else
                          *HeadVar__1_1 = (MR_Integer) 0;
                      }
                    }
                    break;
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 2:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 2:
                    {
                      MR_Word ArgX1_23 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_24 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX1_23)), ((MR_Box) (ArgY1_24)));
                    }
                    break;
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 3:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 3:
                    {
                      MR_Word ArgX1_25 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_26 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_28 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 7);
                      MR_Word ArgY2_29 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 7);
                      MR_Word SubResult1_27;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_27, ((MR_Box) (ArgX1_25)), ((MR_Box) (ArgY1_26)));
                      succeeded = (SubResult1_27 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_27;
                      else
                      {
                        MR_Integer Var_94 = (MR_Integer) (ArgX2_28);
                        MR_Integer Var_95 = (MR_Integer) (ArgY2_29);

                        succeeded = (Var_94 < Var_95);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 1;
                        else
                        {
                          succeeded = (Var_94 > Var_95);
                          if (succeeded)
                            *HeadVar__1_1 = (MR_Integer) 2;
                          else
                            *HeadVar__1_1 = (MR_Integer) 0;
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 4:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 4:
                    {
                      MR_Word ArgX1_30 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                      MR_Word ArgY1_31 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 1);
                      MR_Integer Var_92 = (MR_Integer) (ArgX1_30);
                      MR_Integer Var_93 = (MR_Integer) (ArgY1_31);

                      succeeded = (Var_92 < Var_93);
                      if (succeeded)
                        *HeadVar__1_1 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_92 > Var_93);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 2;
                        else
                          *HeadVar__1_1 = (MR_Integer) 0;
                      }
                    }
                    break;
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 5:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 5:
                    {
                      MR_Word ArgX1_32 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                      MR_Word ArgY1_33 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 1))) & (MR_Integer) 1);
                      MR_Integer Var_90 = (MR_Integer) (ArgX1_32);
                      MR_Integer Var_91 = (MR_Integer) (ArgY1_33);

                      succeeded = (Var_90 < Var_91);
                      if (succeeded)
                        *HeadVar__1_1 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_90 > Var_91);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 2;
                        else
                          *HeadVar__1_1 = (MR_Integer) 0;
                      }
                    }
                    break;
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 6:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 6:
                    {
                      MR_Word ArgX1_34 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_35 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_37 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 3);
                      MR_Word ArgY2_38 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 2))) & (MR_Integer) 3);
                      MR_Word SubResult1_36;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_36, ((MR_Box) (ArgX1_34)), ((MR_Box) (ArgY1_35)));
                      succeeded = (SubResult1_36 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_36;
                      else
                      {
                        MR_Integer Var_88 = (MR_Integer) (ArgX2_37);
                        MR_Integer Var_89 = (MR_Integer) (ArgY2_38);

                        succeeded = (Var_88 < Var_89);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 1;
                        else
                        {
                          succeeded = (Var_88 > Var_89);
                          if (succeeded)
                            *HeadVar__1_1 = (MR_Integer) 2;
                          else
                            *HeadVar__1_1 = (MR_Integer) 0;
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 7:
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 7:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 7:
                    {
                      MR_Word ArgX1_39 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_40 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_43 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word ArgX3_45 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                      MR_Word ArgY3_46 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 3))));
                      MR_Word ArgX4_48 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                      MR_Word ArgY4_49 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 4))));
                      MR_Word ArgX5_51 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 5))));
                      MR_Word ArgY5_52 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 5))));
                      MR_Word SubResult1_41;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[27]), &SubResult1_41, ((MR_Box) (ArgX1_39)), ((MR_Box) (ArgY1_40)));
                      succeeded = (SubResult1_41 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_41;
                      else
                      {
                        MR_Word SubResult2_44;

                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[16]), &SubResult2_44, ((MR_Box) (ArgX2_42)), ((MR_Box) (ArgY2_43)));
                        succeeded = (SubResult2_44 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_44;
                        else
                        {
                          MR_Word SubResult3_47;

                          mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[28]), &SubResult3_47, ((MR_Box) (ArgX3_45)), ((MR_Box) (ArgY3_46)));
                          succeeded = (SubResult3_47 != (MR_Integer) 0);
                          if (succeeded)
                            *HeadVar__1_1 = SubResult3_47;
                          else
                          {
                            MR_Word SubResult4_50;

                            mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[29]), &SubResult4_50, ((MR_Box) (ArgX4_48)), ((MR_Box) (ArgY4_49)));
                            succeeded = (SubResult4_50 != (MR_Integer) 0);
                            if (succeeded)
                              *HeadVar__1_1 = SubResult4_50;
                            else
                              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[11]), HeadVar__1_1, ((MR_Box) (ArgX5_51)), ((MR_Box) (ArgY5_52)));
                          }
                        }
                      }
                    }
                    break;
                  case (MR_Integer) 8:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
            }
            break;
          case (MR_Integer) 8:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
              case (MR_Integer) 1:
              case (MR_Integer) 2:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, HeadVar__3_3, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 2:
                  case (MR_Integer) 3:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                  case (MR_Integer) 6:
                  case (MR_Integer) 7:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 8:
                    {
                      MR_Word ArgX1_53 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                      MR_Word ArgY1_54 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 1))));
                      MR_Word ArgX2_56 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                      MR_Word ArgY2_57 = ((MR_Word) ((MR_hl_field(3, HeadVar__3_3, 2))));
                      MR_Word ArgX3_59 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 3))) & (MR_Integer) 1);
                      MR_Word ArgY3_60 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 3))) & (MR_Integer) 1);
                      MR_Word SubResult1_55;

                      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_55, ((MR_Box) (ArgX1_53)), ((MR_Box) (ArgY1_54)));
                      succeeded = (SubResult1_55 != (MR_Integer) 0);
                      if (succeeded)
                        *HeadVar__1_1 = SubResult1_55;
                      else
                      {
                        MR_Word SubResult2_58;

                        mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult2_58, ((MR_Box) (ArgX2_56)), ((MR_Box) (ArgY2_57)));
                        succeeded = (SubResult2_58 != (MR_Integer) 0);
                        if (succeeded)
                          *HeadVar__1_1 = SubResult2_58;
                        else
                        {
                          MR_Integer Var_86 = (MR_Integer) (ArgX3_59);
                          MR_Integer Var_87 = (MR_Integer) (ArgY3_60);

                          succeeded = (Var_86 < Var_87);
                          if (succeeded)
                            *HeadVar__1_1 = (MR_Integer) 1;
                          else
                          {
                            succeeded = (Var_86 > Var_87);
                            if (succeeded)
                              *HeadVar__1_1 = (MR_Integer) 2;
                            else
                              *HeadVar__1_1 = (MR_Integer) 0;
                          }
                        }
                      }
                    }
                    break;
                }
                break;
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____generic_call_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_33 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_34 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_33 == CastY_34);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
              MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
              MR_Word ArgX2_7 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 1))) >> 1)) & (MR_Integer) 3);
              MR_Word ArgY2_8 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 1))) >> 1)) & (MR_Integer) 3);
              MR_Word ArgX3_10 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 1))) & (MR_Integer) 1);
              MR_Word ArgY3_11 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 1))) & (MR_Integer) 1);
              MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
              MR_Word ArgY4_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 2))));
              MR_Word ArgX5_16 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 3))) & (MR_Integer) 1);
              MR_Word ArgY5_17 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__3_3, 3))) & (MR_Integer) 1);
              MR_Word SubResult1_6;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
              succeeded = (SubResult1_6 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_6;
              else
              {
                MR_Word SubResult2_9;
                MR_Integer Var_50 = (MR_Integer) (ArgX2_7);
                MR_Integer Var_51 = (MR_Integer) (ArgY2_8);

                succeeded = (Var_50 < Var_51);
                if (succeeded)
                {
                  SubResult2_9 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (Var_50 > Var_51);
                  if (succeeded)
                  {
                    SubResult2_9 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_9;
                else
                {
                  MR_Word SubResult3_12;
                  MR_Integer Var_52 = (MR_Integer) (ArgX3_10);
                  MR_Integer Var_53 = (MR_Integer) (ArgY3_11);

                  succeeded = (Var_52 < Var_53);
                  if (succeeded)
                  {
                    SubResult3_12 = (MR_Integer) 1;
                    succeeded = MR_TRUE;
                  }
                  else
                  {
                    succeeded = (Var_52 > Var_53);
                    if (succeeded)
                    {
                      SubResult3_12 = (MR_Integer) 2;
                      succeeded = MR_TRUE;
                    }
                  }
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_12;
                  else
                  {
                    MR_Word SubResult4_15;
                    MR_Integer Var_54 = (MR_Integer) (ArgX4_13);
                    MR_Integer Var_55 = (MR_Integer) (ArgY4_14);

                    succeeded = (Var_54 < Var_55);
                    if (succeeded)
                    {
                      SubResult4_15 = (MR_Integer) 1;
                      succeeded = MR_TRUE;
                    }
                    else
                    {
                      succeeded = (Var_54 > Var_55);
                      if (succeeded)
                      {
                        SubResult4_15 = (MR_Integer) 2;
                        succeeded = MR_TRUE;
                      }
                    }
                    if (succeeded)
                      *HeadVar__1_1 = SubResult4_15;
                    else
                    {
                      MR_Integer Var_56 = (MR_Integer) (ArgX5_16);
                      MR_Integer Var_57 = (MR_Integer) (ArgY5_17);

                      succeeded = (Var_56 < Var_57);
                      if (succeeded)
                        *HeadVar__1_1 = (MR_Integer) 1;
                      else
                      {
                        succeeded = (Var_56 > Var_57);
                        if (succeeded)
                          *HeadVar__1_1 = (MR_Integer) 2;
                        else
                          *HeadVar__1_1 = (MR_Integer) 0;
                      }
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 1:
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Word ArgY1_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
              MR_Word ArgX2_21 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
              MR_Word ArgY2_22 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
              MR_Word ArgX3_24 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
              MR_Word ArgY3_25 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 2))));
              MR_Word ArgX4_27 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
              MR_Word ArgY4_28 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 3))));
              MR_Word SubResult1_20;

              mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_20, ((MR_Box) (ArgX1_18)), ((MR_Box) (ArgY1_19)));
              succeeded = (SubResult1_20 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_20;
              else
              {
                MR_Word SubResult2_23;
                MR_Integer Var_48 = (MR_Integer) (ArgX2_21);
                MR_Integer Var_49 = (MR_Integer) (ArgY2_22);

                succeeded = (Var_48 < Var_49);
                if (succeeded)
                {
                  SubResult2_23 = (MR_Integer) 1;
                  succeeded = MR_TRUE;
                }
                else
                {
                  succeeded = (Var_48 > Var_49);
                  if (succeeded)
                  {
                    SubResult2_23 = (MR_Integer) 2;
                    succeeded = MR_TRUE;
                  }
                }
                if (succeeded)
                  *HeadVar__1_1 = SubResult2_23;
                else
                {
                  MR_Word SubResult3_26;

                  parse_tree__prog_data____Compare____class_id_0_0(&SubResult3_26, ArgX3_24, ArgY3_25);
                  succeeded = (SubResult3_26 != (MR_Integer) 0);
                  if (succeeded)
                    *HeadVar__1_1 = SubResult3_26;
                  else
                    parse_tree__prog_data____Compare____pf_sym_name_arity_0_0(HeadVar__1_1, ArgX4_27, ArgY4_28);
                }
              }
            }
            break;
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_String ArgX1_29 = ((MR_String) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_String ArgY1_30 = ((MR_String) ((MR_hl_field(2, HeadVar__3_3, 0))));

              mercury__private_builtin__builtin_compare_string_3_p_0(HeadVar__1_1, ArgX1_29, ArgY1_30);
            }
            break;
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 3:
            {
              MR_Word ArgX1_31 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 0))) & (MR_Integer) 7);
              MR_Word ArgY1_32 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__3_3, 0))) & (MR_Integer) 7);
              MR_Integer Var_46 = (MR_Integer) (ArgX1_31);
              MR_Integer Var_47 = (MR_Integer) (ArgY1_32);

              succeeded = (Var_46 < Var_47);
              if (succeeded)
                *HeadVar__1_1 = (MR_Integer) 1;
              else
              {
                succeeded = (Var_46 > Var_47);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 2;
                else
                  *HeadVar__1_1 = (MR_Integer) 0;
              }
            }
            break;
        }
        break;
    }
}

void MR_CALL 
hlds__hlds_goal____Compare____unify_context_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    hlds__hlds_goal____Compare____unify_main_context_0_0(&SubResult1_6, ArgX1_4, ArgY1_5);
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[36]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
  }
}

void MR_CALL 
hlds__hlds_goal____Compare____unify_main_context_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_13 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_14 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_13 == CastY_14);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
    switch (MR_tag((MR_Word) HeadVar__2_2)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        switch (MR_unmkbody(HeadVar__2_2)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                switch (MR_unmkbody(HeadVar__3_3)) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 0;
                    break;
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 1;
                    break;
                }
                break;
              case (MR_Integer) 1:
              case (MR_Integer) 2:
              case (MR_Integer) 3:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
            }
            break;
          case (MR_Integer) 1:
            switch (MR_tag((MR_Word) HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                switch (MR_unmkbody(HeadVar__3_3)) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                    *HeadVar__1_1 = (MR_Integer) 2;
                    break;
                  case (MR_Integer) 1:
                    *HeadVar__1_1 = (MR_Integer) 0;
                    break;
                }
                break;
              case (MR_Integer) 1:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 2:
              case (MR_Integer) 3:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
            }
            break;
        }
        break;
      case (MR_Integer) 1:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            switch (MR_unmkbody(HeadVar__3_3)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                *HeadVar__1_1 = (MR_Integer) 2;
                break;
              case (MR_Integer) 1:
                *HeadVar__1_1 = (MR_Integer) 1;
                break;
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Integer ArgX1_4 = ((MR_Integer) ((MR_hl_field(1, HeadVar__2_2, 0))));
              MR_Integer ArgY1_5 = ((MR_Integer) ((MR_hl_field(1, HeadVar__3_3, 0))));

              succeeded = (ArgX1_4 < ArgY1_5);
              if (succeeded)
                *HeadVar__1_1 = (MR_Integer) 1;
              else
              {
                succeeded = (ArgX1_4 > ArgY1_5);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 2;
                else
                  *HeadVar__1_1 = (MR_Integer) 0;
              }
            }
            break;
          case (MR_Integer) 2:
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 2:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 2:
            {
              MR_Word ArgX1_6 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
              MR_Word ArgY1_7 = ((MR_Word) ((MR_hl_field(2, HeadVar__3_3, 0))));
              MR_Integer ArgX2_9 = ((MR_Integer) ((MR_hl_field(2, HeadVar__2_2, 1))));
              MR_Integer ArgY2_10 = ((MR_Integer) ((MR_hl_field(2, HeadVar__3_3, 1))));
              MR_Word SubResult1_8;

              hlds__hlds_pred____Compare____call_id_0_0(&SubResult1_8, ArgX1_6, ArgY1_7);
              succeeded = (SubResult1_8 != (MR_Integer) 0);
              if (succeeded)
                *HeadVar__1_1 = SubResult1_8;
              else
              {
                succeeded = (ArgX2_9 < ArgY2_10);
                if (succeeded)
                  *HeadVar__1_1 = (MR_Integer) 1;
                else
                {
                  succeeded = (ArgX2_9 > ArgY2_10);
                  if (succeeded)
                    *HeadVar__1_1 = (MR_Integer) 2;
                  else
                    *HeadVar__1_1 = (MR_Integer) 0;
                }
              }
            }
            break;
          case (MR_Integer) 3:
            *HeadVar__1_1 = (MR_Integer) 1;
            break;
        }
        break;
      case (MR_Integer) 3:
        switch (MR_tag((MR_Word) HeadVar__3_3)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
          case (MR_Integer) 1:
          case (MR_Integer) 2:
            *HeadVar__1_1 = (MR_Integer) 2;
            break;
          case (MR_Integer) 3:
            {
              MR_String ArgX1_11 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 0))));
              MR_String ArgY1_12 = ((MR_String) ((MR_hl_field(3, HeadVar__3_3, 0))));

              mercury__private_builtin__builtin_compare_string_3_p_0(HeadVar__1_1, ArgX1_11, ArgY1_12);
            }
            break;
        }
        break;
    }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____call_unify_context_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      succeeded = hlds__hlds_goal____Unify____unify_rhs_0_0(ArgX2_5, ArgY2_6);
      if (succeeded)
        succeeded = hlds__hlds_goal____Unify____unify_context_0_0(ArgX3_7, ArgY3_8);
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_rhs_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_25 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_26 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_25 == CastY_26);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_31_31;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            TypeInfo_31_31 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_31_31, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_28_28;
          MR_Word ArgX1_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_6;
          MR_Word ArgX2_7 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 1))) & (MR_Integer) 1);
          MR_Word ArgY2_8;
          MR_Word ArgX3_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_10;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_8 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 1))) & (MR_Integer) 1);
            ArgY3_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX1_5, ArgY1_6);
            if (succeeded)
            {
              succeeded = (ArgX2_7 == ArgY2_8);
              if (succeeded)
              {
                TypeInfo_28_28 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_28_28, ((MR_Box) (ArgX3_9)), ((MR_Box) (ArgY3_10)));
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_29_29;
          MR_Word TypeInfo_30_30;
          MR_Word ArgX1_11 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) >> 2)) & (MR_Integer) 3);
          MR_Word ArgY1_12;
          MR_Word ArgX2_13 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) >> 1)) & (MR_Integer) 1);
          MR_Word ArgY2_14;
          MR_Word ArgX3_15 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) & (MR_Integer) 1);
          MR_Word ArgY3_16;
          MR_Word ArgX4_17 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY4_18;
          MR_Word ArgX5_19 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 2))));
          MR_Word ArgY5_20;
          MR_Word ArgX6_21 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 3))) & (MR_Integer) 7);
          MR_Word ArgY6_22;
          MR_Word ArgX7_23 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 4))));
          MR_Word ArgY7_24;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_12 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) >> 2)) & (MR_Integer) 3);
            ArgY2_14 = ((((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) >> 1)) & (MR_Integer) 1);
            ArgY3_16 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
            ArgY4_18 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            ArgY5_20 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
            ArgY6_22 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 3))) & (MR_Integer) 7);
            ArgY7_24 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 4))));
            succeeded = (ArgX1_11 == ArgY1_12);
            if (succeeded)
            {
              succeeded = (ArgX2_13 == ArgY2_14);
              if (succeeded)
              {
                succeeded = (ArgX3_15 == ArgY3_16);
                if (succeeded)
                {
                  TypeInfo_29_29 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_29_29, ((MR_Box) (ArgX4_17)), ((MR_Box) (ArgY4_18)));
                  if (succeeded)
                  {
                    TypeInfo_30_30 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[37]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_30_30, ((MR_Box) (ArgX5_19)), ((MR_Box) (ArgY5_20)));
                    if (succeeded)
                    {
                      succeeded = (ArgX6_21 == ArgY6_22);
                      if (succeeded)
                        succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX7_23, ArgY7_24);
                    }
                  }
                }
              }
            }
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_expr_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_77 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_78 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_77 == CastY_78);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word ArgX1_61 = (MR_Word) ((MR_Word) (HeadVar__1_1));
          MR_Word ArgY1_62;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_62 = (MR_Word) ((MR_Word) (HeadVar__2_2));
            succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX1_61, ArgY1_62);
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_99_99;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_6;
          MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_8;
          MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 3))));
          MR_Word ArgY4_10;
          MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 4))));
          MR_Word ArgY5_12;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            ArgY3_8 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            ArgY4_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
            ArgY5_12 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 4))));
            TypeInfo_99_99 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_99_99, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
            if (succeeded)
            {
              succeeded = hlds__hlds_goal____Unify____unify_rhs_0_0(ArgX2_5, ArgY2_6);
              if (succeeded)
              {
                succeeded = hlds__hlds_goal____Unify____unify_mode_0_0(ArgX3_7, ArgY3_8);
                if (succeeded)
                {
                  succeeded = hlds__hlds_goal____Unify____unification_0_0(ArgX4_9, ArgY4_10);
                  if (succeeded)
                    succeeded = hlds__hlds_goal____Unify____unify_context_0_0(ArgX5_11, ArgY5_12);
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_94_94;
          MR_Word TypeInfo_95_95;
          MR_Word ArgX1_13 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_14;
          MR_Integer ArgX2_15 = ((MR_Integer) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Integer ArgY2_16;
          MR_Word ArgX3_17 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 2))));
          MR_Word ArgY3_18;
          MR_Word ArgX4_19 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 3))) & (MR_Integer) 1);
          MR_Word ArgY4_20;
          MR_Word ArgX5_21 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 4))));
          MR_Word ArgY5_22;
          MR_Word ArgX6_23 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 5))));
          MR_Word ArgY6_24;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_14 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_16 = ((MR_Integer) ((MR_hl_field(2, HeadVar__2_2, 1))));
            ArgY3_18 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
            ArgY4_20 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 3))) & (MR_Integer) 1);
            ArgY5_22 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 4))));
            ArgY6_24 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 5))));
            succeeded = hlds__hlds_pred____Unify____pred_id_0_0(ArgX1_13, ArgY1_14);
            if (succeeded)
            {
              succeeded = (ArgX2_15 == ArgY2_16);
              if (succeeded)
              {
                TypeInfo_94_94 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_94_94, ((MR_Box) (ArgX3_17)), ((MR_Box) (ArgY3_18)));
                if (succeeded)
                {
                  succeeded = (ArgX4_19 == ArgY4_20);
                  if (succeeded)
                  {
                    TypeInfo_95_95 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[18]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_95_95, ((MR_Box) (ArgX5_21)), ((MR_Box) (ArgY5_22)));
                    if (succeeded)
                      succeeded = mdbcomp__sym_name____Unify____sym_name_0_0(ArgX6_23, ArgY6_24);
                  }
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word TypeInfo_88_88;
              MR_Word TypeInfo_89_89;
              MR_Word ArgX1_25 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_26;
              MR_Word ArgX2_27 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_28;
              MR_Word ArgX3_29 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Word ArgY3_30;
              MR_Word ArgX4_31 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 4))));
              MR_Word ArgY4_32;
              MR_Word ArgX5_33 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 5))) & (MR_Integer) 7);
              MR_Word ArgY5_34;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 0)));
              if (succeeded)
              {
                ArgY1_26 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_28 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                ArgY3_30 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                ArgY4_32 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                ArgY5_34 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 5))) & (MR_Integer) 7);
                succeeded = hlds__hlds_goal____Unify____generic_call_0_0(ArgX1_25, ArgY1_26);
                if (succeeded)
                {
                  TypeInfo_88_88 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_88_88, ((MR_Box) (ArgX2_27)), ((MR_Box) (ArgY2_28)));
                  if (succeeded)
                  {
                    TypeInfo_89_89 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[17]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_89_89, ((MR_Box) (ArgX3_29)), ((MR_Box) (ArgY3_30)));
                    if (succeeded)
                    {
                      succeeded = parse_tree__prog_data____Unify____arg_reg_type_info_0_0(ArgX4_31, ArgY4_32);
                      if (succeeded)
                        succeeded = (ArgX5_33 == ArgY5_34);
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Word TypeInfo_82_82;
              MR_Word TypeInfo_83_83;
              MR_Word TypeInfo_84_84;
              MR_Word ArgX1_35 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_36;
              MR_Word ArgX2_37 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_38;
              MR_Integer ArgX3_39 = ((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Integer ArgY3_40;
              MR_Word ArgX4_41 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 4))));
              MR_Word ArgY4_42;
              MR_Word ArgX5_43 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 5))));
              MR_Word ArgY5_44;
              MR_Word ArgX6_45 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 6))));
              MR_Word ArgY6_46;
              MR_Word ArgX7_47 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 7))));
              MR_Word ArgY7_48;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 1)));
              if (succeeded)
              {
                ArgY1_36 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_38 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                ArgY3_40 = ((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 3))));
                ArgY4_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                ArgY5_44 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 5))));
                ArgY6_46 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 6))));
                ArgY7_48 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 7))));
                succeeded = parse_tree__prog_data_foreign____Unify____foreign_proc_attributes_0_0(ArgX1_35, ArgY1_36);
                if (succeeded)
                {
                  succeeded = hlds__hlds_pred____Unify____pred_id_0_0(ArgX2_37, ArgY2_38);
                  if (succeeded)
                  {
                    succeeded = (ArgX3_39 == ArgY3_40);
                    if (succeeded)
                    {
                      TypeInfo_82_82 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[14]);
                      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_82_82, ((MR_Box) (ArgX4_41)), ((MR_Box) (ArgY4_42)));
                      if (succeeded)
                      {
                        TypeInfo_83_83 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[14]);
                        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_83_83, ((MR_Box) (ArgX5_43)), ((MR_Box) (ArgY5_44)));
                        if (succeeded)
                        {
                          TypeInfo_84_84 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[16]);
                          succeeded = mercury__builtin__unify_2_p_0(TypeInfo_84_84, ((MR_Box) (ArgX6_45)), ((MR_Box) (ArgY6_46)));
                          if (succeeded)
                            succeeded = parse_tree__prog_data_foreign____Unify____pragma_foreign_proc_impl_0_0(ArgX7_47, ArgY7_48);
                        }
                      }
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 2:
            {
              MR_Word TypeInfo_86_86;
              MR_Word ArgX1_49 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 1);
              MR_Word ArgY1_50;
              MR_Word ArgX2_51 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_52;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 2)));
              if (succeeded)
              {
                ArgY1_50 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                ArgY2_52 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                succeeded = (ArgX1_49 == ArgY1_50);
                if (succeeded)
                {
                  TypeInfo_86_86 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[13]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_86_86, ((MR_Box) (ArgX2_51)), ((MR_Box) (ArgY2_52)));
                }
              }
            }
            break;
          case (MR_Integer) 3:
            {
              MR_Word TypeInfo_87_87;
              MR_Word ArgX1_53 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_54;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 3)));
              if (succeeded)
              {
                ArgY1_54 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                TypeInfo_87_87 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[13]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_87_87, ((MR_Box) (ArgX1_53)), ((MR_Box) (ArgY1_54)));
              }
            }
            break;
          case (MR_Integer) 4:
            {
              MR_Word TypeInfo_97_97;
              MR_Word TypeInfo_98_98;
              MR_Word ArgX1_55 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_56;
              MR_Word ArgX2_57 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 1);
              MR_Word ArgY2_58;
              MR_Word ArgX3_59 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Word ArgY3_60;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 4)));
              if (succeeded)
              {
                ArgY1_56 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_58 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                ArgY3_60 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                TypeInfo_97_97 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_97_97, ((MR_Box) (ArgX1_55)), ((MR_Box) (ArgY1_56)));
                if (succeeded)
                {
                  succeeded = (ArgX2_57 == ArgY2_58);
                  if (succeeded)
                  {
                    TypeInfo_98_98 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[12]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_98_98, ((MR_Box) (ArgX3_59)), ((MR_Box) (ArgY3_60)));
                  }
                }
              }
            }
            break;
          case (MR_Integer) 5:
            {
              MR_Word ArgX1_63 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_64;
              MR_Word ArgX2_65 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_66;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 5)));
              if (succeeded)
              {
                ArgY1_64 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_66 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                succeeded = hlds__hlds_goal____Unify____scope_reason_0_0(ArgX1_63, ArgY1_64);
                if (succeeded)
                  succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX2_65, ArgY2_66);
              }
            }
            break;
          case (MR_Integer) 6:
            {
              MR_Word TypeInfo_91_91;
              MR_Word ArgX1_67 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_68;
              MR_Word ArgX2_69 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_70;
              MR_Word ArgX3_71 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Word ArgY3_72;
              MR_Word ArgX4_73 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 4))));
              MR_Word ArgY4_74;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 6)));
              if (succeeded)
              {
                ArgY1_68 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_70 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                ArgY3_72 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                ArgY4_74 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                TypeInfo_91_91 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_91_91, ((MR_Box) (ArgX1_67)), ((MR_Box) (ArgY1_68)));
                if (succeeded)
                {
                  succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX2_69, ArgY2_70);
                  if (succeeded)
                  {
                    succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX3_71, ArgY3_72);
                    if (succeeded)
                      succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX4_73, ArgY4_74);
                  }
                }
              }
            }
            break;
          case (MR_Integer) 7:
            {
              MR_Word ArgX1_75 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_76;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 7)));
              if (succeeded)
              {
                ArgY1_76 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                succeeded = hlds__hlds_goal____Unify____shorthand_goal_expr_0_0(ArgX1_75, ArgY1_76);
              }
            }
            break;
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____shorthand_goal_expr_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_27 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_28 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_27 == CastY_28);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
          MR_Word ArgY2_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
            succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX1_3, ArgY1_4);
            if (succeeded)
              succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX2_5, ArgY2_6);
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_29_29;
          MR_Word TypeInfo_30_30;
          MR_Word TypeInfo_31_31;
          MR_Word ArgX1_7 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 0))) & (MR_Integer) 3);
          MR_Word ArgY1_8;
          MR_Word ArgX2_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_10;
          MR_Word ArgX3_11 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_12;
          MR_Word ArgX4_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 3))));
          MR_Word ArgY4_14;
          MR_Word ArgX5_15 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 4))));
          MR_Word ArgY5_16;
          MR_Word ArgX6_17 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 5))));
          MR_Word ArgY6_18;
          MR_Word ArgX7_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 6))));
          MR_Word ArgY7_20;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_8 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 3);
            ArgY2_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            ArgY3_12 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            ArgY4_14 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
            ArgY5_16 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 4))));
            ArgY6_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 5))));
            ArgY7_20 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 6))));
            succeeded = (ArgX1_7 == ArgY1_8);
            if (succeeded)
            {
              succeeded = hlds__hlds_goal____Unify____atomic_interface_vars_0_0(ArgX2_9, ArgY2_10);
              if (succeeded)
              {
                succeeded = hlds__hlds_goal____Unify____atomic_interface_vars_0_0(ArgX3_11, ArgY3_12);
                if (succeeded)
                {
                  TypeInfo_29_29 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[32]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_29_29, ((MR_Box) (ArgX4_13)), ((MR_Box) (ArgY4_14)));
                  if (succeeded)
                  {
                    succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX5_15, ArgY5_16);
                    if (succeeded)
                    {
                      TypeInfo_30_30 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[13]);
                      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_30_30, ((MR_Box) (ArgX6_17)), ((MR_Box) (ArgY6_18)));
                      if (succeeded)
                      {
                        TypeInfo_31_31 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[33]);
                        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_31_31, ((MR_Box) (ArgX7_19)), ((MR_Box) (ArgY7_20)));
                      }
                    }
                  }
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_32_32;
          MR_Word TypeInfo_33_33;
          MR_Word ArgX1_21 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_22;
          MR_Word ArgX2_23 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY2_24;
          MR_Word ArgX3_25 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 2))));
          MR_Word ArgY3_26;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_22 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_24 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            ArgY3_26 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 2))));
            TypeInfo_32_32 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[31]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_32_32, ((MR_Box) (ArgX1_21)), ((MR_Box) (ArgY1_22)));
            if (succeeded)
            {
              TypeInfo_33_33 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_33_33, ((MR_Box) (ArgX2_23)), ((MR_Box) (ArgY2_24)));
              if (succeeded)
                succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(ArgX3_25, ArgY3_26);
            }
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = hlds__hlds_goal____Unify____hlds_goal_expr_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
      succeeded = hlds__hlds_goal____Unify____hlds_goal_info_0_0(ArgX2_5, ArgY2_6);
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_19 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_20 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_19 == CastY_20);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_22_22;
    MR_Word TypeInfo_23_23;
    MR_Word ArgX1_3 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 0))) >> 2)) & (MR_Integer) 7);
    MR_Word ArgY1_4 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) >> 2)) & (MR_Integer) 7);
    MR_Word ArgX2_5 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 0))) & (MR_Integer) 3);
    MR_Word ArgY2_6 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 0))) & (MR_Integer) 3);
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
    MR_Word ArgY5_12 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
    MR_Word ArgX6_13 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 4))));
    MR_Word ArgY6_14 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
    MR_Word ArgX7_15 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 5))));
    MR_Word ArgY7_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 5))));
    MR_Word ArgX8_17 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 6))));
    MR_Word ArgY8_18 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 6))));
    MR_Unsigned Var_25;
    MR_Unsigned Var_26;
    MR_Integer CastX_43;
    MR_Integer CastY_44;

    succeeded = (ArgX1_3 == ArgY1_4);
    if (succeeded)
    {
      succeeded = (ArgX2_5 == ArgY2_6);
      if (succeeded)
      {
        succeeded = hlds__instmap____Unify____instmap_0_0(ArgX3_7, ArgY3_8);
        if (succeeded)
        {
          TypeInfo_22_22 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]);
          succeeded = mercury__builtin__unify_2_p_0(TypeInfo_22_22, ((MR_Box) (ArgX4_9)), ((MR_Box) (ArgY4_10)));
          if (succeeded)
          {
            TypeInfo_23_23 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[23]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_23_23, ((MR_Box) (ArgX5_11)), ((MR_Box) (ArgY5_12)));
            if (succeeded)
            {
              Var_25 = (MR_Unsigned) (ArgX6_13);
              Var_26 = (MR_Unsigned) (ArgY6_14);
              succeeded = (Var_25 == Var_26);
              if (succeeded)
              {
                succeeded = hlds__hlds_goal____Unify____hlds_goal_code_gen_info_0_0(ArgX7_15, ArgY7_16);
                if (succeeded)
                {
                  CastX_43 = (MR_Integer) (ArgX8_17);
                  CastY_44 = (MR_Integer) (ArgY8_18);
                  succeeded = (CastX_43 == CastY_44);
                  if (succeeded)
                    succeeded = MR_TRUE;
                  else
                  {
                    MR_Word TypeInfo_23_47;
                    MR_Word TypeInfo_25_49;
                    MR_Word TypeInfo_26_50;
                    MR_Word TypeInfo_27_51;
                    MR_Word TypeInfo_28_52;
                    MR_Word ArgX1_27 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 0))));
                    MR_Word ArgY1_28 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 0))));
                    MR_Word ArgX2_29 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 1))));
                    MR_Word ArgY2_30 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 1))));
                    MR_Word ArgX3_31 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 2))));
                    MR_Word ArgY3_32 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 2))));
                    MR_Word ArgX4_33 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 3))));
                    MR_Word ArgY4_34 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 3))));
                    MR_Word ArgX5_35 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 4))));
                    MR_Word ArgY5_36 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 4))));
                    MR_Word ArgX6_37 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 5))));
                    MR_Word ArgY6_38 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 5))));
                    MR_Word ArgX7_39 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 6))));
                    MR_Word ArgY7_40 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 6))));
                    MR_Word ArgX8_41 = ((MR_Word) ((MR_hl_field(0, ArgX8_17, 7))));
                    MR_Word ArgY8_42 = ((MR_Word) ((MR_hl_field(0, ArgY8_18, 7))));

                    succeeded = mercury__term_context____Unify____term_context_0_0(ArgX1_27, ArgY1_28);
                    if (succeeded)
                    {
                      succeeded = mdbcomp__goal_path____Unify____reverse_goal_path_0_0(ArgX2_29, ArgY2_30);
                      if (succeeded)
                      {
                        TypeInfo_23_47 = (MR_Word) (&hlds__hlds_goal_scalar_common_2[0]);
                        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_23_47, ((MR_Box) (ArgX3_31)), ((MR_Box) (ArgY3_32)));
                        if (succeeded)
                        {
                          succeeded = hlds__goal_mode____Unify____goal_mode_0_0(ArgX4_33, ArgY4_34);
                          if (succeeded)
                          {
                            TypeInfo_25_49 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[19]);
                            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_25_49, ((MR_Box) (ArgX5_35)), ((MR_Box) (ArgY5_36)));
                            if (succeeded)
                            {
                              TypeInfo_26_50 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[20]);
                              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_26_50, ((MR_Box) (ArgX6_37)), ((MR_Box) (ArgY6_38)));
                              if (succeeded)
                              {
                                TypeInfo_27_51 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[21]);
                                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_27_51, ((MR_Box) (ArgX7_39)), ((MR_Box) (ArgY7_40)));
                                if (succeeded)
                                {
                                  TypeInfo_28_52 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[22]);
                                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_28_52, ((MR_Box) (ArgX8_41)), ((MR_Box) (ArgY8_42)));
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_code_gen_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  if ((HeadVar__1_1 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Integer CastX_5 = (MR_Integer) (HeadVar__1_1);
    MR_Integer CastY_6 = (MR_Integer) (HeadVar__2_2);

    succeeded = (CastY_6 == CastX_5);
  }
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
    MR_Word ArgY1_4;

    succeeded = (HeadVar__2_2 != (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
    {
      ArgY1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
      succeeded = hlds__hlds_llds____Unify____llds_code_gen_details_0_0(ArgX1_3, ArgY1_4);
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____unification_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_43 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_44 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_43 == CastY_44);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_48_48;
          MR_Word TypeInfo_50_50;
          MR_Word TypeInfo_51_51;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
          MR_Word ArgY2_6;
          MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
          MR_Word ArgY3_8;
          MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
          MR_Word ArgY4_10;
          MR_Word ArgX5_11 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 4))));
          MR_Word ArgY5_12;
          MR_Word ArgX6_13 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 5))) & (MR_Integer) 1);
          MR_Word ArgY6_14;
          MR_Word ArgX7_15 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 6))));
          MR_Word ArgY7_16;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
            ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
            ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));
            ArgY5_12 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 4))));
            ArgY6_14 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 5))) & (MR_Integer) 1);
            ArgY7_16 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 6))));
            TypeInfo_48_48 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_48_48, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
            if (succeeded)
            {
              succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX2_5, ArgY2_6);
              if (succeeded)
              {
                TypeInfo_50_50 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_50_50, ((MR_Box) (ArgX3_7)), ((MR_Box) (ArgY3_8)));
                if (succeeded)
                {
                  TypeInfo_51_51 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[35]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_51_51, ((MR_Box) (ArgX4_9)), ((MR_Box) (ArgY4_10)));
                  if (succeeded)
                  {
                    succeeded = hlds__hlds_goal____Unify____how_to_construct_0_0(ArgX5_11, ArgY5_12);
                    if (succeeded)
                    {
                      succeeded = (ArgX6_13 == ArgY6_14);
                      if (succeeded)
                        succeeded = hlds__hlds_goal____Unify____construct_sub_info_0_0(ArgX7_15, ArgY7_16);
                    }
                  }
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_52_52;
          MR_Word TypeInfo_54_54;
          MR_Word TypeInfo_55_55;
          MR_Word ArgX1_17 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_18;
          MR_Word ArgX2_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_20;
          MR_Word ArgX3_21 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_22;
          MR_Word ArgX4_23 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 3))));
          MR_Word ArgY4_24;
          MR_Word ArgX5_25 = ((((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 4))) >> 1)) & (MR_Integer) 1);
          MR_Word ArgY5_26;
          MR_Word ArgX6_27 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 4))) & (MR_Integer) 1);
          MR_Word ArgY6_28;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_20 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            ArgY3_22 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            ArgY4_24 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
            ArgY5_26 = ((((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 4))) >> 1)) & (MR_Integer) 1);
            ArgY6_28 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 4))) & (MR_Integer) 1);
            TypeInfo_52_52 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_52_52, ((MR_Box) (ArgX1_17)), ((MR_Box) (ArgY1_18)));
            if (succeeded)
            {
              succeeded = parse_tree__prog_data____Unify____cons_id_0_0(ArgX2_19, ArgY2_20);
              if (succeeded)
              {
                TypeInfo_54_54 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_54_54, ((MR_Box) (ArgX3_21)), ((MR_Box) (ArgY3_22)));
                if (succeeded)
                {
                  TypeInfo_55_55 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[35]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_55_55, ((MR_Box) (ArgX4_23)), ((MR_Box) (ArgY4_24)));
                  if (succeeded)
                  {
                    succeeded = (ArgX5_25 == ArgY5_26);
                    if (succeeded)
                      succeeded = (ArgX6_27 == ArgY6_28);
                  }
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_45_45;
          MR_Word TypeInfo_46_46;
          MR_Word ArgX1_29 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_30;
          MR_Word ArgX2_31 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Word ArgY2_32;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_30 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_32 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 1))));
            TypeInfo_45_45 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_45_45, ((MR_Box) (ArgX1_29)), ((MR_Box) (ArgY1_30)));
            if (succeeded)
            {
              TypeInfo_46_46 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_46_46, ((MR_Box) (ArgX2_31)), ((MR_Box) (ArgY2_32)));
            }
          }
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word TypeInfo_56_56;
              MR_Word TypeInfo_57_57;
              MR_Word ArgX1_33 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_34;
              MR_Word ArgX2_35 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_36;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 0)));
              if (succeeded)
              {
                ArgY1_34 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_36 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                TypeInfo_56_56 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_56_56, ((MR_Box) (ArgX1_33)), ((MR_Box) (ArgY1_34)));
                if (succeeded)
                {
                  TypeInfo_57_57 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_57_57, ((MR_Box) (ArgX2_35)), ((MR_Box) (ArgY2_36)));
                }
              }
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Word TypeInfo_47_47;
              MR_Word ArgX1_37 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_38;
              MR_Word ArgX2_39 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 1);
              MR_Word ArgY2_40;
              MR_Word ArgX3_41 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Word ArgY3_42;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 1)));
              if (succeeded)
              {
                ArgY1_38 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_40 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 1);
                ArgY3_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                succeeded = hlds__hlds_goal____Unify____unify_mode_0_0(ArgX1_37, ArgY1_38);
                if (succeeded)
                {
                  succeeded = (ArgX2_39 == ArgY2_40);
                  if (succeeded)
                  {
                    TypeInfo_47_47 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_47_47, ((MR_Box) (ArgX3_41)), ((MR_Box) (ArgY3_42)));
                  }
                }
              }
            }
            break;
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_mode_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_11 == CastY_12);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
    MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 3))));
    MR_Word ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 3))));

    succeeded = parse_tree__prog_data____Unify____mer_inst_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
    {
      succeeded = parse_tree__prog_data____Unify____mer_inst_0_0(ArgX2_5, ArgY2_6);
      if (succeeded)
      {
        succeeded = parse_tree__prog_data____Unify____mer_inst_0_0(ArgX3_7, ArgY3_8);
        if (succeeded)
          succeeded = parse_tree__prog_data____Unify____mer_inst_0_0(ArgX4_9, ArgY4_10);
      }
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____how_to_construct_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_11 == CastY_12);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_10 == CastX_9);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word ArgX1_7 = (MR_Word) (MR_body((MR_Word) (HeadVar__1_1), (MR_Integer) 1));
          MR_Word ArgY1_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_8 = (MR_Word) (MR_body((MR_Word) (HeadVar__2_2), (MR_Integer) 1));
            succeeded = hlds__hlds_goal____Unify____cell_to_reuse_0_0(ArgX1_7, ArgY1_8);
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word ArgX1_3 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 0))) & (MR_Integer) 1);
          MR_Word ArgY1_4;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 0))) & (MR_Integer) 1);
            succeeded = (ArgX1_3 == ArgY1_4);
          }
        }
        break;
      case (MR_Integer) 3:
        {
          MR_Word TypeInfo_13_13;
          MR_Word ArgX1_5 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 0))));
          MR_Word ArgY1_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3);
          if (succeeded)
          {
            ArgY1_6 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 0))));
            TypeInfo_13_13 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_13_13, ((MR_Box) (ArgX1_5)), ((MR_Box) (ArgY1_6)));
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____cell_to_reuse_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_12_12;
    MR_Word TypeInfo_13_13;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgX3_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
    MR_Word ArgY3_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_12_12 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[4]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_12_12, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      if (succeeded)
      {
        TypeInfo_13_13 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[5]);
        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_13_13, ((MR_Box) (ArgX3_7)), ((MR_Box) (ArgY3_8)));
      }
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____construct_sub_info_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  if ((HeadVar__1_1 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
    MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

    succeeded = (CastY_8 == CastX_7);
  }
  else
  {
    MR_Word TypeInfo_11_11;
    MR_Word TypeInfo_12_12;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
    MR_Word ArgY1_4;
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
    MR_Word ArgY2_6;

    succeeded = (HeadVar__2_2 != (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
    {
      ArgY1_4 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
      ArgY2_6 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
      TypeInfo_11_11 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[7]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_11_11, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
      if (succeeded)
      {
        TypeInfo_12_12 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[8]);
        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_12_12, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
      }
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____scope_reason_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_49 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_50 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_49 == CastY_50);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_52_52;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 1))) & (MR_Integer) 1);
          MR_Word ArgY2_6;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            ArgY2_6 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 1))) & (MR_Integer) 1);
            TypeInfo_52_52 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_52_52, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
            if (succeeded)
              succeeded = (ArgX2_5 == ArgY2_6);
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_51_51;
          MR_Word ArgX1_7 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__1_1, 0))) & (MR_Integer) 7);
          MR_Word ArgY1_8;
          MR_Word ArgX2_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_10;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_8 = ((MR_Unsigned) ((MR_hl_field(1, HeadVar__2_2, 0))) & (MR_Integer) 7);
            ArgY2_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            succeeded = (ArgX1_7 == ArgY1_8);
            if (succeeded)
            {
              TypeInfo_51_51 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[30]);
              succeeded = mercury__builtin__unify_2_p_0(TypeInfo_51_51, ((MR_Box) (ArgX2_9)), ((MR_Box) (ArgY2_10)));
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word TypeInfo_56_56;
          MR_Word ArgX1_11 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_12;
          MR_Word ArgX2_13 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__1_1, 1))) & (MR_Integer) 3);
          MR_Word ArgY2_14;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_12 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_14 = ((MR_Unsigned) ((MR_hl_field(2, HeadVar__2_2, 1))) & (MR_Integer) 3);
            TypeInfo_56_56 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_56_56, ((MR_Box) (ArgX1_11)), ((MR_Box) (ArgY1_12)));
            if (succeeded)
              succeeded = (ArgX2_13 == ArgY2_14);
          }
        }
        break;
      case (MR_Integer) 3:
        switch (((MR_Integer) ((MR_hl_field(3, HeadVar__1_1, 0))))) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            {
              MR_Word ArgX1_15 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 3);
              MR_Word ArgY1_16;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 0)));
              if (succeeded)
              {
                ArgY1_16 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 3);
                succeeded = (ArgX1_15 == ArgY1_16);
              }
            }
            break;
          case (MR_Integer) 1:
            {
              MR_Word ArgX1_17 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 7);
              MR_Word ArgY1_18;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 1)));
              if (succeeded)
              {
                ArgY1_18 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 7);
                succeeded = (ArgX1_17 == ArgY1_18);
              }
            }
            break;
          case (MR_Integer) 2:
            {
              MR_Word TypeInfo_57_57;
              MR_Word ArgX1_19 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_20;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 2)));
              if (succeeded)
              {
                ArgY1_20 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                TypeInfo_57_57 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_57_57, ((MR_Box) (ArgX1_19)), ((MR_Box) (ArgY1_20)));
              }
            }
            break;
          case (MR_Integer) 3:
            {
              MR_Word TypeInfo_58_58;
              MR_Word ArgX1_21 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_22;
              MR_Word ArgX2_23 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 7);
              MR_Word ArgY2_24;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 3)));
              if (succeeded)
              {
                ArgY1_22 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_24 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 7);
                TypeInfo_58_58 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_58_58, ((MR_Box) (ArgX1_21)), ((MR_Box) (ArgY1_22)));
                if (succeeded)
                  succeeded = (ArgX2_23 == ArgY2_24);
              }
            }
            break;
          case (MR_Integer) 4:
            {
              MR_Word ArgX1_25 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 1);
              MR_Word ArgY1_26;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 4)));
              if (succeeded)
              {
                ArgY1_26 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                succeeded = (ArgX1_25 == ArgY1_26);
              }
            }
            break;
          case (MR_Integer) 5:
            {
              MR_Word ArgX1_27 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 1))) & (MR_Integer) 1);
              MR_Word ArgY1_28;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 5)));
              if (succeeded)
              {
                ArgY1_28 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 1))) & (MR_Integer) 1);
                succeeded = (ArgX1_27 == ArgY1_28);
              }
            }
            break;
          case (MR_Integer) 6:
            {
              MR_Word TypeInfo_53_53;
              MR_Word ArgX1_29 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_30;
              MR_Word ArgX2_31 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 2))) & (MR_Integer) 3);
              MR_Word ArgY2_32;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 6)));
              if (succeeded)
              {
                ArgY1_30 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_32 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 2))) & (MR_Integer) 3);
                TypeInfo_53_53 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_53_53, ((MR_Box) (ArgX1_29)), ((MR_Box) (ArgY1_30)));
                if (succeeded)
                  succeeded = (ArgX2_31 == ArgY2_32);
              }
            }
            break;
          case (MR_Integer) 7:
            {
              MR_Word TypeInfo_59_59;
              MR_Word TypeInfo_60_60;
              MR_Word TypeInfo_61_61;
              MR_Word TypeInfo_62_62;
              MR_Word TypeInfo_63_63;
              MR_Word ArgX1_33 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_34;
              MR_Word ArgX2_35 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_36;
              MR_Word ArgX3_37 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 3))));
              MR_Word ArgY3_38;
              MR_Word ArgX4_39 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 4))));
              MR_Word ArgY4_40;
              MR_Word ArgX5_41 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 5))));
              MR_Word ArgY5_42;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 7)));
              if (succeeded)
              {
                ArgY1_34 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_36 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                ArgY3_38 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 3))));
                ArgY4_40 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 4))));
                ArgY5_42 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 5))));
                TypeInfo_59_59 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[27]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_59_59, ((MR_Box) (ArgX1_33)), ((MR_Box) (ArgY1_34)));
                if (succeeded)
                {
                  TypeInfo_60_60 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[16]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_60_60, ((MR_Box) (ArgX2_35)), ((MR_Box) (ArgY2_36)));
                  if (succeeded)
                  {
                    TypeInfo_61_61 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[28]);
                    succeeded = mercury__builtin__unify_2_p_0(TypeInfo_61_61, ((MR_Box) (ArgX3_37)), ((MR_Box) (ArgY3_38)));
                    if (succeeded)
                    {
                      TypeInfo_62_62 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[29]);
                      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_62_62, ((MR_Box) (ArgX4_39)), ((MR_Box) (ArgY4_40)));
                      if (succeeded)
                      {
                        TypeInfo_63_63 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[11]);
                        succeeded = mercury__builtin__unify_2_p_0(TypeInfo_63_63, ((MR_Box) (ArgX5_41)), ((MR_Box) (ArgY5_42)));
                      }
                    }
                  }
                }
              }
            }
            break;
          case (MR_Integer) 8:
            {
              MR_Word TypeInfo_54_54;
              MR_Word TypeInfo_55_55;
              MR_Word ArgX1_43 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 1))));
              MR_Word ArgY1_44;
              MR_Word ArgX2_45 = ((MR_Word) ((MR_hl_field(3, HeadVar__1_1, 2))));
              MR_Word ArgY2_46;
              MR_Word ArgX3_47 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 3))) & (MR_Integer) 1);
              MR_Word ArgY3_48;

              succeeded = ((((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, HeadVar__2_2, 0)))) == (MR_Integer) 8)));
              if (succeeded)
              {
                ArgY1_44 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 1))));
                ArgY2_46 = ((MR_Word) ((MR_hl_field(3, HeadVar__2_2, 2))));
                ArgY3_48 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 3))) & (MR_Integer) 1);
                TypeInfo_54_54 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                succeeded = mercury__builtin__unify_2_p_0(TypeInfo_54_54, ((MR_Box) (ArgX1_43)), ((MR_Box) (ArgY1_44)));
                if (succeeded)
                {
                  TypeInfo_55_55 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
                  succeeded = mercury__builtin__unify_2_p_0(TypeInfo_55_55, ((MR_Box) (ArgX2_45)), ((MR_Box) (ArgY2_46)));
                  if (succeeded)
                    succeeded = (ArgX3_47 == ArgY3_48);
                }
              }
            }
            break;
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____generic_call_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_25 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_26 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_25 == CastY_26);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word TypeInfo_31_31;
          MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
          MR_Word ArgY1_4;
          MR_Word ArgX2_5 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 1))) >> 1)) & (MR_Integer) 3);
          MR_Word ArgY2_6;
          MR_Word ArgX3_7 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 1))) & (MR_Integer) 1);
          MR_Word ArgY3_8;
          MR_Word ArgX4_9 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 2))));
          MR_Word ArgY4_10;
          MR_Word ArgX5_11 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__1_1, 3))) & (MR_Integer) 1);
          MR_Word ArgY5_12;
          MR_Integer Var_35;
          MR_Integer Var_36;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 0);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
            ArgY2_6 = ((((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 1))) >> 1)) & (MR_Integer) 3);
            ArgY3_8 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 1))) & (MR_Integer) 1);
            ArgY4_10 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 2))));
            ArgY5_12 = ((MR_Unsigned) ((MR_hl_field(0, HeadVar__2_2, 3))) & (MR_Integer) 1);
            TypeInfo_31_31 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_31_31, ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
            if (succeeded)
            {
              succeeded = (ArgX2_5 == ArgY2_6);
              if (succeeded)
              {
                succeeded = (ArgX3_7 == ArgY3_8);
                if (succeeded)
                {
                  succeeded = (ArgX5_11 == ArgY5_12);
                  if (succeeded)
                  {
                    Var_35 = (MR_Integer) (ArgX4_9);
                    Var_36 = (MR_Integer) (ArgY4_10);
                    succeeded = (Var_35 == Var_36);
                  }
                }
              }
            }
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word TypeInfo_27_27;
          MR_Word ArgX1_13 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Word ArgY1_14;
          MR_Word ArgX2_15 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
          MR_Word ArgY2_16;
          MR_Word ArgX3_17 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 2))));
          MR_Word ArgY3_18;
          MR_Word ArgX4_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 3))));
          MR_Word ArgY4_20;
          MR_Integer Var_33;
          MR_Integer Var_34;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_14 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 0))));
            ArgY2_16 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 1))));
            ArgY3_18 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 2))));
            ArgY4_20 = ((MR_Word) ((MR_hl_field(1, HeadVar__2_2, 3))));
            TypeInfo_27_27 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
            succeeded = mercury__builtin__unify_2_p_0(TypeInfo_27_27, ((MR_Box) (ArgX1_13)), ((MR_Box) (ArgY1_14)));
            if (succeeded)
            {
              Var_33 = (MR_Integer) (ArgX2_15);
              Var_34 = (MR_Integer) (ArgY2_16);
              succeeded = (Var_33 == Var_34);
              if (succeeded)
              {
                succeeded = parse_tree__prog_data____Unify____class_id_0_0(ArgX3_17, ArgY3_18);
                if (succeeded)
                  succeeded = parse_tree__prog_data____Unify____pf_sym_name_arity_0_0(ArgX4_19, ArgY4_20);
              }
            }
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_String ArgX1_21 = ((MR_String) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_String ArgY1_22;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_22 = ((MR_String) ((MR_hl_field(2, HeadVar__2_2, 0))));
            succeeded = (strcmp(ArgX1_21, ArgY1_22) == 0);
          }
        }
        break;
      case (MR_Integer) 3:
        {
          MR_Word ArgX1_23 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__1_1, 0))) & (MR_Integer) 7);
          MR_Word ArgY1_24;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3);
          if (succeeded)
          {
            ArgY1_24 = ((MR_Unsigned) ((MR_hl_field(3, HeadVar__2_2, 0))) & (MR_Integer) 7);
            succeeded = (ArgX1_23 == ArgY1_24);
          }
        }
        break;
    }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_context_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_9_9;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = hlds__hlds_goal____Unify____unify_main_context_0_0(ArgX1_3, ArgY1_4);
    if (succeeded)
    {
      TypeInfo_9_9 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[36]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_9_9, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
    }
  }
  return succeeded;
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_main_context_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_13 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_14 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_13 == CastY_14);
  if (succeeded)
    succeeded = MR_TRUE;
  else
    switch (MR_tag((MR_Word) HeadVar__1_1)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Integer CastX_11 = (MR_Integer) (HeadVar__1_1);
          MR_Integer CastY_12 = (MR_Integer) (HeadVar__2_2);

          succeeded = (CastY_12 == CastX_11);
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Integer ArgX1_3 = ((MR_Integer) ((MR_hl_field(1, HeadVar__1_1, 0))));
          MR_Integer ArgY1_4;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 1);
          if (succeeded)
          {
            ArgY1_4 = ((MR_Integer) ((MR_hl_field(1, HeadVar__2_2, 0))));
            succeeded = (ArgX1_3 == ArgY1_4);
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word ArgX1_5 = ((MR_Word) ((MR_hl_field(2, HeadVar__1_1, 0))));
          MR_Word ArgY1_6;
          MR_Integer ArgX2_7 = ((MR_Integer) ((MR_hl_field(2, HeadVar__1_1, 1))));
          MR_Integer ArgY2_8;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 2);
          if (succeeded)
          {
            ArgY1_6 = ((MR_Word) ((MR_hl_field(2, HeadVar__2_2, 0))));
            ArgY2_8 = ((MR_Integer) ((MR_hl_field(2, HeadVar__2_2, 1))));
            succeeded = hlds__hlds_pred____Unify____call_id_0_0(ArgX1_5, ArgY1_6);
            if (succeeded)
              succeeded = (ArgX2_7 == ArgY2_8);
          }
        }
        break;
      case (MR_Integer) 3:
        {
          MR_String ArgX1_9 = ((MR_String) ((MR_hl_field(3, HeadVar__1_1, 0))));
          MR_String ArgY1_10;

          succeeded = ((MR_tag((MR_Word) HeadVar__2_2)) == (MR_Integer) 3);
          if (succeeded)
          {
            ArgY1_10 = ((MR_String) ((MR_hl_field(3, HeadVar__2_2, 0))));
            succeeded = (strcmp(ArgX1_9, ArgY1_10) == 0);
          }
        }
        break;
    }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____builtin_state_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____builtin_state_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____atomic_interface_vars_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer CastX_9 = (MR_Integer) (HeadVar__2_2);
  MR_Integer CastY_10 = (MR_Integer) (HeadVar__3_3);

  succeeded = (CastX_9 == CastY_10);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 0;
  else
  {
    MR_Word ArgX1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgY1_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 0))));
    MR_Word ArgX2_7 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));
    MR_Word ArgY2_8 = ((MR_Word) ((MR_hl_field(0, HeadVar__3_3, 1))));
    MR_Word SubResult1_6;

    mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), &SubResult1_6, ((MR_Box) (ArgX1_4)), ((MR_Box) (ArgY1_5)));
    succeeded = (SubResult1_6 != (MR_Integer) 0);
    if (succeeded)
      *HeadVar__1_1 = SubResult1_6;
    else
      mercury__builtin__compare_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), HeadVar__1_1, ((MR_Box) (ArgX2_7)), ((MR_Box) (ArgY2_8)));
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____atomic_interface_vars_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded;
  MR_Integer CastX_7 = (MR_Integer) (HeadVar__1_1);
  MR_Integer CastY_8 = (MR_Integer) (HeadVar__2_2);

  succeeded = (CastX_7 == CastY_8);
  if (succeeded)
    succeeded = MR_TRUE;
  else
  {
    MR_Word TypeInfo_10_10;
    MR_Word ArgX1_3 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ArgY1_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 0))));
    MR_Word ArgX2_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word ArgY2_6 = ((MR_Word) ((MR_hl_field(0, HeadVar__2_2, 1))));

    succeeded = mercury__builtin__unify_2_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), ((MR_Box) (ArgX1_3)), ((MR_Box) (ArgY1_4)));
    if (succeeded)
    {
      TypeInfo_10_10 = (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]);
      succeeded = mercury__builtin__unify_2_p_0(TypeInfo_10_10, ((MR_Box) (ArgX2_5)), ((MR_Box) (ArgY2_6)));
    }
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal____Compare____atomic_goal_type_0_0(
  MR_Word * HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3)
{
  MR_bool succeeded;
  MR_Integer Cast_HeadVar1_4 = (MR_Integer) (HeadVar__2_2);
  MR_Integer Cast_HeadVar2_5 = (MR_Integer) (HeadVar__3_3);

  succeeded = (Cast_HeadVar1_4 < Cast_HeadVar2_5);
  if (succeeded)
    *HeadVar__1_1 = (MR_Integer) 1;
  else
  {
    succeeded = (Cast_HeadVar1_4 > Cast_HeadVar2_5);
    if (succeeded)
      *HeadVar__1_1 = (MR_Integer) 2;
    else
      *HeadVar__1_1 = (MR_Integer) 0;
  }
}

MR_bool MR_CALL 
hlds__hlds_goal____Unify____atomic_goal_type_0_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_bool succeeded = (HeadVar__1_1 == HeadVar__2_2);

  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal__set_case_contexts_3_p_0(
  MR_Word Context_4,
  MR_Word Case0_5,
  MR_Word * Case_6)
{
  MR_Word MainConsId_7 = ((MR_Word) ((MR_hl_field(0, Case0_5, 0))));
  MR_Word OtherConsIds_8 = ((MR_Word) ((MR_hl_field(0, Case0_5, 1))));
  MR_Word Goal0_9 = ((MR_Word) ((MR_hl_field(0, Case0_5, 2))));
  MR_Word Goal_10;

  hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, Goal0_9, &Goal_10);
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
    *Case_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (MainConsId_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (OtherConsIds_8));
    MR_hl_field(0, base, 2) = ((MR_Box) (Goal_10));
  }
}

static void MR_CALL 
hlds__hlds_goal__follow_subn_until_fixpoint_3_p_0(
  MR_Word HeadVar__1_1,
  MR_Word STATE_VARIABLE_Subn_0_13,
  MR_Word * STATE_VARIABLE_Subn_14)
{
  while (MR_TRUE)
  {
    MR_bool succeeded;
    MR_Word FromVar_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 0))));
    MR_Word ToVar_5 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
    MR_Word SubstitutedToVar_7;
    MR_Box conv0_SubstitutedToVar_7;

    // setup for model_det tailcalls optimized into a loop
    ;
    succeeded = mercury__map__search_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), STATE_VARIABLE_Subn_0_13, ((MR_Box) (ToVar_5)), &conv0_SubstitutedToVar_7);
    if (succeeded)
    {
      SubstitutedToVar_7 = ((MR_Word) (conv0_SubstitutedToVar_7));
      succeeded = MR_TRUE;
    }
    if (succeeded)
    {
      MR_Word Var_26;
      MR_Word next_value_of_HeadVar__1_1;

      {
        Var_26 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
        MR_hl_field(0, Var_26, 0) = ((MR_Box) (FromVar_4));
        MR_hl_field(0, Var_26, 1) = ((MR_Box) (SubstitutedToVar_7));
      }
      // direct tailcall eliminated
      ;
      next_value_of_HeadVar__1_1 = Var_26;
      HeadVar__1_1 = next_value_of_HeadVar__1_1;
      continue;
    }
    else
      mercury__map__det_insert_4_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), ((MR_Box) (FromVar_4)), ((MR_Box) (ToVar_5)), STATE_VARIABLE_Subn_0_13, STATE_VARIABLE_Subn_14);
    break;
  }
}

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Word conv3_Case_6;

  hlds__hlds_goal__set_case_contexts_3_p_0(((MR_Word) ((MR_hl_field(0, closure, 3)))), ((MR_Word) (wrapper_arg_1)), &conv3_Case_6);
  *wrapper_arg_2 = ((MR_Box) (conv3_Case_6));
}

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Word conv2_Goal_6;

  hlds__hlds_goal__set_goal_contexts_3_p_0(((MR_Word) ((MR_hl_field(0, closure, 3)))), ((MR_Word) (wrapper_arg_1)), &conv2_Goal_6);
  *wrapper_arg_2 = ((MR_Box) (conv2_Goal_6));
}

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Word conv1_Goal_6;

  hlds__hlds_goal__set_goal_contexts_3_p_0(((MR_Word) ((MR_hl_field(0, closure, 3)))), ((MR_Word) (wrapper_arg_1)), &conv1_Goal_6);
  *wrapper_arg_2 = ((MR_Box) (conv1_Goal_6));
}

static void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box * wrapper_arg_2)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_Goal_6;

  hlds__hlds_goal__set_goal_contexts_3_p_0(((MR_Word) ((MR_hl_field(0, closure, 3)))), ((MR_Word) (wrapper_arg_1)), &conv0_Goal_6);
  *wrapper_arg_2 = ((MR_Box) (conv0_Goal_6));
}

void MR_CALL 
hlds__hlds_goal__set_goal_contexts_3_p_0(
  MR_Word Context_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr0_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;
  MR_Word GoalExpr_13;
  MR_Word Var_90 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));
  MR_Word Var_91;
  MR_Word Var_94 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
  MR_Word Var_95 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
  MR_Word Var_96 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
  MR_Word Var_97 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 4))));
  MR_Word Var_98 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0)));
  MR_Word Var_100 = ((MR_Word) ((MR_hl_field(0, Var_90, 1))));
  MR_Word Var_101 = ((MR_Word) ((MR_hl_field(0, Var_90, 2))));
  MR_Word Var_102 = ((MR_Word) ((MR_hl_field(0, Var_90, 3))));
  MR_Word Var_103 = ((MR_Word) ((MR_hl_field(0, Var_90, 4))));
  MR_Word Var_104 = ((MR_Word) ((MR_hl_field(0, Var_90, 5))));
  MR_Word Var_105 = ((MR_Word) ((MR_hl_field(0, Var_90, 6))));
  MR_Word Var_106 = ((MR_Word) ((MR_hl_field(0, Var_90, 7))));

  {
    Var_91 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_91, 0) = ((MR_Box) (Context_4));
    MR_hl_field(0, Var_91, 1) = ((MR_Box) (Var_100));
    MR_hl_field(0, Var_91, 2) = ((MR_Box) (Var_101));
    MR_hl_field(0, Var_91, 3) = ((MR_Box) (Var_102));
    MR_hl_field(0, Var_91, 4) = ((MR_Box) (Var_103));
    MR_hl_field(0, Var_91, 5) = ((MR_Box) (Var_104));
    MR_hl_field(0, Var_91, 6) = ((MR_Box) (Var_105));
    MR_hl_field(0, Var_91, 7) = ((MR_Box) (Var_106));
  }
  {
    GoalInfo_9 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_9, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_9, 1) = ((MR_Box) (Var_94));
    MR_hl_field(0, GoalInfo_9, 2) = ((MR_Box) (Var_95));
    MR_hl_field(0, GoalInfo_9, 3) = ((MR_Box) (Var_96));
    MR_hl_field(0, GoalInfo_9, 4) = ((MR_Box) (Var_97));
    MR_hl_field(0, GoalInfo_9, 5) = ((MR_Box) (Var_98));
    MR_hl_field(0, GoalInfo_9, 6) = ((MR_Box) (Var_91));
  }
  switch (MR_tag((MR_Word) GoalExpr0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word SubGoal0_74 = (MR_Word) ((MR_Word) (GoalExpr0_7));
        MR_Word SubGoal_75;

        hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, SubGoal0_74, &SubGoal_75);
        GoalExpr_13 = (MR_Word) ((MR_Word) (SubGoal_75));
      }
      break;
    case (MR_Integer) 1:
    case (MR_Integer) 2:
      GoalExpr_13 = GoalExpr0_7;
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, GoalExpr0_7, 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
        case (MR_Integer) 1:
          GoalExpr_13 = GoalExpr0_7;
          break;
        case (MR_Integer) 2:
          {
            MR_Word ConjType_10 = ((MR_Unsigned) ((MR_hl_field(3, GoalExpr0_7, 1))) & (MR_Integer) 1);
            MR_Word SubGoals0_11 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 2))));
            MR_Word SubGoals_12;
            MR_Word Var_68;

            {
              Var_68 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
              MR_hl_field(0, Var_68, 0) = ((MR_Box) (&hlds__hlds_goal_scalar_common_3[4]));
              MR_hl_field(0, Var_68, 1) = ((MR_Box) (hlds__hlds_goal__set_goal_contexts_3_p_0_1));
              MR_hl_field(0, Var_68, 2) = ((MR_Box) ((MR_Integer) 1));
              MR_hl_field(0, Var_68, 3) = ((MR_Box) (Context_4));
            }
            mercury__list__map_3_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), Var_68, SubGoals0_11, &SubGoals_12);
            {
              GoalExpr_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(3, GoalExpr_13, 0) = ((MR_Box) ((MR_Unsigned) 2U));
              MR_hl_field(3, GoalExpr_13, 1) = (MR_Box) ((MR_Unsigned) (ConjType_10));
              MR_hl_field(3, GoalExpr_13, 2) = ((MR_Box) (SubGoals_12));
            }
          }
          break;
        case (MR_Integer) 3:
          {
            MR_Word Var_69;
            MR_Word SubGoals0_72 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 1))));
            MR_Word SubGoals_73;

            {
              Var_69 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
              MR_hl_field(0, Var_69, 0) = ((MR_Box) (&hlds__hlds_goal_scalar_common_3[4]));
              MR_hl_field(0, Var_69, 1) = ((MR_Box) (hlds__hlds_goal__set_goal_contexts_3_p_0_2));
              MR_hl_field(0, Var_69, 2) = ((MR_Box) ((MR_Integer) 1));
              MR_hl_field(0, Var_69, 3) = ((MR_Box) (Context_4));
            }
            mercury__list__map_3_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), Var_69, SubGoals0_72, &SubGoals_73);
            {
              GoalExpr_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(3, GoalExpr_13, 0) = ((MR_Box) ((MR_Unsigned) 3U));
              MR_hl_field(3, GoalExpr_13, 1) = ((MR_Box) (SubGoals_73));
            }
          }
          break;
        case (MR_Integer) 4:
          {
            MR_Word Var_21 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 1))));
            MR_Word CanFail_22 = ((MR_Unsigned) ((MR_hl_field(3, GoalExpr0_7, 2))) & (MR_Integer) 1);
            MR_Word Cases0_23 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 3))));
            MR_Word Cases_24;
            MR_Word Var_70;

            {
              Var_70 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
              MR_hl_field(0, Var_70, 0) = ((MR_Box) (&hlds__hlds_goal_scalar_common_3[5]));
              MR_hl_field(0, Var_70, 1) = ((MR_Box) (hlds__hlds_goal__set_goal_contexts_3_p_0_4));
              MR_hl_field(0, Var_70, 2) = ((MR_Box) ((MR_Integer) 1));
              MR_hl_field(0, Var_70, 3) = ((MR_Box) (Context_4));
            }
            mercury__list__map_3_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0), (MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0), Var_70, Cases0_23, &Cases_24);
            {
              GoalExpr_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(3, GoalExpr_13, 0) = ((MR_Box) ((MR_Unsigned) 4U));
              MR_hl_field(3, GoalExpr_13, 1) = ((MR_Box) (Var_21));
              MR_hl_field(3, GoalExpr_13, 2) = (MR_Box) ((MR_Unsigned) (CanFail_22));
              MR_hl_field(3, GoalExpr_13, 3) = ((MR_Box) (Cases_24));
            }
          }
          break;
        case (MR_Integer) 5:
          {
            MR_Word Reason_25 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 1))));
            MR_Word SubGoal0_26 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 2))));
            MR_Word SubGoal_27;

            hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, SubGoal0_26, &SubGoal_27);
            {
              GoalExpr_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(3, GoalExpr_13, 0) = ((MR_Box) ((MR_Unsigned) 5U));
              MR_hl_field(3, GoalExpr_13, 1) = ((MR_Box) (Reason_25));
              MR_hl_field(3, GoalExpr_13, 2) = ((MR_Box) (SubGoal_27));
            }
          }
          break;
        case (MR_Integer) 6:
          {
            MR_Word Vars_14 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 1))));
            MR_Word Cond0_15 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 2))));
            MR_Word Then0_16 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 3))));
            MR_Word Else0_17 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 4))));
            MR_Word Cond_18;
            MR_Word Then_19;
            MR_Word Else_20;

            hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, Cond0_15, &Cond_18);
            hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, Then0_16, &Then_19);
            hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, Else0_17, &Else_20);
            {
              GoalExpr_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(3, GoalExpr_13, 0) = ((MR_Box) ((MR_Unsigned) 6U));
              MR_hl_field(3, GoalExpr_13, 1) = ((MR_Box) (Vars_14));
              MR_hl_field(3, GoalExpr_13, 2) = ((MR_Box) (Cond_18));
              MR_hl_field(3, GoalExpr_13, 3) = ((MR_Box) (Then_19));
              MR_hl_field(3, GoalExpr_13, 4) = ((MR_Box) (Else_20));
            }
          }
          break;
        case (MR_Integer) 7:
          {
            MR_Word ShortHand0_51 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 1))));
            MR_Word ShortHand_61;

            switch (MR_tag((MR_Word) ShortHand0_51)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                {
                  MR_Word LHS0_64 = ((MR_Word) ((MR_hl_field(0, ShortHand0_51, 0))));
                  MR_Word RHS0_65 = ((MR_Word) ((MR_hl_field(0, ShortHand0_51, 1))));
                  MR_Word LHS_66;
                  MR_Word RHS_67;

                  hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, LHS0_64, &LHS_66);
                  hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, RHS0_65, &RHS_67);
                  {
                    ShortHand_61 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, ShortHand_61, 0) = ((MR_Box) (LHS_66));
                    MR_hl_field(0, ShortHand_61, 1) = ((MR_Box) (RHS_67));
                  }
                }
                break;
              case (MR_Integer) 1:
                {
                  MR_Word GoalType_52 = ((MR_Unsigned) ((MR_hl_field(1, ShortHand0_51, 0))) & (MR_Integer) 3);
                  MR_Word Outer_53 = ((MR_Word) ((MR_hl_field(1, ShortHand0_51, 1))));
                  MR_Word Inner_54 = ((MR_Word) ((MR_hl_field(1, ShortHand0_51, 2))));
                  MR_Word MaybeOutputVars_55 = ((MR_Word) ((MR_hl_field(1, ShortHand0_51, 3))));
                  MR_Word MainGoal0_56 = ((MR_Word) ((MR_hl_field(1, ShortHand0_51, 4))));
                  MR_Word OrElseGoals0_57 = ((MR_Word) ((MR_hl_field(1, ShortHand0_51, 5))));
                  MR_Word OrElseInners_58 = ((MR_Word) ((MR_hl_field(1, ShortHand0_51, 6))));
                  MR_Word MainGoal_59;
                  MR_Word OrElseGoals_60;
                  MR_Word Var_71;

                  hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, MainGoal0_56, &MainGoal_59);
                  {
                    Var_71 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Var_71, 0) = ((MR_Box) (&hlds__hlds_goal_scalar_common_3[4]));
                    MR_hl_field(0, Var_71, 1) = ((MR_Box) (hlds__hlds_goal__set_goal_contexts_3_p_0_3));
                    MR_hl_field(0, Var_71, 2) = ((MR_Box) ((MR_Integer) 1));
                    MR_hl_field(0, Var_71, 3) = ((MR_Box) (Context_4));
                  }
                  mercury__list__map_3_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), Var_71, OrElseGoals0_57, &OrElseGoals_60);
                  {
                    ShortHand_61 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(1, ShortHand_61, 0) = (MR_Box) ((MR_Unsigned) (GoalType_52));
                    MR_hl_field(1, ShortHand_61, 1) = ((MR_Box) (Outer_53));
                    MR_hl_field(1, ShortHand_61, 2) = ((MR_Box) (Inner_54));
                    MR_hl_field(1, ShortHand_61, 3) = ((MR_Box) (MaybeOutputVars_55));
                    MR_hl_field(1, ShortHand_61, 4) = ((MR_Box) (MainGoal_59));
                    MR_hl_field(1, ShortHand_61, 5) = ((MR_Box) (OrElseGoals_60));
                    MR_hl_field(1, ShortHand_61, 6) = ((MR_Box) (OrElseInners_58));
                  }
                }
                break;
              case (MR_Integer) 2:
                {
                  MR_Word MaybeIO_62 = ((MR_Word) ((MR_hl_field(2, ShortHand0_51, 0))));
                  MR_Word ResultVar_63 = ((MR_Word) ((MR_hl_field(2, ShortHand0_51, 1))));
                  MR_Word SubGoal0_76 = ((MR_Word) ((MR_hl_field(2, ShortHand0_51, 2))));
                  MR_Word SubGoal_77;

                  hlds__hlds_goal__set_goal_contexts_3_p_0(Context_4, SubGoal0_76, &SubGoal_77);
                  {
                    ShortHand_61 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(2, ShortHand_61, 0) = ((MR_Box) (MaybeIO_62));
                    MR_hl_field(2, ShortHand_61, 1) = ((MR_Box) (ResultVar_63));
                    MR_hl_field(2, ShortHand_61, 2) = ((MR_Box) (SubGoal_77));
                  }
                }
                break;
            }
            {
              GoalExpr_13 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(3, GoalExpr_13, 0) = ((MR_Box) ((MR_Unsigned) 7U));
              MR_hl_field(3, GoalExpr_13, 1) = ((MR_Box) (ShortHand_61));
            }
          }
          break;
      }
      break;
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_13));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

static void MR_CALL 
hlds__hlds_goal__goal_list_purity_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_LambdaHeadVar__3_14;

  hlds__hlds_goal__IntroducedFrom__pred__goal_list_purity__2989__1_3_p_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)), &conv0_LambdaHeadVar__3_14);
  *wrapper_arg_3 = ((MR_Box) (conv0_LambdaHeadVar__3_14));
}

void MR_CALL 
hlds__hlds_goal__goal_list_purity_2_p_0(
  MR_Word Goals_3,
  MR_Word * GoalsPurity_4)
{
  MR_Box conv1_GoalsPurity_4;

  mercury__list__foldl_4_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_purity_0), (MR_Word) (&hlds__hlds_goal_scalar_common_2[9]), Goals_3, ((MR_Box) ((MR_Integer) 0)), &conv1_GoalsPurity_4);
  *GoalsPurity_4 = ((MR_Word) (conv1_GoalsPurity_4));
}

static void MR_CALL 
hlds__hlds_goal__goal_list_determinism_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_LambdaHeadVar__3_14;

  hlds__hlds_goal__IntroducedFrom__pred__goal_list_determinism__2980__1_3_p_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)), &conv0_LambdaHeadVar__3_14);
  *wrapper_arg_3 = ((MR_Box) (conv0_LambdaHeadVar__3_14));
}

void MR_CALL 
hlds__hlds_goal__goal_list_determinism_2_p_0(
  MR_Word Goals_3,
  MR_Word * Determinism_4)
{
  MR_Box conv1_Determinism_4;

  mercury__list__foldl_4_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_determinism_0), (MR_Word) (&hlds__hlds_goal_scalar_common_2[8]), Goals_3, ((MR_Box) ((MR_Integer) 0)), &conv1_Determinism_4);
  *Determinism_4 = ((MR_Word) (conv1_Determinism_4));
}

static void MR_CALL 
hlds__hlds_goal__goal_list_instmap_delta_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3)
{
  MR_Box closure = closure_arg;
  MR_Word conv0_LambdaHeadVar__3_15;

  hlds__hlds_goal__IntroducedFrom__pred__goal_list_instmap_delta__2970__1_3_p_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)), &conv0_LambdaHeadVar__3_15);
  *wrapper_arg_3 = ((MR_Box) (conv0_LambdaHeadVar__3_15));
}

void MR_CALL 
hlds__hlds_goal__goal_list_instmap_delta_2_p_0(
  MR_Word Goals_3,
  MR_Word * InstMapDelta_4)
{
  MR_Word InstMapDelta0_12;
  MR_Box conv1_InstMapDelta_4;

  hlds__instmap__instmap_delta_init_reachable_1_p_0(&InstMapDelta0_12);
  mercury__list__foldl_4_p_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&hlds__instmap__hlds__instmap__type_ctor_info_instmap_delta_0), (MR_Word) (&hlds__hlds_goal_scalar_common_2[7]), Goals_3, ((MR_Box) (InstMapDelta0_12)), &conv1_InstMapDelta_4);
  *InstMapDelta_4 = ((MR_Word) (conv1_InstMapDelta_4));
}

static MR_Box MR_CALL 
hlds__hlds_goal__goal_list_nonlocals_2_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_Word conv0_HeadVar__2_2;

  conv0_HeadVar__2_2 = hlds__hlds_goal__goal_get_nonlocals_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv0_HeadVar__2_2));
  return wrapper_arg_2;
}

void MR_CALL 
hlds__hlds_goal__goal_list_nonlocals_2_p_0(
  MR_Word Goals_3,
  MR_Word * NonLocals_4)
{
  MR_Word GoalNonLocals_5;

  GoalNonLocals_5 = mercury__list__map_2_f_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), (MR_Word) (&hlds__hlds_goal_scalar_common_1[3]), (MR_Word) (&hlds__hlds_goal_scalar_common_2[6]), Goals_3);
  parse_tree__set_of_var__union_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), GoalNonLocals_5, NonLocals_4);
}

void MR_CALL 
hlds__hlds_goal__negate_goal_3_p_0(
  MR_Word Goal_4,
  MR_Word GoalInfo_5,
  MR_Word * NegatedGoal_6)
{
  MR_bool succeeded;
  MR_Word Goal1_7;
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, Goal_4, 0))));

  succeeded = ((MR_tag((MR_Word) Var_12)) == (MR_Integer) 0);
  if (succeeded)
  {
    Goal1_7 = (MR_Word) ((MR_Word) (Var_12));
    *NegatedGoal_6 = Goal1_7;
  }
  else
  {
    MR_Word UnnegatedGoals_11;
    MR_Word NegatedGoals_9;
    MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, Goal_4, 0))));
    MR_Word Var_14;

    succeeded = ((((MR_tag((MR_Word) Var_13)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Var_13, 0)))) == (MR_Integer) 2)));
    if (succeeded)
    {
      Var_14 = ((MR_Unsigned) ((MR_hl_field(3, Var_13, 1))) & (MR_Integer) 1);
      NegatedGoals_9 = ((MR_Word) ((MR_hl_field(3, Var_13, 2))));
      succeeded = (Var_14 == (MR_Integer) 0);
      if (succeeded)
        succeeded = hlds__hlds_goal__all_negated_2_p_0(NegatedGoals_9, &UnnegatedGoals_11);
    }
    if (succeeded)
    {
      MR_Word Var_15;

      {
        Var_15 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
        MR_hl_field(3, Var_15, 0) = ((MR_Box) ((MR_Unsigned) 3U));
        MR_hl_field(3, Var_15, 1) = ((MR_Box) (UnnegatedGoals_11));
      }
      {
        MR_Word base;
        base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
        *NegatedGoal_6 = base;
        MR_hl_field(0, base, 0) = ((MR_Box) (Var_15));
        MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_5));
      }
    }
    else
    {
      MR_Word Var_16 = (MR_Word) ((MR_Word) (Goal_4));

      {
        MR_Word base;
        base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
        *NegatedGoal_6 = base;
        MR_hl_field(0, base, 0) = ((MR_Box) (Var_16));
        MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_5));
      }
    }
  }
}

static MR_bool MR_CALL 
hlds__hlds_goal__all_negated_2_p_0(
  MR_Word HeadVar__1_1,
  MR_Word * HeadVar__2_2)
{
  MR_bool succeeded;

  if ((HeadVar__1_1 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    *HeadVar__2_2 = (MR_Word) ((MR_Unsigned) 0U);
    succeeded = MR_TRUE;
  }
  else
  {
    MR_Word Var_19 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 1))));
    MR_Word Var_20 = ((MR_Word) ((MR_hl_field(1, HeadVar__1_1, 0))));
    MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_20, 0))));

    if (((MR_tag((MR_Word) Var_22)) == (MR_Integer) 0))
    {
      MR_Word Goal_3 = (MR_Word) ((MR_Word) (Var_22));
      MR_Word Goals_6;

      succeeded = hlds__hlds_goal__all_negated_2_p_0(Var_19, &Goals_6);
      if (succeeded)
      {
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          *HeadVar__2_2 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Goal_3));
          MR_hl_field(1, base, 1) = ((MR_Box) (Goals_6));
        }
        succeeded = MR_TRUE;
      }
    }
    else
    if (((((MR_tag((MR_Word) Var_22)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Var_22, 0)))) == (MR_Integer) 2))))
    {
      MR_Word TypeCtorInfo_18_18;
      MR_Word NegatedConj_9 = ((MR_Word) ((MR_hl_field(3, Var_22, 2))));
      MR_Word Goals1_13;
      MR_Word Goals2_14;
      MR_Word Var_17 = ((MR_Unsigned) ((MR_hl_field(3, Var_22, 1))) & (MR_Integer) 1);

      succeeded = (Var_17 == (MR_Integer) 0);
      if (succeeded)
      {
        succeeded = hlds__hlds_goal__all_negated_2_p_0(NegatedConj_9, &Goals1_13);
        if (succeeded)
        {
          succeeded = hlds__hlds_goal__all_negated_2_p_0(Var_19, &Goals2_14);
          if (succeeded)
          {
            TypeCtorInfo_18_18 = (MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0);
            *HeadVar__2_2 = mercury__list__f_43_43_2_f_0(TypeCtorInfo_18_18, Goals1_13, Goals2_14);
            succeeded = MR_TRUE;
          }
        }
      }
    }
    else
      succeeded = MR_FALSE;
  }
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal__conjoin_goals_3_p_0(
  MR_Word Goal1_4,
  MR_Word Goal2_5,
  MR_Word * Goal_6)
{
  MR_bool succeeded;
  MR_Word GoalList_9;
  MR_Word Goals2_7;
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, Goal2_5, 0))));
  MR_Word Var_11;

  succeeded = ((((MR_tag((MR_Word) Var_10)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Var_10, 0)))) == (MR_Integer) 2)));
  if (succeeded)
  {
    Var_11 = ((MR_Unsigned) ((MR_hl_field(3, Var_10, 1))) & (MR_Integer) 1);
    Goals2_7 = ((MR_Word) ((MR_hl_field(3, Var_10, 2))));
    succeeded = (Var_11 == (MR_Integer) 0);
  }
  if (succeeded)
    GoalList_9 = Goals2_7;
  else
    {
      GoalList_9 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, GoalList_9, 0) = ((MR_Box) (Goal2_5));
      MR_hl_field(1, GoalList_9, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    }
  hlds__hlds_goal__conjoin_goal_and_goal_list_3_p_0(Goal1_4, GoalList_9, Goal_6);
}

void MR_CALL 
hlds__hlds_goal__conjoin_goal_and_goal_list_3_p_0(
  MR_Word Goal0_4,
  MR_Word Goals_5,
  MR_Word * Goal_6)
{
  MR_bool succeeded;
  MR_Word GoalExpr0_7 = ((MR_Word) ((MR_hl_field(0, Goal0_4, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_4, 1))));
  MR_Word GoalExpr_11;
  MR_Word GoalList0_9;
  MR_Word Var_12;

  succeeded = ((((MR_tag((MR_Word) GoalExpr0_7)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, GoalExpr0_7, 0)))) == (MR_Integer) 2)));
  if (succeeded)
  {
    Var_12 = ((MR_Unsigned) ((MR_hl_field(3, GoalExpr0_7, 1))) & (MR_Integer) 1);
    GoalList0_9 = ((MR_Word) ((MR_hl_field(3, GoalExpr0_7, 2))));
    succeeded = (Var_12 == (MR_Integer) 0);
  }
  if (succeeded)
  {
    MR_Word GoalList_10;

    GoalList_10 = mercury__list__f_43_43_2_f_0((MR_Word) (&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0), GoalList0_9, Goals_5);
    {
      GoalExpr_11 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, GoalExpr_11, 0) = ((MR_Box) ((MR_Unsigned) 2U));
      MR_hl_field(3, GoalExpr_11, 1) = (MR_Box) ((MR_Unsigned) ((MR_Integer) 0));
      MR_hl_field(3, GoalExpr_11, 2) = ((MR_Box) (GoalList_10));
    }
  }
  else
  {
    MR_Word Var_15;

    {
      Var_15 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, Var_15, 0) = ((MR_Box) (Goal0_4));
      MR_hl_field(1, Var_15, 1) = ((MR_Box) (Goals_5));
    }
    {
      GoalExpr_11 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, GoalExpr_11, 0) = ((MR_Box) ((MR_Unsigned) 2U));
      MR_hl_field(3, GoalExpr_11, 1) = (MR_Box) ((MR_Unsigned) ((MR_Integer) 0));
      MR_hl_field(3, GoalExpr_11, 2) = ((MR_Box) (Var_15));
    }
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_11));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo0_8));
  }
}

void MR_CALL 
hlds__hlds_goal__disj_list_to_goal_3_p_0(
  MR_Word DisjList_4,
  MR_Word GoalInfo_5,
  MR_Word * Goal_6)
{
  MR_bool succeeded = (DisjList_4 != (MR_Word) ((MR_Unsigned) 0U));
  MR_Word Goal0_7;
  MR_Word Var_8;

  if (succeeded)
  {
    Goal0_7 = ((MR_Word) ((MR_hl_field(1, DisjList_4, 0))));
    Var_8 = ((MR_Word) ((MR_hl_field(1, DisjList_4, 1))));
    succeeded = (Var_8 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    *Goal_6 = Goal0_7;
  else
  {
    MR_Word Var_9;

    {
      Var_9 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, Var_9, 0) = ((MR_Box) ((MR_Unsigned) 3U));
      MR_hl_field(3, Var_9, 1) = ((MR_Box) (DisjList_4));
    }
    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
      *Goal_6 = base;
      MR_hl_field(0, base, 0) = ((MR_Box) (Var_9));
      MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_5));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__par_conj_list_to_goal_3_p_0(
  MR_Word ConjList_4,
  MR_Word GoalInfo_5,
  MR_Word * Goal_6)
{
  MR_bool succeeded = (ConjList_4 != (MR_Word) ((MR_Unsigned) 0U));
  MR_Word Goal0_7;
  MR_Word Var_8;

  if (succeeded)
  {
    Goal0_7 = ((MR_Word) ((MR_hl_field(1, ConjList_4, 0))));
    Var_8 = ((MR_Word) ((MR_hl_field(1, ConjList_4, 1))));
    succeeded = (Var_8 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    *Goal_6 = Goal0_7;
  else
  {
    MR_Word Var_9;

    {
      Var_9 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, Var_9, 0) = ((MR_Box) ((MR_Unsigned) 2U));
      MR_hl_field(3, Var_9, 1) = (MR_Box) ((MR_Unsigned) ((MR_Integer) 1));
      MR_hl_field(3, Var_9, 2) = ((MR_Box) (ConjList_4));
    }
    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
      *Goal_6 = base;
      MR_hl_field(0, base, 0) = ((MR_Box) (Var_9));
      MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_5));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__conj_list_to_goal_3_p_0(
  MR_Word ConjList_4,
  MR_Word GoalInfo_5,
  MR_Word * Goal_6)
{
  MR_bool succeeded = (ConjList_4 != (MR_Word) ((MR_Unsigned) 0U));
  MR_Word Goal0_7;
  MR_Word Var_8;

  if (succeeded)
  {
    Goal0_7 = ((MR_Word) ((MR_hl_field(1, ConjList_4, 0))));
    Var_8 = ((MR_Word) ((MR_hl_field(1, ConjList_4, 1))));
    succeeded = (Var_8 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    *Goal_6 = Goal0_7;
  else
  {
    MR_Word Var_9;

    {
      Var_9 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(3, Var_9, 0) = ((MR_Box) ((MR_Unsigned) 2U));
      MR_hl_field(3, Var_9, 1) = (MR_Box) ((MR_Unsigned) ((MR_Integer) 0));
      MR_hl_field(3, Var_9, 2) = ((MR_Box) (ConjList_4));
    }
    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
      *Goal_6 = base;
      MR_hl_field(0, base, 0) = ((MR_Box) (Var_9));
      MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_5));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__goal_to_disj_list_2_p_0(
  MR_Word Goal_3,
  MR_Word * DisjList_4)
{
  MR_bool succeeded;
  MR_Word List_5;
  MR_Word Var_7 = ((MR_Word) ((MR_hl_field(0, Goal_3, 0))));

  succeeded = ((((MR_tag((MR_Word) Var_7)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Var_7, 0)))) == (MR_Integer) 3)));
  if (succeeded)
  {
    List_5 = ((MR_Word) ((MR_hl_field(3, Var_7, 1))));
    *DisjList_4 = List_5;
  }
  else
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *DisjList_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Goal_3));
      MR_hl_field(1, base, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    }
}

void MR_CALL 
hlds__hlds_goal__goal_to_par_conj_list_2_p_0(
  MR_Word Goal_3,
  MR_Word * ConjList_4)
{
  MR_bool succeeded;
  MR_Word List_5;
  MR_Word Var_7 = ((MR_Word) ((MR_hl_field(0, Goal_3, 0))));
  MR_Word Var_8;

  succeeded = ((((MR_tag((MR_Word) Var_7)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Var_7, 0)))) == (MR_Integer) 2)));
  if (succeeded)
  {
    Var_8 = ((MR_Unsigned) ((MR_hl_field(3, Var_7, 1))) & (MR_Integer) 1);
    List_5 = ((MR_Word) ((MR_hl_field(3, Var_7, 2))));
    succeeded = (Var_8 == (MR_Integer) 1);
  }
  if (succeeded)
    *ConjList_4 = List_5;
  else
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *ConjList_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Goal_3));
      MR_hl_field(1, base, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    }
}

void MR_CALL 
hlds__hlds_goal__goal_to_conj_list_2_p_0(
  MR_Word Goal_3,
  MR_Word * ConjList_4)
{
  MR_bool succeeded;
  MR_Word List_5;
  MR_Word Var_7 = ((MR_Word) ((MR_hl_field(0, Goal_3, 0))));
  MR_Word Var_8;

  succeeded = ((((MR_tag((MR_Word) Var_7)) == (MR_Integer) 3)) && ((((MR_Integer) ((MR_hl_field(3, Var_7, 0)))) == (MR_Integer) 2)));
  if (succeeded)
  {
    Var_8 = ((MR_Unsigned) ((MR_hl_field(3, Var_7, 1))) & (MR_Integer) 1);
    List_5 = ((MR_Word) ((MR_hl_field(3, Var_7, 2))));
    succeeded = (Var_8 == (MR_Integer) 0);
  }
  if (succeeded)
    *ConjList_4 = List_5;
  else
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *ConjList_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Goal_3));
      MR_hl_field(1, base, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    }
}

static void MR_CALL 
hlds__hlds_goal__incremental_rename_var_in_unify_rhs_4_p_0(
  MR_Word Subn_5,
  MR_Word SubnUpdates_6,
  MR_Word RHS0_7,
  MR_Word * RHS_8)
{
  switch (MR_tag((MR_Word) RHS0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Var0_9 = ((MR_Word) ((MR_hl_field(0, RHS0_7, 0))));
        MR_Word Var_10;

        parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Var0_9, &Var_10);
        {
          MR_Word base;
          base = (MR_Word) MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL);
          *RHS_8 = base;
          MR_hl_field(0, base, 0) = ((MR_Box) (Var_10));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word Functor_11 = ((MR_Word) ((MR_hl_field(1, RHS0_7, 0))));
        MR_Word E_12 = ((MR_Unsigned) ((MR_hl_field(1, RHS0_7, 1))) & (MR_Integer) 1);
        MR_Word ArgVars0_13 = ((MR_Word) ((MR_hl_field(1, RHS0_7, 2))));
        MR_Word ArgVars_14;

        parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, ArgVars0_13, &ArgVars_14);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
          *RHS_8 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Functor_11));
          MR_hl_field(1, base, 1) = (MR_Box) ((MR_Unsigned) (E_12));
          MR_hl_field(1, base, 2) = ((MR_Box) (ArgVars_14));
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word NonLocals0_18 = ((MR_Word) ((MR_hl_field(2, RHS0_7, 1))));
        MR_Word VarsModes0_19 = ((MR_Word) ((MR_hl_field(2, RHS0_7, 2))));
        MR_Word Det_20 = ((MR_Unsigned) ((MR_hl_field(2, RHS0_7, 3))) & (MR_Integer) 7);
        MR_Word Goal0_21 = ((MR_Word) ((MR_hl_field(2, RHS0_7, 4))));
        MR_Word NonLocals_22;
        MR_Word Vars0_23;
        MR_Word Modes_24;
        MR_Word Vars_25;
        MR_Word VarsModes_26;
        MR_Word Goal_27;
        MR_Unsigned packed_word_1 = (MR_Unsigned) ((MR_hl_field(2, RHS0_7, 0)));

        parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, NonLocals0_18, &NonLocals_22);
        mercury__assoc_list__keys_and_values_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0), VarsModes0_19, &Vars0_23, &Modes_24);
        parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Vars0_23, &Vars_25);
        mercury__assoc_list__from_corresponding_lists_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0), Vars_25, Modes_24, &VarsModes_26);
        hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, Goal0_21, &Goal_27);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          *RHS_8 = base;
          MR_hl_field(2, base, 0) = (MR_Box) (packed_word_1);
          MR_hl_field(2, base, 1) = ((MR_Box) (NonLocals_22));
          MR_hl_field(2, base, 2) = ((MR_Box) (VarsModes_26));
          MR_hl_field(2, base, 3) = (MR_Box) ((MR_Unsigned) (Det_20));
          MR_hl_field(2, base, 4) = ((MR_Box) (Goal_27));
        }
      }
      break;
  }
}

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goal_expr_4_p_0(
  MR_Word Subn_5,
  MR_Word SubnUpdates_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8)
{
  switch (MR_tag((MR_Word) Expr0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Goal0_25 = (MR_Word) ((MR_Word) (Expr0_7));
        MR_Word Goal_26;

        hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, Goal0_25, &Goal_26);
        *Expr_8 = (MR_Word) ((MR_Word) (Goal_26));
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word LHS0_60 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 0))));
        MR_Word RHS0_61 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 1))));
        MR_Word Mode_62 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 2))));
        MR_Word Unify0_63 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 3))));
        MR_Word LHS_64;
        MR_Word RHS_65;
        MR_Word Unify_66;
        MR_Word Context_164 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 4))));

        parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, LHS0_60, &LHS_64);
        hlds__hlds_goal__incremental_rename_var_in_unify_rhs_4_p_0(Subn_5, SubnUpdates_6, RHS0_61, &RHS_65);
        hlds__hlds_goal__rename_var_in_unify_4_p_0((MR_Integer) 1, Subn_5, Unify0_63, &Unify_66);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          *Expr_8 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (LHS_64));
          MR_hl_field(1, base, 1) = ((MR_Box) (RHS_65));
          MR_hl_field(1, base, 2) = ((MR_Box) (Mode_62));
          MR_hl_field(1, base, 3) = ((MR_Box) (Unify_66));
          MR_hl_field(1, base, 4) = ((MR_Box) (Context_164));
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word PredId_55 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 0))));
        MR_Integer ProcId_56 = ((MR_Integer) ((MR_hl_field(2, Expr0_7, 1))));
        MR_Word Builtin_57 = ((MR_Unsigned) ((MR_hl_field(2, Expr0_7, 3))) & (MR_Integer) 1);
        MR_Word Context_58 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 4))));
        MR_Word Sym_59 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 5))));
        MR_Word Args0_162 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 2))));
        MR_Word Args_163;

        parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Args0_162, &Args_163);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
          *Expr_8 = base;
          MR_hl_field(2, base, 0) = ((MR_Box) (PredId_55));
          MR_hl_field(2, base, 1) = ((MR_Box) (ProcId_56));
          MR_hl_field(2, base, 2) = ((MR_Box) (Args_163));
          MR_hl_field(2, base, 3) = (MR_Box) ((MR_Unsigned) (Builtin_57));
          MR_hl_field(2, base, 4) = ((MR_Box) (Context_58));
          MR_hl_field(2, base, 5) = ((MR_Box) (Sym_59));
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, Expr0_7, 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word GenericCall0_48 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Args0_49 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Modes_50 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
            MR_Word MaybeArgRegs_51 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
            MR_Word Det_52 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 5))) & (MR_Integer) 7);
            MR_Word GenericCall_53;
            MR_Word Args_54;

            hlds__hlds_goal__rename_generic_call_4_p_0((MR_Integer) 1, Subn_5, GenericCall0_48, &GenericCall_53);
            parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Args0_49, &Args_54);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 0U));
              MR_hl_field(3, base, 1) = ((MR_Box) (GenericCall_53));
              MR_hl_field(3, base, 2) = ((MR_Box) (Args_54));
              MR_hl_field(3, base, 3) = ((MR_Box) (Modes_50));
              MR_hl_field(3, base, 4) = ((MR_Box) (MaybeArgRegs_51));
              MR_hl_field(3, base, 5) = (MR_Box) ((MR_Unsigned) (Det_52));
            }
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word Attrs_67 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Extra0_68 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 5))));
            MR_Word MTRC_69 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 6))));
            MR_Word Impl_70 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 7))));
            MR_Word Extra_71;
            MR_Word Args0_165 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
            MR_Word Args_166;
            MR_Word PredId_167 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Integer ProcId_168 = ((MR_Integer) ((MR_hl_field(3, Expr0_7, 3))));

            hlds__hlds_goal__rename_arg_list_4_p_0((MR_Integer) 1, Subn_5, Args0_165, &Args_166);
            hlds__hlds_goal__rename_arg_list_4_p_0((MR_Integer) 1, Subn_5, Extra0_68, &Extra_71);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 1U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Attrs_67));
              MR_hl_field(3, base, 2) = ((MR_Box) (PredId_167));
              MR_hl_field(3, base, 3) = ((MR_Box) (ProcId_168));
              MR_hl_field(3, base, 4) = ((MR_Box) (Args_166));
              MR_hl_field(3, base, 5) = ((MR_Box) (Extra_71));
              MR_hl_field(3, base, 6) = ((MR_Box) (MTRC_69));
              MR_hl_field(3, base, 7) = ((MR_Box) (Impl_70));
            }
          }
          break;
        case (MR_Integer) 2:
          {
            MR_Word ConjType_9 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 1))) & (MR_Integer) 1);
            MR_Word Goals0_10 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Goals_11;

            hlds__hlds_goal__incremental_rename_vars_in_goals_4_p_0(Subn_5, SubnUpdates_6, Goals0_10, &Goals_11);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 2U));
              MR_hl_field(3, base, 1) = (MR_Box) ((MR_Unsigned) (ConjType_9));
              MR_hl_field(3, base, 2) = ((MR_Box) (Goals_11));
            }
          }
          break;
        case (MR_Integer) 3:
          {
            MR_Word Goals0_138 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Goals_139;

            hlds__hlds_goal__incremental_rename_vars_in_goals_4_p_0(Subn_5, SubnUpdates_6, Goals0_138, &Goals_139);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 3U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Goals_139));
            }
          }
          break;
        case (MR_Integer) 4:
          {
            MR_Word Var0_12 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word CanFail_13 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 2))) & (MR_Integer) 1);
            MR_Word Cases0_14 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
            MR_Word Var_15;
            MR_Word Cases_16;

            parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Var0_12, &Var_15);
            hlds__hlds_goal__incremental_rename_vars_in_cases_4_p_0(Subn_5, SubnUpdates_6, Cases0_14, &Cases_16);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 4U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Var_15));
              MR_hl_field(3, base, 2) = (MR_Box) ((MR_Unsigned) (CanFail_13));
              MR_hl_field(3, base, 3) = ((MR_Box) (Cases_16));
            }
          }
          break;
        case (MR_Integer) 5:
          {
            MR_Word Reason0_27 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Reason_29;
            MR_Word Goal0_160 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Goal_161;

            switch (MR_tag((MR_Word) Reason0_27)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                {
                  MR_Word Creator_28 = ((MR_Unsigned) ((MR_hl_field(0, Reason0_27, 1))) & (MR_Integer) 1);
                  MR_Word Vars0_140 = ((MR_Word) ((MR_hl_field(0, Reason0_27, 0))));
                  MR_Word Vars_141;

                  parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Vars0_140, &Vars_141);
                  {
                    Reason_29 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Reason_29, 0) = ((MR_Box) (Vars_141));
                    MR_hl_field(0, Reason_29, 1) = (MR_Box) ((MR_Unsigned) (Creator_28));
                  }
                }
                break;
              case (MR_Integer) 1:
                Reason_29 = Reason0_27;
                break;
              case (MR_Integer) 2:
                {
                  MR_Word Kind_30 = ((MR_Unsigned) ((MR_hl_field(2, Reason0_27, 1))) & (MR_Integer) 3);
                  MR_Word Vars0_142 = ((MR_Word) ((MR_hl_field(2, Reason0_27, 0))));
                  MR_Word Vars_143;

                  parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Vars0_142, &Vars_143);
                  {
                    Reason_29 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(2, Reason_29, 0) = ((MR_Box) (Vars_143));
                    MR_hl_field(2, Reason_29, 1) = (MR_Box) ((MR_Unsigned) (Kind_30));
                  }
                }
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, Reason0_27, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                    Reason_29 = Reason0_27;
                    break;
                  case (MR_Integer) 2:
                    {
                      MR_Word Var0_144 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Var_145;

                      parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Var0_144, &Var_145);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 2U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Var_145));
                      }
                    }
                    break;
                  case (MR_Integer) 3:
                    {
                      MR_Word Detism_31 = ((MR_Unsigned) ((MR_hl_field(3, Reason0_27, 2))) & (MR_Integer) 7);
                      MR_Word Var0_146 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Var_147;

                      parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Var0_146, &Var_147);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 3U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Var_147));
                        MR_hl_field(3, Reason_29, 2) = (MR_Box) ((MR_Unsigned) (Detism_31));
                      }
                    }
                    break;
                  case (MR_Integer) 6:
                    {
                      MR_Word Var0_148 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Var_149;
                      MR_Word Kind_150 = ((MR_Unsigned) ((MR_hl_field(3, Reason0_27, 2))) & (MR_Integer) 3);

                      parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Var0_148, &Var_149);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 6U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Var_149));
                        MR_hl_field(3, Reason_29, 2) = (MR_Box) ((MR_Unsigned) (Kind_150));
                      }
                    }
                    break;
                  case (MR_Integer) 7:
                    {
                      MR_Word Flag_32 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Grade_33 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 2))));
                      MR_Word Env_34 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 3))));
                      MR_Word QuantVars0_35 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 5))));
                      MR_Word QuantVars_36;
                      MR_Word Vars_151 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 4))));

                      parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, QuantVars0_35, &QuantVars_36);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 7U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Flag_32));
                        MR_hl_field(3, Reason_29, 2) = ((MR_Box) (Grade_33));
                        MR_hl_field(3, Reason_29, 3) = ((MR_Box) (Env_34));
                        MR_hl_field(3, Reason_29, 4) = ((MR_Box) (Vars_151));
                        MR_hl_field(3, Reason_29, 5) = ((MR_Box) (QuantVars_36));
                      }
                    }
                    break;
                  case (MR_Integer) 8:
                    {
                      MR_Word LCVar0_37 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word LCSVar0_38 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 2))));
                      MR_Word UseParentStack_39 = ((MR_Unsigned) ((MR_hl_field(3, Reason0_27, 3))) & (MR_Integer) 1);
                      MR_Word LCVar_40;
                      MR_Word LCSVar_41;

                      parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, LCVar0_37, &LCVar_40);
                      parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, LCSVar0_38, &LCSVar_41);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 8U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (LCVar_40));
                        MR_hl_field(3, Reason_29, 2) = ((MR_Box) (LCSVar_41));
                        MR_hl_field(3, Reason_29, 3) = (MR_Box) ((MR_Unsigned) (UseParentStack_39));
                      }
                    }
                    break;
                }
                break;
            }
            hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, Goal0_160, &Goal_161);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 5U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Reason_29));
              MR_hl_field(3, base, 2) = ((MR_Box) (Goal_161));
            }
          }
          break;
        case (MR_Integer) 6:
          {
            MR_Word Vars0_17 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Cond0_18 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Then0_19 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
            MR_Word Else0_20 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
            MR_Word Vars_21;
            MR_Word Cond_22;
            MR_Word Then_23;
            MR_Word Else_24;

            parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, Vars0_17, &Vars_21);
            hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, Cond0_18, &Cond_22);
            hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, Then0_19, &Then_23);
            hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, Else0_20, &Else_24);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 6U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Vars_21));
              MR_hl_field(3, base, 2) = ((MR_Box) (Cond_22));
              MR_hl_field(3, base, 3) = ((MR_Box) (Then_23));
              MR_hl_field(3, base, 4) = ((MR_Box) (Else_24));
            }
          }
          break;
        case (MR_Integer) 7:
          {
            MR_Word Shorthand0_72 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Shorthand_96;

            switch (MR_tag((MR_Word) Shorthand0_72)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                {
                  MR_Word LeftGoal0_107 = ((MR_Word) ((MR_hl_field(0, Shorthand0_72, 0))));
                  MR_Word RightGoal0_108 = ((MR_Word) ((MR_hl_field(0, Shorthand0_72, 1))));
                  MR_Word LeftGoal_109;
                  MR_Word RightGoal_110;

                  hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, LeftGoal0_107, &LeftGoal_109);
                  hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, RightGoal0_108, &RightGoal_110);
                  {
                    Shorthand_96 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Shorthand_96, 0) = ((MR_Box) (LeftGoal_109));
                    MR_hl_field(0, Shorthand_96, 1) = ((MR_Box) (RightGoal_110));
                  }
                }
                break;
              case (MR_Integer) 1:
                {
                  MR_Word Outer0_74 = ((MR_Word) ((MR_hl_field(1, Shorthand0_72, 1))));
                  MR_Word Inner0_75 = ((MR_Word) ((MR_hl_field(1, Shorthand0_72, 2))));
                  MR_Word MaybeOutputVars0_76 = ((MR_Word) ((MR_hl_field(1, Shorthand0_72, 3))));
                  MR_Word MainGoal0_77 = ((MR_Word) ((MR_hl_field(1, Shorthand0_72, 4))));
                  MR_Word OrElseGoals0_78 = ((MR_Word) ((MR_hl_field(1, Shorthand0_72, 5))));
                  MR_Word OrElseInners_79 = ((MR_Word) ((MR_hl_field(1, Shorthand0_72, 6))));
                  MR_Word GoalType_80 = ((MR_Unsigned) ((MR_hl_field(1, Shorthand0_72, 0))) & (MR_Integer) 3);
                  MR_Word OuterDI0_81 = ((MR_Word) ((MR_hl_field(0, Outer0_74, 0))));
                  MR_Word OuterUO0_82 = ((MR_Word) ((MR_hl_field(0, Outer0_74, 1))));
                  MR_Word OuterDI_83;
                  MR_Word OuterUO_84;
                  MR_Word Outer_85;
                  MR_Word InnerDI0_86;
                  MR_Word InnerUO0_87;
                  MR_Word InnerDI_88;
                  MR_Word InnerUO_89;
                  MR_Word Inner_90;
                  MR_Word MaybeOutputVars_91;
                  MR_Word MainGoal_94;
                  MR_Word OrElseGoals_95;

                  parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, OuterDI0_81, &OuterDI_83);
                  parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, OuterUO0_82, &OuterUO_84);
                  {
                    Outer_85 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Outer_85, 0) = ((MR_Box) (OuterDI_83));
                    MR_hl_field(0, Outer_85, 1) = ((MR_Box) (OuterUO_84));
                  }
                  InnerDI0_86 = ((MR_Word) ((MR_hl_field(0, Inner0_75, 0))));
                  InnerUO0_87 = ((MR_Word) ((MR_hl_field(0, Inner0_75, 1))));
                  parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, InnerDI0_86, &InnerDI_88);
                  parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, InnerUO0_87, &InnerUO_89);
                  {
                    Inner_90 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Inner_90, 0) = ((MR_Box) (InnerDI_88));
                    MR_hl_field(0, Inner_90, 1) = ((MR_Box) (InnerUO_89));
                  }
                  if ((MaybeOutputVars0_76 == (MR_Word) ((MR_Unsigned) 0U)))
                    MaybeOutputVars_91 = MaybeOutputVars0_76;
                  else
                  {
                    MR_Word OutputVars0_92 = ((MR_Word) ((MR_hl_field(1, MaybeOutputVars0_76, 0))));
                    MR_Word OutputVars_93;

                    parse_tree__prog_rename__rename_var_list_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, OutputVars0_92, &OutputVars_93);
                    {
                      MaybeOutputVars_91 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
                      MR_hl_field(1, MaybeOutputVars_91, 0) = ((MR_Box) (OutputVars_93));
                    }
                  }
                  hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, MainGoal0_77, &MainGoal_94);
                  hlds__hlds_goal__incremental_rename_vars_in_goals_4_p_0(Subn_5, SubnUpdates_6, OrElseGoals0_78, &OrElseGoals_95);
                  {
                    Shorthand_96 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(1, Shorthand_96, 0) = (MR_Box) ((MR_Unsigned) (GoalType_80));
                    MR_hl_field(1, Shorthand_96, 1) = ((MR_Box) (Outer_85));
                    MR_hl_field(1, Shorthand_96, 2) = ((MR_Box) (Inner_90));
                    MR_hl_field(1, Shorthand_96, 3) = ((MR_Box) (MaybeOutputVars_91));
                    MR_hl_field(1, Shorthand_96, 4) = ((MR_Box) (MainGoal_94));
                    MR_hl_field(1, Shorthand_96, 5) = ((MR_Box) (OrElseGoals_95));
                    MR_hl_field(1, Shorthand_96, 6) = ((MR_Box) (OrElseInners_79));
                  }
                }
                break;
              case (MR_Integer) 2:
                {
                  MR_Word MaybeIO0_97 = ((MR_Word) ((MR_hl_field(2, Shorthand0_72, 0))));
                  MR_Word ResultVar0_98 = ((MR_Word) ((MR_hl_field(2, Shorthand0_72, 1))));
                  MR_Word SubGoal0_99 = ((MR_Word) ((MR_hl_field(2, Shorthand0_72, 2))));
                  MR_Word MaybeIO_104;
                  MR_Word ResultVar_105;
                  MR_Word SubGoal_106;

                  if ((MaybeIO0_97 == (MR_Word) ((MR_Unsigned) 0U)))
                    MaybeIO_104 = (MR_Word) ((MR_Unsigned) 0U);
                  else
                  {
                    MR_Word IOVarInitial0_100;
                    MR_Word IOVarFinal0_101;
                    MR_Word IOVarInitial_102;
                    MR_Word IOVarFinal_103;
                    MR_Word Var_133 = ((MR_Word) ((MR_hl_field(1, MaybeIO0_97, 0))));
                    MR_Word Var_136;

                    IOVarInitial0_100 = ((MR_Word) ((MR_hl_field(0, Var_133, 0))));
                    IOVarFinal0_101 = ((MR_Word) ((MR_hl_field(0, Var_133, 1))));
                    parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, IOVarInitial0_100, &IOVarInitial_102);
                    parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, IOVarFinal0_101, &IOVarFinal_103);
                    {
                      Var_136 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                      MR_hl_field(0, Var_136, 0) = ((MR_Box) (IOVarInitial_102));
                      MR_hl_field(0, Var_136, 1) = ((MR_Box) (IOVarFinal_103));
                    }
                    {
                      MaybeIO_104 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
                      MR_hl_field(1, MaybeIO_104, 0) = ((MR_Box) (Var_136));
                    }
                  }
                  parse_tree__prog_rename__rename_var_4_p_1((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), (MR_Integer) 1, Subn_5, ResultVar0_98, &ResultVar_105);
                  hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_5, SubnUpdates_6, SubGoal0_99, &SubGoal_106);
                  {
                    Shorthand_96 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(2, Shorthand_96, 0) = ((MR_Box) (MaybeIO_104));
                    MR_hl_field(2, Shorthand_96, 1) = ((MR_Box) (ResultVar_105));
                    MR_hl_field(2, Shorthand_96, 2) = ((MR_Box) (SubGoal_106));
                  }
                }
                break;
            }
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 7U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Shorthand_96));
            }
          }
          break;
      }
      break;
  }
}

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_cases_4_p_0(
  MR_Word Subn_1,
  MR_Word SubnUpdates_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4)
{
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__4_4 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Case0_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
    MR_Word Cases0_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
    MR_Word Case_11;
    MR_Word Cases_12;
    MR_Word MainConsId_13 = ((MR_Word) ((MR_hl_field(0, Case0_9, 0))));
    MR_Word OtherConsIds_14 = ((MR_Word) ((MR_hl_field(0, Case0_9, 1))));
    MR_Word Goal0_15 = ((MR_Word) ((MR_hl_field(0, Case0_9, 2))));
    MR_Word Goal_16;

    hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_1, SubnUpdates_2, Goal0_15, &Goal_16);
    {
      Case_11 = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Case_11, 0) = ((MR_Box) (MainConsId_13));
      MR_hl_field(0, Case_11, 1) = ((MR_Box) (OtherConsIds_14));
      MR_hl_field(0, Case_11, 2) = ((MR_Box) (Goal_16));
    }
    hlds__hlds_goal__incremental_rename_vars_in_cases_4_p_0(Subn_1, SubnUpdates_2, Cases0_10, &Cases_12);
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *HeadVar__4_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Case_11));
      MR_hl_field(1, base, 1) = ((MR_Box) (Cases_12));
    }
  }
}

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goals_4_p_0(
  MR_Word Subn_1,
  MR_Word SubnUpdates_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4)
{
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__4_4 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Goal0_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
    MR_Word Goals0_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
    MR_Word Goal_11;
    MR_Word Goals_12;

    hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(Subn_1, SubnUpdates_2, Goal0_9, &Goal_11);
    hlds__hlds_goal__incremental_rename_vars_in_goals_4_p_0(Subn_1, SubnUpdates_2, Goals0_10, &Goals_12);
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *HeadVar__4_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Goal_11));
      MR_hl_field(1, base, 1) = ((MR_Box) (Goals_12));
    }
  }
}

static void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box * wrapper_arg_3)
{
  MR_Box closure = closure_arg;
  MR_Word conv1_STATE_VARIABLE_Subn_14;

  hlds__hlds_goal__follow_subn_until_fixpoint_3_p_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)), &conv1_STATE_VARIABLE_Subn_14);
  *wrapper_arg_3 = ((MR_Box) (conv1_STATE_VARIABLE_Subn_14));
}

void MR_CALL 
hlds__hlds_goal__incremental_rename_vars_in_goal_4_p_0(
  MR_Word Subn0_5,
  MR_Word SubnUpdates_6,
  MR_Word Goal0_7,
  MR_Word * Goal_8)
{
  MR_bool succeeded;
  MR_Word GoalExpr0_9 = ((MR_Word) ((MR_hl_field(0, Goal0_7, 0))));
  MR_Word GoalInfo0_10 = ((MR_Word) ((MR_hl_field(0, Goal0_7, 1))));
  MR_Word GoalId_11 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_10, 4))));
  MR_Word Subn_16;
  MR_Word GoalExpr_17;
  MR_Word GoalInfo_18;
  MR_Word GoalSubns_12;
  MR_Box conv0_GoalSubns_12;

  succeeded = mercury__map__search_3_p_0((MR_Word) (&mdbcomp__goal_path__mdbcomp__goal_path__type_ctor_info_goal_id_0), (MR_Word) (&hlds__hlds_goal_scalar_common_1[2]), SubnUpdates_6, ((MR_Box) (GoalId_11)), &conv0_GoalSubns_12);
  if (succeeded)
  {
    GoalSubns_12 = ((MR_Word) (conv0_GoalSubns_12));
    succeeded = MR_TRUE;
  }
  if (succeeded)
  {
    MR_Box conv2_Subn_16;

    mercury__list__foldl_4_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_2[1]), (MR_Word) (&hlds__hlds_goal_scalar_common_2[2]), (MR_Word) (&hlds__hlds_goal_scalar_common_2[5]), GoalSubns_12, ((MR_Box) (Subn0_5)), &conv2_Subn_16);
    Subn_16 = ((MR_Word) (conv2_Subn_16));
  }
  else
    Subn_16 = Subn0_5;
  hlds__hlds_goal__incremental_rename_vars_in_goal_expr_4_p_0(Subn_16, SubnUpdates_6, GoalExpr0_9, &GoalExpr_17);
  hlds__hlds_goal__rename_vars_in_goal_info_4_p_0((MR_Integer) 1, Subn_16, GoalInfo0_10, &GoalInfo_18);
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_8 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_17));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_18));
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_expr_4_p_3(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8)
{
  MR_Word Attrs_69 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
  MR_Word Extra0_70 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 5))));
  MR_Word MTRC_71 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 6))));
  MR_Word Impl_72 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 7))));
  MR_Word Extra_73;
  MR_Word Args0_141 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
  MR_Word Args_142;
  MR_Word PredId_143 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
  MR_Integer ProcId_144 = ((MR_Integer) ((MR_hl_field(3, Expr0_7, 3))));

  hlds__hlds_goal__rename_arg_list_4_p_0(Must_5, Subn_6, Args0_141, &Args_142);
  hlds__hlds_goal__rename_arg_list_4_p_0(Must_5, Subn_6, Extra0_70, &Extra_73);
  {
    MR_Word base;
    base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL));
    *Expr_8 = base;
    MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 1U));
    MR_hl_field(3, base, 1) = ((MR_Box) (Attrs_69));
    MR_hl_field(3, base, 2) = ((MR_Box) (PredId_143));
    MR_hl_field(3, base, 3) = ((MR_Box) (ProcId_144));
    MR_hl_field(3, base, 4) = ((MR_Box) (Args_142));
    MR_hl_field(3, base, 5) = ((MR_Box) (Extra_73));
    MR_hl_field(3, base, 6) = ((MR_Box) (MTRC_71));
    MR_hl_field(3, base, 7) = ((MR_Box) (Impl_72));
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_expr_4_p_2(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8)
{
  MR_Word GenericCall0_48 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
  MR_Word Args0_49 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
  MR_Word Modes_50 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
  MR_Word MaybeArgRegs_51 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
  MR_Word Det_52 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 5))) & (MR_Integer) 7);
  MR_Word GenericCall_53;
  MR_Word Args_54;

  hlds__hlds_goal__rename_generic_call_4_p_0(Must_5, Subn_6, GenericCall0_48, &GenericCall_53);
  parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Args0_49, &Args_54);
  {
    MR_Word base;
    base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
    *Expr_8 = base;
    MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(3, base, 1) = ((MR_Box) (GenericCall_53));
    MR_hl_field(3, base, 2) = ((MR_Box) (Args_54));
    MR_hl_field(3, base, 3) = ((MR_Box) (Modes_50));
    MR_hl_field(3, base, 4) = ((MR_Box) (MaybeArgRegs_51));
    MR_hl_field(3, base, 5) = (MR_Box) ((MR_Unsigned) (Det_52));
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_expr_4_p_1(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8)
{
  MR_Word PredId_55 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 0))));
  MR_Integer ProcId_56 = ((MR_Integer) ((MR_hl_field(2, Expr0_7, 1))));
  MR_Word Builtin_57 = ((MR_Unsigned) ((MR_hl_field(2, Expr0_7, 3))) & (MR_Integer) 1);
  MR_Word CallUC0_58 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 4))));
  MR_Word Sym_59 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 5))));
  MR_Word CallUC_60;
  MR_Word Args0_139 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 2))));
  MR_Word Args_140;

  hlds__hlds_goal__rename_var_in_call_unify_context_4_p_0(Must_5, Subn_6, CallUC0_58, &CallUC_60);
  parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Args0_139, &Args_140);
  {
    MR_Word base;
    base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
    *Expr_8 = base;
    MR_hl_field(2, base, 0) = ((MR_Box) (PredId_55));
    MR_hl_field(2, base, 1) = ((MR_Box) (ProcId_56));
    MR_hl_field(2, base, 2) = ((MR_Box) (Args_140));
    MR_hl_field(2, base, 3) = (MR_Box) ((MR_Unsigned) (Builtin_57));
    MR_hl_field(2, base, 4) = ((MR_Box) (CallUC_60));
    MR_hl_field(2, base, 5) = ((MR_Box) (Sym_59));
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_expr_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8)
{
  MR_Word LHS0_61 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 0))));
  MR_Word RHS0_62 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 1))));
  MR_Word Mode_63 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 2))));
  MR_Word Unify0_64 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 3))));
  MR_Word Context_65 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 4))));
  MR_Word LHS_66;
  MR_Word RHS_67;
  MR_Word Unify_68;

  parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, LHS0_61, &LHS_66);
  hlds__hlds_goal__rename_var_in_unify_rhs_4_p_0(Must_5, Subn_6, RHS0_62, &RHS_67);
  hlds__hlds_goal__rename_var_in_unify_4_p_0(Must_5, Subn_6, Unify0_64, &Unify_68);
  {
    MR_Word base;
    base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
    *Expr_8 = base;
    MR_hl_field(1, base, 0) = ((MR_Box) (LHS_66));
    MR_hl_field(1, base, 1) = ((MR_Box) (RHS_67));
    MR_hl_field(1, base, 2) = ((MR_Box) (Mode_63));
    MR_hl_field(1, base, 3) = ((MR_Box) (Unify_68));
    MR_hl_field(1, base, 4) = ((MR_Box) (Context_65));
  }
}

void MR_CALL 
hlds__hlds_goal__must_rename_vars_in_goal_3_p_0(
  MR_Word Subn_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_9 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalExpr_10;
  MR_Word GoalInfo_11;

  hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4((MR_Integer) 0, Subn_4, GoalExpr0_8, &GoalExpr_10);
  hlds__hlds_goal__rename_vars_in_goal_info_4_p_0((MR_Integer) 0, Subn_4, GoalInfo0_9, &GoalInfo_11);
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_10));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_11));
  }
}

void MR_CALL 
hlds__hlds_goal__rename_some_vars_in_goal_3_p_0(
  MR_Word Subn_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_9 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalExpr_10;
  MR_Word GoalInfo_11;

  hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4((MR_Integer) 1, Subn_4, GoalExpr0_8, &GoalExpr_10);
  hlds__hlds_goal__rename_vars_in_goal_info_4_p_0((MR_Integer) 1, Subn_4, GoalInfo0_9, &GoalInfo_11);
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_10));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_11));
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_var_in_call_unify_context_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word MaybeCallUnifyContext0_7,
  MR_Word * MaybeCallUnifyContext_8)
{
  if ((MaybeCallUnifyContext0_7 == (MR_Word) ((MR_Unsigned) 0U)))
    *MaybeCallUnifyContext_8 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word CallUnifyContext0_9 = ((MR_Word) ((MR_hl_field(1, MaybeCallUnifyContext0_7, 0))));
    MR_Word LHSVar0_10 = ((MR_Word) ((MR_hl_field(0, CallUnifyContext0_9, 0))));
    MR_Word RHS0_11 = ((MR_Word) ((MR_hl_field(0, CallUnifyContext0_9, 1))));
    MR_Word UnifyContext_12 = ((MR_Word) ((MR_hl_field(0, CallUnifyContext0_9, 2))));
    MR_Word LHSVar_13;
    MR_Word RHS_14;
    MR_Word CallUnifyContext_15;

    parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, LHSVar0_10, &LHSVar_13);
    switch (MR_tag((MR_Word) RHS0_11)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
        {
          MR_Word Var0_17 = ((MR_Word) ((MR_hl_field(0, RHS0_11, 0))));
          MR_Word Var_18;

          parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_17, &Var_18);
          {
            RHS_14 = (MR_Word) MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, RHS_14, 0) = ((MR_Box) (Var_18));
          }
        }
        break;
      case (MR_Integer) 1:
        {
          MR_Word Functor_19 = ((MR_Word) ((MR_hl_field(1, RHS0_11, 0))));
          MR_Word E_20 = ((MR_Unsigned) ((MR_hl_field(1, RHS0_11, 1))) & (MR_Integer) 1);
          MR_Word ArgVars0_21 = ((MR_Word) ((MR_hl_field(1, RHS0_11, 2))));
          MR_Word ArgVars_22;

          parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, ArgVars0_21, &ArgVars_22);
          {
            RHS_14 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
            MR_hl_field(1, RHS_14, 0) = ((MR_Box) (Functor_19));
            MR_hl_field(1, RHS_14, 1) = (MR_Box) ((MR_Unsigned) (E_20));
            MR_hl_field(1, RHS_14, 2) = ((MR_Box) (ArgVars_22));
          }
        }
        break;
      case (MR_Integer) 2:
        {
          MR_Word NonLocals0_26 = ((MR_Word) ((MR_hl_field(2, RHS0_11, 1))));
          MR_Word VarsModes0_27 = ((MR_Word) ((MR_hl_field(2, RHS0_11, 2))));
          MR_Word Det_28 = ((MR_Unsigned) ((MR_hl_field(2, RHS0_11, 3))) & (MR_Integer) 7);
          MR_Word Goal0_29 = ((MR_Word) ((MR_hl_field(2, RHS0_11, 4))));
          MR_Word NonLocals_30;
          MR_Word Vars0_31;
          MR_Word Modes_32;
          MR_Word Vars_33;
          MR_Word VarsModes_34;
          MR_Word Goal_35;
          MR_Word GoalExpr0_41;
          MR_Word GoalInfo0_42;
          MR_Word GoalExpr_43;
          MR_Word GoalInfo_44;
          MR_Unsigned packed_word_1 = (MR_Unsigned) ((MR_hl_field(2, RHS0_11, 0)));

          parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, NonLocals0_26, &NonLocals_30);
          mercury__assoc_list__keys_and_values_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0), VarsModes0_27, &Vars0_31, &Modes_32);
          parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_31, &Vars_33);
          mercury__assoc_list__from_corresponding_lists_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0), Vars_33, Modes_32, &VarsModes_34);
          GoalExpr0_41 = ((MR_Word) ((MR_hl_field(0, Goal0_29, 0))));
          GoalInfo0_42 = ((MR_Word) ((MR_hl_field(0, Goal0_29, 1))));
          hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4(Must_5, Subn_6, GoalExpr0_41, &GoalExpr_43);
          hlds__hlds_goal__rename_vars_in_goal_info_4_p_0(Must_5, Subn_6, GoalInfo0_42, &GoalInfo_44);
          {
            Goal_35 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Goal_35, 0) = ((MR_Box) (GoalExpr_43));
            MR_hl_field(0, Goal_35, 1) = ((MR_Box) (GoalInfo_44));
          }
          {
            RHS_14 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
            MR_hl_field(2, RHS_14, 0) = (MR_Box) (packed_word_1);
            MR_hl_field(2, RHS_14, 1) = ((MR_Box) (NonLocals_30));
            MR_hl_field(2, RHS_14, 2) = ((MR_Box) (VarsModes_34));
            MR_hl_field(2, RHS_14, 3) = (MR_Box) ((MR_Unsigned) (Det_28));
            MR_hl_field(2, RHS_14, 4) = ((MR_Box) (Goal_35));
          }
        }
        break;
    }
    {
      CallUnifyContext_15 = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, CallUnifyContext_15, 0) = ((MR_Box) (LHSVar_13));
      MR_hl_field(0, CallUnifyContext_15, 1) = ((MR_Box) (RHS_14));
      MR_hl_field(0, CallUnifyContext_15, 2) = ((MR_Box) (UnifyContext_12));
    }
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
      *MaybeCallUnifyContext_8 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (CallUnifyContext_15));
    }
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_var_in_unify_rhs_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word RHS0_7,
  MR_Word * RHS_8)
{
  switch (MR_tag((MR_Word) RHS0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Var0_9 = ((MR_Word) ((MR_hl_field(0, RHS0_7, 0))));
        MR_Word Var_10;

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_9, &Var_10);
        {
          MR_Word base;
          base = (MR_Word) MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL);
          *RHS_8 = base;
          MR_hl_field(0, base, 0) = ((MR_Box) (Var_10));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word Functor_11 = ((MR_Word) ((MR_hl_field(1, RHS0_7, 0))));
        MR_Word E_12 = ((MR_Unsigned) ((MR_hl_field(1, RHS0_7, 1))) & (MR_Integer) 1);
        MR_Word ArgVars0_13 = ((MR_Word) ((MR_hl_field(1, RHS0_7, 2))));
        MR_Word ArgVars_14;

        parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, ArgVars0_13, &ArgVars_14);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
          *RHS_8 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Functor_11));
          MR_hl_field(1, base, 1) = (MR_Box) ((MR_Unsigned) (E_12));
          MR_hl_field(1, base, 2) = ((MR_Box) (ArgVars_14));
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word NonLocals0_18 = ((MR_Word) ((MR_hl_field(2, RHS0_7, 1))));
        MR_Word VarsModes0_19 = ((MR_Word) ((MR_hl_field(2, RHS0_7, 2))));
        MR_Word Det_20 = ((MR_Unsigned) ((MR_hl_field(2, RHS0_7, 3))) & (MR_Integer) 7);
        MR_Word Goal0_21 = ((MR_Word) ((MR_hl_field(2, RHS0_7, 4))));
        MR_Word NonLocals_22;
        MR_Word Vars0_23;
        MR_Word Modes_24;
        MR_Word Vars_25;
        MR_Word VarsModes_26;
        MR_Word Goal_27;
        MR_Word GoalExpr0_33;
        MR_Word GoalInfo0_34;
        MR_Word GoalExpr_35;
        MR_Word GoalInfo_36;
        MR_Unsigned packed_word_1 = (MR_Unsigned) ((MR_hl_field(2, RHS0_7, 0)));

        parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, NonLocals0_18, &NonLocals_22);
        mercury__assoc_list__keys_and_values_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0), VarsModes0_19, &Vars0_23, &Modes_24);
        parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_23, &Vars_25);
        mercury__assoc_list__from_corresponding_lists_3_p_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_mode_0), Vars_25, Modes_24, &VarsModes_26);
        GoalExpr0_33 = ((MR_Word) ((MR_hl_field(0, Goal0_21, 0))));
        GoalInfo0_34 = ((MR_Word) ((MR_hl_field(0, Goal0_21, 1))));
        hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4(Must_5, Subn_6, GoalExpr0_33, &GoalExpr_35);
        hlds__hlds_goal__rename_vars_in_goal_info_4_p_0(Must_5, Subn_6, GoalInfo0_34, &GoalInfo_36);
        {
          Goal_27 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Goal_27, 0) = ((MR_Box) (GoalExpr_35));
          MR_hl_field(0, Goal_27, 1) = ((MR_Box) (GoalInfo_36));
        }
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          *RHS_8 = base;
          MR_hl_field(2, base, 0) = (MR_Box) (packed_word_1);
          MR_hl_field(2, base, 1) = ((MR_Box) (NonLocals_22));
          MR_hl_field(2, base, 2) = ((MR_Box) (VarsModes_26));
          MR_hl_field(2, base, 3) = (MR_Box) ((MR_Unsigned) (Det_20));
          MR_hl_field(2, base, 4) = ((MR_Box) (Goal_27));
        }
      }
      break;
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_vars_in_cases_4_p_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4)
{
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__4_4 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Case0_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
    MR_Word Cases0_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
    MR_Word Case_11;
    MR_Word Cases_12;
    MR_Word MainConsId_13 = ((MR_Word) ((MR_hl_field(0, Case0_9, 0))));
    MR_Word OtherConsIds_14 = ((MR_Word) ((MR_hl_field(0, Case0_9, 1))));
    MR_Word Goal0_15 = ((MR_Word) ((MR_hl_field(0, Case0_9, 2))));
    MR_Word Goal_16;
    MR_Word GoalExpr0_17 = ((MR_Word) ((MR_hl_field(0, Goal0_15, 0))));
    MR_Word GoalInfo0_18 = ((MR_Word) ((MR_hl_field(0, Goal0_15, 1))));
    MR_Word GoalExpr_19;
    MR_Word GoalInfo_20;

    hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4(HeadVar__1_1, HeadVar__2_2, GoalExpr0_17, &GoalExpr_19);
    hlds__hlds_goal__rename_vars_in_goal_info_4_p_0(HeadVar__1_1, HeadVar__2_2, GoalInfo0_18, &GoalInfo_20);
    {
      Goal_16 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Goal_16, 0) = ((MR_Box) (GoalExpr_19));
      MR_hl_field(0, Goal_16, 1) = ((MR_Box) (GoalInfo_20));
    }
    {
      Case_11 = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Case_11, 0) = ((MR_Box) (MainConsId_13));
      MR_hl_field(0, Case_11, 1) = ((MR_Box) (OtherConsIds_14));
      MR_hl_field(0, Case_11, 2) = ((MR_Box) (Goal_16));
    }
    hlds__hlds_goal__rename_vars_in_cases_4_p_0(HeadVar__1_1, HeadVar__2_2, Cases0_10, &Cases_12);
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *HeadVar__4_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Case_11));
      MR_hl_field(1, base, 1) = ((MR_Box) (Cases_12));
    }
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Goal0_7,
  MR_Word * Goal_8)
{
  MR_Word GoalExpr0_9 = ((MR_Word) ((MR_hl_field(0, Goal0_7, 0))));
  MR_Word GoalInfo0_10 = ((MR_Word) ((MR_hl_field(0, Goal0_7, 1))));
  MR_Word GoalExpr_11;
  MR_Word GoalInfo_12;

  hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4(Must_5, Subn_6, GoalExpr0_9, &GoalExpr_11);
  hlds__hlds_goal__rename_vars_in_goal_info_4_p_0(Must_5, Subn_6, GoalInfo0_10, &GoalInfo_12);
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_8 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_11));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_12));
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Expr0_7,
  MR_Word * Expr_8)
{
  switch (MR_tag((MR_Word) Expr0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Goal0_25 = (MR_Word) ((MR_Word) (Expr0_7));
        MR_Word Goal_26;

        hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, Goal0_25, &Goal_26);
        *Expr_8 = (MR_Word) ((MR_Word) (Goal_26));
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word LHS0_61 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 0))));
        MR_Word RHS0_62 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 1))));
        MR_Word Mode_63 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 2))));
        MR_Word Unify0_64 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 3))));
        MR_Word Context_65 = ((MR_Word) ((MR_hl_field(1, Expr0_7, 4))));
        MR_Word LHS_66;
        MR_Word RHS_67;
        MR_Word Unify_68;

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, LHS0_61, &LHS_66);
        hlds__hlds_goal__rename_var_in_unify_rhs_4_p_0(Must_5, Subn_6, RHS0_62, &RHS_67);
        hlds__hlds_goal__rename_var_in_unify_4_p_0(Must_5, Subn_6, Unify0_64, &Unify_68);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          *Expr_8 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (LHS_66));
          MR_hl_field(1, base, 1) = ((MR_Box) (RHS_67));
          MR_hl_field(1, base, 2) = ((MR_Box) (Mode_63));
          MR_hl_field(1, base, 3) = ((MR_Box) (Unify_68));
          MR_hl_field(1, base, 4) = ((MR_Box) (Context_65));
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word PredId_55 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 0))));
        MR_Integer ProcId_56 = ((MR_Integer) ((MR_hl_field(2, Expr0_7, 1))));
        MR_Word Builtin_57 = ((MR_Unsigned) ((MR_hl_field(2, Expr0_7, 3))) & (MR_Integer) 1);
        MR_Word CallUC0_58 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 4))));
        MR_Word Sym_59 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 5))));
        MR_Word CallUC_60;
        MR_Word Args0_139 = ((MR_Word) ((MR_hl_field(2, Expr0_7, 2))));
        MR_Word Args_140;

        hlds__hlds_goal__rename_var_in_call_unify_context_4_p_0(Must_5, Subn_6, CallUC0_58, &CallUC_60);
        parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Args0_139, &Args_140);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
          *Expr_8 = base;
          MR_hl_field(2, base, 0) = ((MR_Box) (PredId_55));
          MR_hl_field(2, base, 1) = ((MR_Box) (ProcId_56));
          MR_hl_field(2, base, 2) = ((MR_Box) (Args_140));
          MR_hl_field(2, base, 3) = (MR_Box) ((MR_Unsigned) (Builtin_57));
          MR_hl_field(2, base, 4) = ((MR_Box) (CallUC_60));
          MR_hl_field(2, base, 5) = ((MR_Box) (Sym_59));
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, Expr0_7, 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word GenericCall0_48 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Args0_49 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Modes_50 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
            MR_Word MaybeArgRegs_51 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
            MR_Word Det_52 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 5))) & (MR_Integer) 7);
            MR_Word GenericCall_53;
            MR_Word Args_54;

            hlds__hlds_goal__rename_generic_call_4_p_0(Must_5, Subn_6, GenericCall0_48, &GenericCall_53);
            parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Args0_49, &Args_54);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 0U));
              MR_hl_field(3, base, 1) = ((MR_Box) (GenericCall_53));
              MR_hl_field(3, base, 2) = ((MR_Box) (Args_54));
              MR_hl_field(3, base, 3) = ((MR_Box) (Modes_50));
              MR_hl_field(3, base, 4) = ((MR_Box) (MaybeArgRegs_51));
              MR_hl_field(3, base, 5) = (MR_Box) ((MR_Unsigned) (Det_52));
            }
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word Attrs_69 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Extra0_70 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 5))));
            MR_Word MTRC_71 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 6))));
            MR_Word Impl_72 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 7))));
            MR_Word Extra_73;
            MR_Word Args0_141 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
            MR_Word Args_142;
            MR_Word PredId_143 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Integer ProcId_144 = ((MR_Integer) ((MR_hl_field(3, Expr0_7, 3))));

            hlds__hlds_goal__rename_arg_list_4_p_0(Must_5, Subn_6, Args0_141, &Args_142);
            hlds__hlds_goal__rename_arg_list_4_p_0(Must_5, Subn_6, Extra0_70, &Extra_73);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 1U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Attrs_69));
              MR_hl_field(3, base, 2) = ((MR_Box) (PredId_143));
              MR_hl_field(3, base, 3) = ((MR_Box) (ProcId_144));
              MR_hl_field(3, base, 4) = ((MR_Box) (Args_142));
              MR_hl_field(3, base, 5) = ((MR_Box) (Extra_73));
              MR_hl_field(3, base, 6) = ((MR_Box) (MTRC_71));
              MR_hl_field(3, base, 7) = ((MR_Box) (Impl_72));
            }
          }
          break;
        case (MR_Integer) 2:
          {
            MR_Word ConjType_9 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 1))) & (MR_Integer) 1);
            MR_Word Goals0_10 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Goals_11;

            hlds__hlds_goal__rename_vars_in_goals_4_p_0(Must_5, Subn_6, Goals0_10, &Goals_11);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 2U));
              MR_hl_field(3, base, 1) = (MR_Box) ((MR_Unsigned) (ConjType_9));
              MR_hl_field(3, base, 2) = ((MR_Box) (Goals_11));
            }
          }
          break;
        case (MR_Integer) 3:
          {
            MR_Word Goals0_115 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Goals_116;

            hlds__hlds_goal__rename_vars_in_goals_4_p_0(Must_5, Subn_6, Goals0_115, &Goals_116);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 3U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Goals_116));
            }
          }
          break;
        case (MR_Integer) 4:
          {
            MR_Word Var0_12 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word CanFail_13 = ((MR_Unsigned) ((MR_hl_field(3, Expr0_7, 2))) & (MR_Integer) 1);
            MR_Word Cases0_14 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
            MR_Word Var_15;
            MR_Word Cases_16;

            parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_12, &Var_15);
            hlds__hlds_goal__rename_vars_in_cases_4_p_0(Must_5, Subn_6, Cases0_14, &Cases_16);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 4U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Var_15));
              MR_hl_field(3, base, 2) = (MR_Box) ((MR_Unsigned) (CanFail_13));
              MR_hl_field(3, base, 3) = ((MR_Box) (Cases_16));
            }
          }
          break;
        case (MR_Integer) 5:
          {
            MR_Word Reason0_27 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Reason_29;
            MR_Word Goal0_137 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Goal_138;

            switch (MR_tag((MR_Word) Reason0_27)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                {
                  MR_Word Creator_28 = ((MR_Unsigned) ((MR_hl_field(0, Reason0_27, 1))) & (MR_Integer) 1);
                  MR_Word Vars0_117 = ((MR_Word) ((MR_hl_field(0, Reason0_27, 0))));
                  MR_Word Vars_118;

                  parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_117, &Vars_118);
                  {
                    Reason_29 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Reason_29, 0) = ((MR_Box) (Vars_118));
                    MR_hl_field(0, Reason_29, 1) = (MR_Box) ((MR_Unsigned) (Creator_28));
                  }
                }
                break;
              case (MR_Integer) 1:
                Reason_29 = Reason0_27;
                break;
              case (MR_Integer) 2:
                {
                  MR_Word Kind_30 = ((MR_Unsigned) ((MR_hl_field(2, Reason0_27, 1))) & (MR_Integer) 3);
                  MR_Word Vars0_119 = ((MR_Word) ((MR_hl_field(2, Reason0_27, 0))));
                  MR_Word Vars_120;

                  parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_119, &Vars_120);
                  {
                    Reason_29 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(2, Reason_29, 0) = ((MR_Box) (Vars_120));
                    MR_hl_field(2, Reason_29, 1) = (MR_Box) ((MR_Unsigned) (Kind_30));
                  }
                }
                break;
              case (MR_Integer) 3:
                switch (((MR_Integer) ((MR_hl_field(3, Reason0_27, 0))))) {
                  default: /*NOTREACHED*/ MR_assert(0);
                  case (MR_Integer) 0:
                  case (MR_Integer) 1:
                  case (MR_Integer) 4:
                  case (MR_Integer) 5:
                    Reason_29 = Reason0_27;
                    break;
                  case (MR_Integer) 2:
                    {
                      MR_Word Var0_121 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Var_122;

                      parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_121, &Var_122);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 2U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Var_122));
                      }
                    }
                    break;
                  case (MR_Integer) 3:
                    {
                      MR_Word Detism_31 = ((MR_Unsigned) ((MR_hl_field(3, Reason0_27, 2))) & (MR_Integer) 7);
                      MR_Word Var0_123 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Var_124;

                      parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_123, &Var_124);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 3U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Var_124));
                        MR_hl_field(3, Reason_29, 2) = (MR_Box) ((MR_Unsigned) (Detism_31));
                      }
                    }
                    break;
                  case (MR_Integer) 6:
                    {
                      MR_Word Var0_125 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Var_126;
                      MR_Word Kind_127 = ((MR_Unsigned) ((MR_hl_field(3, Reason0_27, 2))) & (MR_Integer) 3);

                      parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_125, &Var_126);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 6U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Var_126));
                        MR_hl_field(3, Reason_29, 2) = (MR_Box) ((MR_Unsigned) (Kind_127));
                      }
                    }
                    break;
                  case (MR_Integer) 7:
                    {
                      MR_Word Flag_32 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word Grade_33 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 2))));
                      MR_Word Env_34 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 3))));
                      MR_Word QuantVars0_35 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 5))));
                      MR_Word QuantVars_36;
                      MR_Word Vars_128 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 4))));

                      parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, QuantVars0_35, &QuantVars_36);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 7U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (Flag_32));
                        MR_hl_field(3, Reason_29, 2) = ((MR_Box) (Grade_33));
                        MR_hl_field(3, Reason_29, 3) = ((MR_Box) (Env_34));
                        MR_hl_field(3, Reason_29, 4) = ((MR_Box) (Vars_128));
                        MR_hl_field(3, Reason_29, 5) = ((MR_Box) (QuantVars_36));
                      }
                    }
                    break;
                  case (MR_Integer) 8:
                    {
                      MR_Word LCVar0_37 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 1))));
                      MR_Word LCSVar0_38 = ((MR_Word) ((MR_hl_field(3, Reason0_27, 2))));
                      MR_Word UseParentStack_39 = ((MR_Unsigned) ((MR_hl_field(3, Reason0_27, 3))) & (MR_Integer) 1);
                      MR_Word LCVar_40;
                      MR_Word LCSVar_41;

                      parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, LCVar0_37, &LCVar_40);
                      parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, LCSVar0_38, &LCSVar_41);
                      {
                        Reason_29 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
                        MR_hl_field(3, Reason_29, 0) = ((MR_Box) ((MR_Unsigned) 8U));
                        MR_hl_field(3, Reason_29, 1) = ((MR_Box) (LCVar_40));
                        MR_hl_field(3, Reason_29, 2) = ((MR_Box) (LCSVar_41));
                        MR_hl_field(3, Reason_29, 3) = (MR_Box) ((MR_Unsigned) (UseParentStack_39));
                      }
                    }
                    break;
                }
                break;
            }
            hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, Goal0_137, &Goal_138);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 5U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Reason_29));
              MR_hl_field(3, base, 2) = ((MR_Box) (Goal_138));
            }
          }
          break;
        case (MR_Integer) 6:
          {
            MR_Word Vars0_17 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Cond0_18 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 2))));
            MR_Word Then0_19 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 3))));
            MR_Word Else0_20 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 4))));
            MR_Word Vars_21;
            MR_Word Cond_22;
            MR_Word Then_23;
            MR_Word Else_24;

            parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_17, &Vars_21);
            hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, Cond0_18, &Cond_22);
            hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, Then0_19, &Then_23);
            hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, Else0_20, &Else_24);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 6U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Vars_21));
              MR_hl_field(3, base, 2) = ((MR_Box) (Cond_22));
              MR_hl_field(3, base, 3) = ((MR_Box) (Then_23));
              MR_hl_field(3, base, 4) = ((MR_Box) (Else_24));
            }
          }
          break;
        case (MR_Integer) 7:
          {
            MR_Word Shorthand0_74 = ((MR_Word) ((MR_hl_field(3, Expr0_7, 1))));
            MR_Word Shorthand_98;

            switch (MR_tag((MR_Word) Shorthand0_74)) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 0:
                {
                  MR_Word LeftGoal0_109 = ((MR_Word) ((MR_hl_field(0, Shorthand0_74, 0))));
                  MR_Word RightGoal0_110 = ((MR_Word) ((MR_hl_field(0, Shorthand0_74, 1))));
                  MR_Word LeftGoal_111;
                  MR_Word RightGoal_112;

                  hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, LeftGoal0_109, &LeftGoal_111);
                  hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, RightGoal0_110, &RightGoal_112);
                  {
                    Shorthand_98 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Shorthand_98, 0) = ((MR_Box) (LeftGoal_111));
                    MR_hl_field(0, Shorthand_98, 1) = ((MR_Box) (RightGoal_112));
                  }
                }
                break;
              case (MR_Integer) 1:
                {
                  MR_Word Outer0_76 = ((MR_Word) ((MR_hl_field(1, Shorthand0_74, 1))));
                  MR_Word Inner0_77 = ((MR_Word) ((MR_hl_field(1, Shorthand0_74, 2))));
                  MR_Word MaybeOutputVars0_78 = ((MR_Word) ((MR_hl_field(1, Shorthand0_74, 3))));
                  MR_Word MainGoal0_79 = ((MR_Word) ((MR_hl_field(1, Shorthand0_74, 4))));
                  MR_Word OrElseGoals0_80 = ((MR_Word) ((MR_hl_field(1, Shorthand0_74, 5))));
                  MR_Word OrElseInners_81 = ((MR_Word) ((MR_hl_field(1, Shorthand0_74, 6))));
                  MR_Word GoalType_82 = ((MR_Unsigned) ((MR_hl_field(1, Shorthand0_74, 0))) & (MR_Integer) 3);
                  MR_Word OuterDI0_83 = ((MR_Word) ((MR_hl_field(0, Outer0_76, 0))));
                  MR_Word OuterUO0_84 = ((MR_Word) ((MR_hl_field(0, Outer0_76, 1))));
                  MR_Word OuterDI_85;
                  MR_Word OuterUO_86;
                  MR_Word Outer_87;
                  MR_Word InnerDI0_88;
                  MR_Word InnerUO0_89;
                  MR_Word InnerDI_90;
                  MR_Word InnerUO_91;
                  MR_Word Inner_92;
                  MR_Word MaybeOutputVars_93;
                  MR_Word MainGoal_96;
                  MR_Word OrElseGoals_97;

                  parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, OuterDI0_83, &OuterDI_85);
                  parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, OuterUO0_84, &OuterUO_86);
                  {
                    Outer_87 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Outer_87, 0) = ((MR_Box) (OuterDI_85));
                    MR_hl_field(0, Outer_87, 1) = ((MR_Box) (OuterUO_86));
                  }
                  InnerDI0_88 = ((MR_Word) ((MR_hl_field(0, Inner0_77, 0))));
                  InnerUO0_89 = ((MR_Word) ((MR_hl_field(0, Inner0_77, 1))));
                  parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, InnerDI0_88, &InnerDI_90);
                  parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, InnerUO0_89, &InnerUO_91);
                  {
                    Inner_92 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                    MR_hl_field(0, Inner_92, 0) = ((MR_Box) (InnerDI_90));
                    MR_hl_field(0, Inner_92, 1) = ((MR_Box) (InnerUO_91));
                  }
                  if ((MaybeOutputVars0_78 == (MR_Word) ((MR_Unsigned) 0U)))
                    MaybeOutputVars_93 = MaybeOutputVars0_78;
                  else
                  {
                    MR_Word OutputVars0_94 = ((MR_Word) ((MR_hl_field(1, MaybeOutputVars0_78, 0))));
                    MR_Word OutputVars_95;

                    parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, OutputVars0_94, &OutputVars_95);
                    {
                      MaybeOutputVars_93 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
                      MR_hl_field(1, MaybeOutputVars_93, 0) = ((MR_Box) (OutputVars_95));
                    }
                  }
                  hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, MainGoal0_79, &MainGoal_96);
                  hlds__hlds_goal__rename_vars_in_goals_4_p_0(Must_5, Subn_6, OrElseGoals0_80, &OrElseGoals_97);
                  {
                    Shorthand_98 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(1, Shorthand_98, 0) = (MR_Box) ((MR_Unsigned) (GoalType_82));
                    MR_hl_field(1, Shorthand_98, 1) = ((MR_Box) (Outer_87));
                    MR_hl_field(1, Shorthand_98, 2) = ((MR_Box) (Inner_92));
                    MR_hl_field(1, Shorthand_98, 3) = ((MR_Box) (MaybeOutputVars_93));
                    MR_hl_field(1, Shorthand_98, 4) = ((MR_Box) (MainGoal_96));
                    MR_hl_field(1, Shorthand_98, 5) = ((MR_Box) (OrElseGoals_97));
                    MR_hl_field(1, Shorthand_98, 6) = ((MR_Box) (OrElseInners_81));
                  }
                }
                break;
              case (MR_Integer) 2:
                {
                  MR_Word MaybeIO0_99 = ((MR_Word) ((MR_hl_field(2, Shorthand0_74, 0))));
                  MR_Word ResultVar0_100 = ((MR_Word) ((MR_hl_field(2, Shorthand0_74, 1))));
                  MR_Word SubGoal0_101 = ((MR_Word) ((MR_hl_field(2, Shorthand0_74, 2))));
                  MR_Word MaybeIO_106;
                  MR_Word ResultVar_107;
                  MR_Word SubGoal_108;

                  if ((MaybeIO0_99 == (MR_Word) ((MR_Unsigned) 0U)))
                    MaybeIO_106 = (MR_Word) ((MR_Unsigned) 0U);
                  else
                  {
                    MR_Word IOVarInitial0_102;
                    MR_Word IOVarFinal0_103;
                    MR_Word IOVarInitial_104;
                    MR_Word IOVarFinal_105;
                    MR_Word Var_113 = ((MR_Word) ((MR_hl_field(1, MaybeIO0_99, 0))));
                    MR_Word Var_114;

                    IOVarInitial0_102 = ((MR_Word) ((MR_hl_field(0, Var_113, 0))));
                    IOVarFinal0_103 = ((MR_Word) ((MR_hl_field(0, Var_113, 1))));
                    parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, IOVarInitial0_102, &IOVarInitial_104);
                    parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, IOVarFinal0_103, &IOVarFinal_105);
                    {
                      Var_114 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
                      MR_hl_field(0, Var_114, 0) = ((MR_Box) (IOVarInitial_104));
                      MR_hl_field(0, Var_114, 1) = ((MR_Box) (IOVarFinal_105));
                    }
                    {
                      MaybeIO_106 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
                      MR_hl_field(1, MaybeIO_106, 0) = ((MR_Box) (Var_114));
                    }
                  }
                  parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, ResultVar0_100, &ResultVar_107);
                  hlds__hlds_goal__rename_vars_in_goal_4_p_0(Must_5, Subn_6, SubGoal0_101, &SubGoal_108);
                  {
                    Shorthand_98 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
                    MR_hl_field(2, Shorthand_98, 0) = ((MR_Box) (MaybeIO_106));
                    MR_hl_field(2, Shorthand_98, 1) = ((MR_Box) (ResultVar_107));
                    MR_hl_field(2, Shorthand_98, 2) = ((MR_Box) (SubGoal_108));
                  }
                }
                break;
            }
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              *Expr_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 7U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Shorthand_98));
            }
          }
          break;
      }
      break;
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goals_4_p_0(
  MR_Word Must_1,
  MR_Word Subn_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4)
{
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__4_4 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Goal0_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
    MR_Word Goals0_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
    MR_Word Goal_11;
    MR_Word Goals_12;
    MR_Word GoalExpr0_13 = ((MR_Word) ((MR_hl_field(0, Goal0_9, 0))));
    MR_Word GoalInfo0_14 = ((MR_Word) ((MR_hl_field(0, Goal0_9, 1))));
    MR_Word GoalExpr_15;
    MR_Word GoalInfo_16;

    hlds__hlds_goal__rename_vars_in_goal_expr_4_p_4(Must_1, Subn_2, GoalExpr0_13, &GoalExpr_15);
    hlds__hlds_goal__rename_vars_in_goal_info_4_p_0(Must_1, Subn_2, GoalInfo0_14, &GoalInfo_16);
    {
      Goal_11 = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Goal_11, 0) = ((MR_Box) (GoalExpr_15));
      MR_hl_field(0, Goal_11, 1) = ((MR_Box) (GoalInfo_16));
    }
    hlds__hlds_goal__rename_vars_in_goals_4_p_0(Must_1, Subn_2, Goals0_10, &Goals_12);
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *HeadVar__4_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Goal_11));
      MR_hl_field(1, base, 1) = ((MR_Box) (Goals_12));
    }
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_generic_call_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Call0_7,
  MR_Word * Call_8)
{
  switch (MR_tag((MR_Word) Call0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Var0_9 = ((MR_Word) ((MR_hl_field(0, Call0_7, 0))));
        MR_Word Arity_12 = ((MR_Word) ((MR_hl_field(0, Call0_7, 2))));
        MR_Word Syntax_13 = ((MR_Unsigned) ((MR_hl_field(0, Call0_7, 3))) & (MR_Integer) 1);
        MR_Word Var_14;
        MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, Call0_7, 1)));

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_9, &Var_14);
        {
          MR_Word base;
          base = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
          *Call_8 = base;
          MR_hl_field(0, base, 0) = ((MR_Box) (Var_14));
          MR_hl_field(0, base, 1) = (MR_Box) (packed_word_0);
          MR_hl_field(0, base, 2) = ((MR_Box) (Arity_12));
          MR_hl_field(0, base, 3) = (MR_Box) ((MR_Unsigned) (Syntax_13));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word Method_15 = ((MR_Word) ((MR_hl_field(1, Call0_7, 1))));
        MR_Word ClassId_16 = ((MR_Word) ((MR_hl_field(1, Call0_7, 2))));
        MR_Word MethodId_17 = ((MR_Word) ((MR_hl_field(1, Call0_7, 3))));
        MR_Word Var0_20 = ((MR_Word) ((MR_hl_field(1, Call0_7, 0))));
        MR_Word Var_21;

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_20, &Var_21);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
          *Call_8 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Var_21));
          MR_hl_field(1, base, 1) = ((MR_Box) (Method_15));
          MR_hl_field(1, base, 2) = ((MR_Box) (ClassId_16));
          MR_hl_field(1, base, 3) = ((MR_Box) (MethodId_17));
        }
      }
      break;
    case (MR_Integer) 2:
    case (MR_Integer) 3:
      *Call_8 = Call0_7;
      break;
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_var_in_unify_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word Unify0_7,
  MR_Word * Unify_8)
{
  switch (MR_tag((MR_Word) Unify0_7)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word Var0_9 = ((MR_Word) ((MR_hl_field(0, Unify0_7, 0))));
        MR_Word ConsId_10 = ((MR_Word) ((MR_hl_field(0, Unify0_7, 1))));
        MR_Word Vars0_11 = ((MR_Word) ((MR_hl_field(0, Unify0_7, 2))));
        MR_Word Modes_12 = ((MR_Word) ((MR_hl_field(0, Unify0_7, 3))));
        MR_Word How0_13 = ((MR_Word) ((MR_hl_field(0, Unify0_7, 4))));
        MR_Word Uniq_14 = ((MR_Unsigned) ((MR_hl_field(0, Unify0_7, 5))) & (MR_Integer) 1);
        MR_Word SubInfo0_15 = ((MR_Word) ((MR_hl_field(0, Unify0_7, 6))));
        MR_Word Var_16;
        MR_Word Vars_17;
        MR_Word How_18;
        MR_Word SubInfo_34;

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_9, &Var_16);
        parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_11, &Vars_17);
        switch (MR_tag((MR_Word) How0_13)) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 0:
            How_18 = How0_13;
            break;
          case (MR_Integer) 1:
            {
              MR_Word ReuseVar0_20;
              MR_Word B_21;
              MR_Word C_22;
              MR_Word ReuseVar_23;
              MR_Word Var_43 = (MR_Word) (MR_body((MR_Word) (How0_13), (MR_Integer) 1));
              MR_Word Var_44;

              ReuseVar0_20 = ((MR_Word) ((MR_hl_field(0, Var_43, 0))));
              B_21 = ((MR_Word) ((MR_hl_field(0, Var_43, 1))));
              C_22 = ((MR_Word) ((MR_hl_field(0, Var_43, 2))));
              parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, ReuseVar0_20, &ReuseVar_23);
              {
                Var_44 = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_44, 0) = ((MR_Box) (ReuseVar_23));
                MR_hl_field(0, Var_44, 1) = ((MR_Box) (B_21));
                MR_hl_field(0, Var_44, 2) = ((MR_Box) (C_22));
              }
              How_18 = (MR_Word) (MR_mkword(1, (MR_Word) (Var_44)));
            }
            break;
          case (MR_Integer) 2:
            How_18 = How0_13;
            break;
          case (MR_Integer) 3:
            {
              MR_Word RegVar0_24 = ((MR_Word) ((MR_hl_field(3, How0_13, 0))));
              MR_Word RegVar_25;

              parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, RegVar0_24, &RegVar_25);
              {
                How_18 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(3, How_18, 0) = ((MR_Box) (RegVar_25));
              }
            }
            break;
        }
        if ((SubInfo0_15 == (MR_Word) ((MR_Unsigned) 0U)))
          SubInfo_34 = (MR_Word) ((MR_Unsigned) 0U);
        else
        {
          MR_Word MTA_26 = ((MR_Word) ((MR_hl_field(1, SubInfo0_15, 0))));
          MR_Word MaybeSize0_27 = ((MR_Word) ((MR_hl_field(1, SubInfo0_15, 1))));
          MR_Word MaybeSize_28;

          if ((MaybeSize0_27 == (MR_Word) ((MR_Unsigned) 0U)))
            MaybeSize_28 = (MR_Word) ((MR_Unsigned) 0U);
          else
          {
            MR_Word Size0_29 = ((MR_Word) ((MR_hl_field(1, MaybeSize0_27, 0))));
            MR_Word Size_31;

            if (((MR_tag((MR_Word) Size0_29)) == (MR_Integer) 1))
            {
              MR_Word SizeVar0_32 = ((MR_Word) ((MR_hl_field(1, Size0_29, 0))));
              MR_Word SizeVar_33;

              parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, SizeVar0_32, &SizeVar_33);
              {
                Size_31 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Size_31, 0) = ((MR_Box) (SizeVar_33));
              }
            }
            else
              Size_31 = Size0_29;
            {
              MaybeSize_28 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, MaybeSize_28, 0) = ((MR_Box) (Size_31));
            }
          }
          {
            SubInfo_34 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
            MR_hl_field(1, SubInfo_34, 0) = ((MR_Box) (MTA_26));
            MR_hl_field(1, SubInfo_34, 1) = ((MR_Box) (MaybeSize_28));
          }
        }
        {
          MR_Word base;
          base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
          *Unify_8 = base;
          MR_hl_field(0, base, 0) = ((MR_Box) (Var_16));
          MR_hl_field(0, base, 1) = ((MR_Box) (ConsId_10));
          MR_hl_field(0, base, 2) = ((MR_Box) (Vars_17));
          MR_hl_field(0, base, 3) = ((MR_Box) (Modes_12));
          MR_hl_field(0, base, 4) = ((MR_Box) (How_18));
          MR_hl_field(0, base, 5) = (MR_Box) ((MR_Unsigned) (Uniq_14));
          MR_hl_field(0, base, 6) = ((MR_Box) (SubInfo_34));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word Var0_45 = ((MR_Word) ((MR_hl_field(1, Unify0_7, 0))));
        MR_Word ConsId_46 = ((MR_Word) ((MR_hl_field(1, Unify0_7, 1))));
        MR_Word Vars0_47 = ((MR_Word) ((MR_hl_field(1, Unify0_7, 2))));
        MR_Word Modes_48 = ((MR_Word) ((MR_hl_field(1, Unify0_7, 3))));
        MR_Word Var_49;
        MR_Word Vars_50;
        MR_Unsigned packed_word_2 = (MR_Unsigned) ((MR_hl_field(1, Unify0_7, 4)));

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Var0_45, &Var_49);
        parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Vars0_47, &Vars_50);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL));
          *Unify_8 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (Var_49));
          MR_hl_field(1, base, 1) = ((MR_Box) (ConsId_46));
          MR_hl_field(1, base, 2) = ((MR_Box) (Vars_50));
          MR_hl_field(1, base, 3) = ((MR_Box) (Modes_48));
          MR_hl_field(1, base, 4) = (MR_Box) (packed_word_2);
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word L0_37 = ((MR_Word) ((MR_hl_field(2, Unify0_7, 0))));
        MR_Word R0_38 = ((MR_Word) ((MR_hl_field(2, Unify0_7, 1))));
        MR_Word L_39;
        MR_Word R_40;

        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, L0_37, &L_39);
        parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, R0_38, &R_40);
        {
          MR_Word base;
          base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          *Unify_8 = base;
          MR_hl_field(2, base, 0) = ((MR_Box) (L_39));
          MR_hl_field(2, base, 1) = ((MR_Box) (R_40));
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, Unify0_7, 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word L0_51 = ((MR_Word) ((MR_hl_field(3, Unify0_7, 1))));
            MR_Word R0_52 = ((MR_Word) ((MR_hl_field(3, Unify0_7, 2))));
            MR_Word L_53;
            MR_Word R_54;

            parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, L0_51, &L_53);
            parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, R0_52, &R_54);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL));
              *Unify_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 0U));
              MR_hl_field(3, base, 1) = ((MR_Box) (L_53));
              MR_hl_field(3, base, 2) = ((MR_Box) (R_54));
            }
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word TypeInfoVars0_41 = ((MR_Word) ((MR_hl_field(3, Unify0_7, 3))));
            MR_Word TypeInfoVars_42;
            MR_Word Modes_55 = ((MR_Word) ((MR_hl_field(3, Unify0_7, 1))));
            MR_Word Cat_56 = ((MR_Unsigned) ((MR_hl_field(3, Unify0_7, 2))) & (MR_Integer) 1);

            parse_tree__prog_rename__rename_var_list_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, TypeInfoVars0_41, &TypeInfoVars_42);
            {
              MR_Word base;
              base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
              *Unify_8 = base;
              MR_hl_field(3, base, 0) = ((MR_Box) ((MR_Unsigned) 1U));
              MR_hl_field(3, base, 1) = ((MR_Box) (Modes_55));
              MR_hl_field(3, base, 2) = (MR_Box) ((MR_Unsigned) (Cat_56));
              MR_hl_field(3, base, 3) = ((MR_Box) (TypeInfoVars_42));
            }
          }
          break;
      }
      break;
  }
}

static void MR_CALL 
hlds__hlds_goal__rename_arg_list_4_p_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2,
  MR_Word HeadVar__3_3,
  MR_Word * HeadVar__4_4)
{
  if ((HeadVar__3_3 == (MR_Word) ((MR_Unsigned) 0U)))
    *HeadVar__4_4 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word Arg0_9 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 0))));
    MR_Word Args0_10 = ((MR_Word) ((MR_hl_field(1, HeadVar__3_3, 1))));
    MR_Word Arg_11;
    MR_Word Args_12;
    MR_Word Var0_13 = ((MR_Word) ((MR_hl_field(0, Arg0_9, 0))));
    MR_Word B_14 = ((MR_Word) ((MR_hl_field(0, Arg0_9, 1))));
    MR_Word C_15 = ((MR_Word) ((MR_hl_field(0, Arg0_9, 2))));
    MR_Word D_16 = ((MR_Unsigned) ((MR_hl_field(0, Arg0_9, 3))) & (MR_Integer) 1);
    MR_Word Var_17;

    parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), HeadVar__1_1, HeadVar__2_2, Var0_13, &Var_17);
    {
      Arg_11 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Arg_11, 0) = ((MR_Box) (Var_17));
      MR_hl_field(0, Arg_11, 1) = ((MR_Box) (B_14));
      MR_hl_field(0, Arg_11, 2) = ((MR_Box) (C_15));
      MR_hl_field(0, Arg_11, 3) = (MR_Box) ((MR_Unsigned) (D_16));
    }
    hlds__hlds_goal__rename_arg_list_4_p_0(HeadVar__1_1, HeadVar__2_2, Args0_10, &Args_12);
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *HeadVar__4_4 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Arg_11));
      MR_hl_field(1, base, 1) = ((MR_Box) (Args_12));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__rename_vars_in_goal_info_4_p_0(
  MR_Word Must_5,
  MR_Word Subn_6,
  MR_Word STATE_VARIABLE_GoalInfo_0_70,
  MR_Word * STATE_VARIABLE_GoalInfo_71)
{
  MR_Word InstMapDelta0_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 1))));
  MR_Word NonLocals0_11 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 2))));
  MR_Word Features_12 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 3))));
  MR_Word GoalPath_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 4))));
  MR_Word CodeGenInfo0_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 5))));
  MR_Word ExtraInfo0_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 6))));
  MR_Word NonLocals_16;
  MR_Word InstMapDelta_17;
  MR_Word CodeGenInfo_18;
  MR_Word Context_21;
  MR_Word RevGoalPath_22;
  MR_Word HO_Values_23;
  MR_Word GoalMode0_24;
  MR_Word MaybeCTGC0_25;
  MR_Word MaybeRBMM0_26;
  MR_Word MaybeMCI0_27;
  MR_Word GoalMode_29;
  MR_Word MaybeCTGC_30;
  MR_Word MaybeRBMM_42;
  MR_Word MaybeMCI_55;
  MR_Word MaybeDPInfo_68;
  MR_Word ExtraInfo_69;
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_70, 0)));

  parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, NonLocals0_11, &NonLocals_16);
  hlds__instmap__instmap_delta_apply_sub_4_p_0(Must_5, Subn_6, InstMapDelta0_10, &InstMapDelta_17);
  if ((CodeGenInfo0_14 == (MR_Word) ((MR_Unsigned) 0U)))
    CodeGenInfo_18 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word LldsInfo0_19 = ((MR_Word) ((MR_hl_field(1, CodeGenInfo0_14, 0))));
    MR_Word LldsInfo_20;

    hlds__hlds_llds__rename_vars_in_llds_code_gen_info_4_p_0(Must_5, Subn_6, LldsInfo0_19, &LldsInfo_20);
    {
      CodeGenInfo_18 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, CodeGenInfo_18, 0) = ((MR_Box) (LldsInfo_20));
    }
  }
  Context_21 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 0))));
  RevGoalPath_22 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 1))));
  HO_Values_23 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 2))));
  GoalMode0_24 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 3))));
  MaybeCTGC0_25 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 4))));
  MaybeRBMM0_26 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 5))));
  MaybeMCI0_27 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 6))));
  MaybeDPInfo_68 = ((MR_Word) ((MR_hl_field(0, ExtraInfo0_15, 7))));
  hlds__goal_mode__rename_vars_in_goal_mode_4_p_0(Must_5, Subn_6, GoalMode0_24, &GoalMode_29);
  if ((MaybeCTGC0_25 == (MR_Word) ((MR_Unsigned) 0U)))
    MaybeCTGC_30 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word CTGC0_31 = ((MR_Word) ((MR_hl_field(1, MaybeCTGC0_25, 0))));
    MR_Word ForwardUse0_32 = ((MR_Word) ((MR_hl_field(0, CTGC0_31, 0))));
    MR_Word BackwardUse0_33 = ((MR_Word) ((MR_hl_field(0, CTGC0_31, 1))));
    MR_Word ReuseDesc0_34 = ((MR_Word) ((MR_hl_field(0, CTGC0_31, 2))));
    MR_Word ForwardUse_35;
    MR_Word BackwardUse_36;
    MR_Word ReuseDesc_38;
    MR_Word CTGC_41;

    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, ForwardUse0_32, &ForwardUse_35);
    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, BackwardUse0_33, &BackwardUse_36);
    switch (MR_tag((MR_Word) ReuseDesc0_34)) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 0:
      case (MR_Integer) 1:
        ReuseDesc_38 = ReuseDesc0_34;
        break;
      case (MR_Integer) 2:
        {
          MR_Word ShortReuseDesc0_39 = ((MR_Word) ((MR_hl_field(2, ReuseDesc0_34, 0))));
          MR_Word ShortReuseDesc_40;

          switch (MR_tag((MR_Word) ShortReuseDesc0_39)) {
            default: /*NOTREACHED*/ MR_assert(0);
            case (MR_Integer) 0:
            case (MR_Integer) 2:
              ShortReuseDesc_40 = ShortReuseDesc0_39;
              break;
            case (MR_Integer) 1:
              {
                MR_Word DeadVar0_78 = ((MR_Word) ((MR_hl_field(1, ShortReuseDesc0_39, 0))));
                MR_Word IsCond_79 = ((MR_Unsigned) ((MR_hl_field(1, ShortReuseDesc0_39, 1))) & (MR_Integer) 1);
                MR_Word ConsIds_80 = ((MR_Word) ((MR_hl_field(1, ShortReuseDesc0_39, 2))));
                MR_Word FieldNeedUpdates_81 = ((MR_Word) ((MR_hl_field(1, ShortReuseDesc0_39, 3))));
                MR_Word DeadVar_82;

                parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, DeadVar0_78, &DeadVar_82);
                {
                  ShortReuseDesc_40 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
                  MR_hl_field(1, ShortReuseDesc_40, 0) = ((MR_Box) (DeadVar_82));
                  MR_hl_field(1, ShortReuseDesc_40, 1) = (MR_Box) ((MR_Unsigned) (IsCond_79));
                  MR_hl_field(1, ShortReuseDesc_40, 2) = ((MR_Box) (ConsIds_80));
                  MR_hl_field(1, ShortReuseDesc_40, 3) = ((MR_Box) (FieldNeedUpdates_81));
                }
              }
              break;
          }
          {
            ReuseDesc_38 = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
            MR_hl_field(2, ReuseDesc_38, 0) = ((MR_Box) (ShortReuseDesc_40));
          }
        }
        break;
      case (MR_Integer) 3:
        {
          MR_Word ShortReuseDesc0_73 = ((MR_Word) ((MR_hl_field(3, ReuseDesc0_34, 0))));
          MR_Word ShortReuseDesc_74;

          switch (MR_tag((MR_Word) ShortReuseDesc0_73)) {
            default: /*NOTREACHED*/ MR_assert(0);
            case (MR_Integer) 0:
            case (MR_Integer) 2:
              ShortReuseDesc_74 = ShortReuseDesc0_73;
              break;
            case (MR_Integer) 1:
              {
                MR_Word DeadVar0_86 = ((MR_Word) ((MR_hl_field(1, ShortReuseDesc0_73, 0))));
                MR_Word IsCond_87 = ((MR_Unsigned) ((MR_hl_field(1, ShortReuseDesc0_73, 1))) & (MR_Integer) 1);
                MR_Word ConsIds_88 = ((MR_Word) ((MR_hl_field(1, ShortReuseDesc0_73, 2))));
                MR_Word FieldNeedUpdates_89 = ((MR_Word) ((MR_hl_field(1, ShortReuseDesc0_73, 3))));
                MR_Word DeadVar_90;

                parse_tree__prog_rename__rename_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, DeadVar0_86, &DeadVar_90);
                {
                  ShortReuseDesc_74 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL));
                  MR_hl_field(1, ShortReuseDesc_74, 0) = ((MR_Box) (DeadVar_90));
                  MR_hl_field(1, ShortReuseDesc_74, 1) = (MR_Box) ((MR_Unsigned) (IsCond_87));
                  MR_hl_field(1, ShortReuseDesc_74, 2) = ((MR_Box) (ConsIds_88));
                  MR_hl_field(1, ShortReuseDesc_74, 3) = ((MR_Box) (FieldNeedUpdates_89));
                }
              }
              break;
          }
          {
            ReuseDesc_38 = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
            MR_hl_field(3, ReuseDesc_38, 0) = ((MR_Box) (ShortReuseDesc_74));
          }
        }
        break;
    }
    {
      CTGC_41 = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, CTGC_41, 0) = ((MR_Box) (ForwardUse_35));
      MR_hl_field(0, CTGC_41, 1) = ((MR_Box) (BackwardUse_36));
      MR_hl_field(0, CTGC_41, 2) = ((MR_Box) (ReuseDesc_38));
    }
    {
      MaybeCTGC_30 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, MaybeCTGC_30, 0) = ((MR_Box) (CTGC_41));
    }
  }
  if ((MaybeRBMM0_26 == (MR_Word) ((MR_Unsigned) 0U)))
    MaybeRBMM_42 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word RBMM0_43 = ((MR_Word) ((MR_hl_field(1, MaybeRBMM0_26, 0))));
    MR_Word Created0_44 = ((MR_Word) ((MR_hl_field(0, RBMM0_43, 0))));
    MR_Word Removed0_45 = ((MR_Word) ((MR_hl_field(0, RBMM0_43, 1))));
    MR_Word Carried0_46 = ((MR_Word) ((MR_hl_field(0, RBMM0_43, 2))));
    MR_Word Alloc0_47 = ((MR_Word) ((MR_hl_field(0, RBMM0_43, 3))));
    MR_Word NonAlloc0_48 = ((MR_Word) ((MR_hl_field(0, RBMM0_43, 4))));
    MR_Word Created_49;
    MR_Word Removed_50;
    MR_Word Carried_51;
    MR_Word Alloc_52;
    MR_Word NonAlloc_53;
    MR_Word RBMM_54;

    parse_tree__prog_rename__rename_vars_in_var_set_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Created0_44, &Created_49);
    parse_tree__prog_rename__rename_vars_in_var_set_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Removed0_45, &Removed_50);
    parse_tree__prog_rename__rename_vars_in_var_set_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Carried0_46, &Carried_51);
    parse_tree__prog_rename__rename_vars_in_var_set_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Alloc0_47, &Alloc_52);
    parse_tree__prog_rename__rename_vars_in_var_set_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, NonAlloc0_48, &NonAlloc_53);
    {
      RBMM_54 = (MR_Word) MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, RBMM_54, 0) = ((MR_Box) (Created_49));
      MR_hl_field(0, RBMM_54, 1) = ((MR_Box) (Removed_50));
      MR_hl_field(0, RBMM_54, 2) = ((MR_Box) (Carried_51));
      MR_hl_field(0, RBMM_54, 3) = ((MR_Box) (Alloc_52));
      MR_hl_field(0, RBMM_54, 4) = ((MR_Box) (NonAlloc_53));
    }
    {
      MaybeRBMM_42 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, MaybeRBMM_42, 0) = ((MR_Box) (RBMM_54));
    }
  }
  if ((MaybeMCI0_27 == (MR_Word) ((MR_Unsigned) 0U)))
    MaybeMCI_55 = (MR_Word) ((MR_Unsigned) 0U);
  else
  {
    MR_Word MCI0_56 = ((MR_Word) ((MR_hl_field(1, MaybeMCI0_27, 0))));
    MR_Word Occurring0_57 = ((MR_Word) ((MR_hl_field(0, MCI0_56, 0))));
    MR_Word Producing0_58 = ((MR_Word) ((MR_hl_field(0, MCI0_56, 1))));
    MR_Word Consuming0_59 = ((MR_Word) ((MR_hl_field(0, MCI0_56, 2))));
    MR_Word MakeVisible0_60 = ((MR_Word) ((MR_hl_field(0, MCI0_56, 3))));
    MR_Word NeedVisible0_61 = ((MR_Word) ((MR_hl_field(0, MCI0_56, 4))));
    MR_Word Occurring_62;
    MR_Word Producing_63;
    MR_Word Consuming_64;
    MR_Word MakeVisible_65;
    MR_Word NeedVisible_66;
    MR_Word MCI_67;

    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Occurring0_57, &Occurring_62);
    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Producing0_58, &Producing_63);
    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, Consuming0_59, &Consuming_64);
    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, MakeVisible0_60, &MakeVisible_65);
    parse_tree__prog_rename__rename_vars_in_set_of_var_4_p_2((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0), Must_5, Subn_6, NeedVisible0_61, &NeedVisible_66);
    {
      MCI_67 = (MR_Word) MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, MCI_67, 0) = ((MR_Box) (Occurring_62));
      MR_hl_field(0, MCI_67, 1) = ((MR_Box) (Producing_63));
      MR_hl_field(0, MCI_67, 2) = ((MR_Box) (Consuming_64));
      MR_hl_field(0, MCI_67, 3) = ((MR_Box) (MakeVisible_65));
      MR_hl_field(0, MCI_67, 4) = ((MR_Box) (NeedVisible_66));
    }
    {
      MaybeMCI_55 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
      MR_hl_field(1, MaybeMCI_55, 0) = ((MR_Box) (MCI_67));
    }
  }
  {
    ExtraInfo_69 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, ExtraInfo_69, 0) = ((MR_Box) (Context_21));
    MR_hl_field(0, ExtraInfo_69, 1) = ((MR_Box) (RevGoalPath_22));
    MR_hl_field(0, ExtraInfo_69, 2) = ((MR_Box) (HO_Values_23));
    MR_hl_field(0, ExtraInfo_69, 3) = ((MR_Box) (GoalMode_29));
    MR_hl_field(0, ExtraInfo_69, 4) = ((MR_Box) (MaybeCTGC_30));
    MR_hl_field(0, ExtraInfo_69, 5) = ((MR_Box) (MaybeRBMM_42));
    MR_hl_field(0, ExtraInfo_69, 6) = ((MR_Box) (MaybeMCI_55));
    MR_hl_field(0, ExtraInfo_69, 7) = ((MR_Box) (MaybeDPInfo_68));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_71 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (InstMapDelta_17));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_16));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_12));
    MR_hl_field(0, base, 4) = ((MR_Box) (GoalPath_13));
    MR_hl_field(0, base, 5) = ((MR_Box) (CodeGenInfo_18));
    MR_hl_field(0, base, 6) = ((MR_Box) (ExtraInfo_69));
  }
}

MR_bool MR_CALL 
hlds__hlds_goal__goal_has_feature_2_p_0(
  MR_Word HeadVar__1_1,
  MR_Word Feature_5)
{
  MR_bool succeeded;
  MR_Word GoalInfo_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));
  MR_Word Features_6 = ((MR_Word) ((MR_hl_field(0, GoalInfo_4, 3))));

  succeeded = mercury__set__member_2_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) (Feature_5)), Features_6);
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal__goal_remove_feature_3_p_0(
  MR_Word OldFeature_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;

  hlds__hlds_goal__goal_info_remove_feature_3_p_0(OldFeature_4, GoalInfo0_8, &GoalInfo_9);
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_add_features_3_p_0(
  MR_Word NewFeatures_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;
  MR_Word Features0_10 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
  MR_Word Features_11;
  MR_Word Var_22;
  MR_Word Var_23;
  MR_Word Var_25;
  MR_Word Var_26;
  MR_Word Var_27;
  MR_Unsigned packed_word_0;

  mercury__set__insert_list_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), NewFeatures_4, Features0_10, &Features_11);
  packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0)));
  Var_22 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
  Var_23 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
  Var_25 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 4))));
  Var_26 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
  Var_27 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));
  {
    GoalInfo_9 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_9, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_9, 1) = ((MR_Box) (Var_22));
    MR_hl_field(0, GoalInfo_9, 2) = ((MR_Box) (Var_23));
    MR_hl_field(0, GoalInfo_9, 3) = ((MR_Box) (Features_11));
    MR_hl_field(0, GoalInfo_9, 4) = ((MR_Box) (Var_25));
    MR_hl_field(0, GoalInfo_9, 5) = ((MR_Box) (Var_26));
    MR_hl_field(0, GoalInfo_9, 6) = ((MR_Box) (Var_27));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_add_feature_3_p_0(
  MR_Word NewFeature_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;
  MR_Word Features0_10 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
  MR_Word Features_11;
  MR_Word Var_22;
  MR_Word Var_23;
  MR_Word Var_25;
  MR_Word Var_26;
  MR_Word Var_27;
  MR_Unsigned packed_word_0;

  mercury__set__insert_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) (NewFeature_4)), Features0_10, &Features_11);
  packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0)));
  Var_22 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
  Var_23 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
  Var_25 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 4))));
  Var_26 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
  Var_27 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));
  {
    GoalInfo_9 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_9, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_9, 1) = ((MR_Box) (Var_22));
    MR_hl_field(0, GoalInfo_9, 2) = ((MR_Box) (Var_23));
    MR_hl_field(0, GoalInfo_9, 3) = ((MR_Box) (Features_11));
    MR_hl_field(0, GoalInfo_9, 4) = ((MR_Box) (Var_25));
    MR_hl_field(0, GoalInfo_9, 5) = ((MR_Box) (Var_26));
    MR_hl_field(0, GoalInfo_9, 6) = ((MR_Box) (Var_27));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

MR_bool MR_CALL 
hlds__hlds_goal__goal_info_has_feature_2_p_0(
  MR_Word GoalInfo_3,
  MR_Word Feature_4)
{
  MR_bool succeeded;
  MR_Word Features_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 3))));

  succeeded = mercury__set__member_2_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) (Feature_4)), Features_5);
  return succeeded;
}

void MR_CALL 
hlds__hlds_goal__goal_info_remove_feature_3_p_0(
  MR_Word OldFeature_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_8,
  MR_Word * STATE_VARIABLE_GoalInfo_9)
{
  MR_bool succeeded;
  MR_Word Features0_6 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 3))));
  MR_Word Features_7;

  succeeded = mercury__set__remove_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) (OldFeature_4)), Features0_6, &Features_7);
  if (succeeded)
  {
    MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 1))));
    MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 2))));
    MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 4))));
    MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 5))));
    MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 6))));
    MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 0)));

    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
      *STATE_VARIABLE_GoalInfo_9 = base;
      MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
      MR_hl_field(0, base, 1) = ((MR_Box) (Var_20));
      MR_hl_field(0, base, 2) = ((MR_Box) (Var_21));
      MR_hl_field(0, base, 3) = ((MR_Box) (Features_7));
      MR_hl_field(0, base, 4) = ((MR_Box) (Var_23));
      MR_hl_field(0, base, 5) = ((MR_Box) (Var_24));
      MR_hl_field(0, base, 6) = ((MR_Box) (Var_25));
    }
  }
  else
    *STATE_VARIABLE_GoalInfo_9 = STATE_VARIABLE_GoalInfo_0_8;
}

void MR_CALL 
hlds__hlds_goal__goal_info_add_features_3_p_0(
  MR_Word NewFeatures_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_8,
  MR_Word * STATE_VARIABLE_GoalInfo_9)
{
  MR_Word Features0_6 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 3))));
  MR_Word Features_7;
  MR_Word Var_20;
  MR_Word Var_21;
  MR_Word Var_23;
  MR_Word Var_24;
  MR_Word Var_25;
  MR_Unsigned packed_word_0;

  mercury__set__insert_list_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), NewFeatures_4, Features0_6, &Features_7);
  packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 0)));
  Var_20 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 1))));
  Var_21 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 2))));
  Var_23 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 4))));
  Var_24 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 5))));
  Var_25 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 6))));
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_9 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_20));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_21));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_7));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_23));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_24));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_25));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_add_feature_3_p_0(
  MR_Word NewFeature_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_8,
  MR_Word * STATE_VARIABLE_GoalInfo_9)
{
  MR_Word Features0_6 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 3))));
  MR_Word Features_7;
  MR_Word Var_20;
  MR_Word Var_21;
  MR_Word Var_23;
  MR_Word Var_24;
  MR_Word Var_25;
  MR_Unsigned packed_word_0;

  mercury__set__insert_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) (NewFeature_4)), Features0_6, &Features_7);
  packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 0)));
  Var_20 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 1))));
  Var_21 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 2))));
  Var_23 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 4))));
  Var_24 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 5))));
  Var_25 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_8, 6))));
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_9 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_20));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_21));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_7));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_23));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_24));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_25));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_get_goal_purity_3_p_0(
  MR_Word Goal_4,
  MR_Word * Purity_5,
  MR_Word * ContainsTraceGoal_6)
{
  MR_Word GoalInfo_8 = ((MR_Word) ((MR_hl_field(0, Goal_4, 1))));

  hlds__hlds_goal__goal_info_get_goal_purity_3_p_0(GoalInfo_8, Purity_5, ContainsTraceGoal_6);
}

void MR_CALL 
hlds__hlds_goal__goal_info_get_goal_purity_3_p_0(
  MR_Word GoalInfo_4,
  MR_Word * Purity_5,
  MR_Word * ContainsTraceGoal_6)
{
  MR_bool succeeded;
  MR_Word Features_15;

  *Purity_5 = ((MR_Unsigned) ((MR_hl_field(0, GoalInfo_4, 0))) & (MR_Integer) 3);
  Features_15 = ((MR_Word) ((MR_hl_field(0, GoalInfo_4, 3))));
  succeeded = mercury__set__member_2_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) ((MR_Integer) 21)), Features_15);
  if (succeeded)
    *ContainsTraceGoal_6 = (MR_Integer) 0;
  else
    *ContainsTraceGoal_6 = (MR_Integer) 1;
}

void MR_CALL 
hlds__hlds_goal__goal_set_context_3_p_0(
  MR_Word Context_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));
  MR_Word Var_11;
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 4))));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0)));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_10, 1))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_10, 2))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_10, 3))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_10, 4))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_10, 5))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_10, 6))));
  MR_Word Var_26 = ((MR_Word) ((MR_hl_field(0, Var_10, 7))));

  {
    Var_11 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_11, 0) = ((MR_Box) (Context_4));
    MR_hl_field(0, Var_11, 1) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_11, 2) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_11, 3) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_11, 4) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_11, 5) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_11, 6) = ((MR_Box) (Var_25));
    MR_hl_field(0, Var_11, 7) = ((MR_Box) (Var_26));
  }
  {
    GoalInfo_9 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_9, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_9, 1) = ((MR_Box) (Var_14));
    MR_hl_field(0, GoalInfo_9, 2) = ((MR_Box) (Var_15));
    MR_hl_field(0, GoalInfo_9, 3) = ((MR_Box) (Var_16));
    MR_hl_field(0, GoalInfo_9, 4) = ((MR_Box) (Var_17));
    MR_hl_field(0, GoalInfo_9, 5) = ((MR_Box) (Var_18));
    MR_hl_field(0, GoalInfo_9, 6) = ((MR_Box) (Var_11));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_set_purity_3_p_0(
  MR_Word Purity_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_bool succeeded;
  MR_Word GoalExpr_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;
  MR_Word Var_25 = ((MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0))) & (MR_Integer) 3);

  succeeded = (Purity_4 == Var_25);
  if (succeeded)
    GoalInfo_9 = GoalInfo0_8;
  else
  {
    MR_Word Var_17 = ((((MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0))) >> 2)) & (MR_Integer) 7);
    MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
    MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
    MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
    MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 4))));
    MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
    MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));

    {
      GoalInfo_9 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, GoalInfo_9, 0) = (MR_Box) (((((MR_Unsigned) (Var_17) << 2)) | (MR_Unsigned) (Purity_4)));
      MR_hl_field(0, GoalInfo_9, 1) = ((MR_Box) (Var_19));
      MR_hl_field(0, GoalInfo_9, 2) = ((MR_Box) (Var_20));
      MR_hl_field(0, GoalInfo_9, 3) = ((MR_Box) (Var_21));
      MR_hl_field(0, GoalInfo_9, 4) = ((MR_Box) (Var_22));
      MR_hl_field(0, GoalInfo_9, 5) = ((MR_Box) (Var_23));
      MR_hl_field(0, GoalInfo_9, 6) = ((MR_Box) (Var_24));
    }
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_get_purity_1_f_0(
  MR_Word HeadVar__1_1)
{
  MR_Word HeadVar__2_2;
  MR_Word GoalInfo_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));

  HeadVar__2_2 = ((MR_Unsigned) ((MR_hl_field(0, GoalInfo_4, 0))) & (MR_Integer) 3);
  return HeadVar__2_2;
}

void MR_CALL 
hlds__hlds_goal__goal_set_goal_id_3_p_0(
  MR_Word GoalId_4,
  MR_Word Goal0_5,
  MR_Word * Goal_6)
{
  MR_Word GoalExpr_7 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 0))));
  MR_Word GoalInfo0_8 = ((MR_Word) ((MR_hl_field(0, Goal0_5, 1))));
  MR_Word GoalInfo_9;
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0)));

  {
    GoalInfo_9 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_9, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_9, 1) = ((MR_Box) (Var_12));
    MR_hl_field(0, GoalInfo_9, 2) = ((MR_Box) (Var_13));
    MR_hl_field(0, GoalInfo_9, 3) = ((MR_Box) (Var_14));
    MR_hl_field(0, GoalInfo_9, 4) = ((MR_Box) (GoalId_4));
    MR_hl_field(0, GoalInfo_9, 5) = ((MR_Box) (Var_16));
    MR_hl_field(0, GoalInfo_9, 6) = ((MR_Box) (Var_17));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
    *Goal_6 = base;
    MR_hl_field(0, base, 0) = ((MR_Box) (GoalExpr_7));
    MR_hl_field(0, base, 1) = ((MR_Box) (GoalInfo_9));
  }
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_get_nonlocals_1_f_0(
  MR_Word HeadVar__1_1)
{
  MR_Word HeadVar__2_2;
  MR_Word GoalInfo_4 = ((MR_Word) ((MR_hl_field(0, HeadVar__1_1, 1))));

  HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, GoalInfo_4, 2))));
  return HeadVar__2_2;
}

MR_Word MR_CALL 
hlds__hlds_goal__worst_contains_trace_2_f_0(
  MR_Word HeadVar__1_1,
  MR_Word HeadVar__2_2)
{
  MR_Word HeadVar__3_3;

  switch (HeadVar__1_1) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      switch (HeadVar__2_2) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          HeadVar__3_3 = (MR_Integer) 1;
          break;
        case (MR_Integer) 0:
          HeadVar__3_3 = (MR_Integer) 0;
          break;
      }
      break;
    case (MR_Integer) 0:
      switch (HeadVar__2_2) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          HeadVar__3_3 = (MR_Integer) 0;
          break;
        case (MR_Integer) 0:
          HeadVar__3_3 = (MR_Integer) 0;
          break;
      }
      break;
  }
  return HeadVar__3_3;
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_code_gen_nonlocals_3_p_0(
  MR_Word NonLocals_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));

  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_10));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_4));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_12));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_15));
  }
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_code_gen_nonlocals_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 2))));

  return HeadVar__2_2;
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_maybe_dp_info_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, Var_9, 0))));
  MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, Var_9, 1))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_9, 3))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_9, 4))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_9, 5))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_9, 6))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (X_4));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_maybe_mode_constr_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, Var_9, 0))));
  MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, Var_9, 1))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_9, 3))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_9, 4))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_9, 5))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_9, 7))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (X_4));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (Var_25));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_maybe_rbmm_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, Var_9, 0))));
  MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, Var_9, 1))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_9, 3))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_9, 4))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_9, 6))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_9, 7))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (X_4));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (Var_25));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_maybe_ctgc_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, Var_9, 0))));
  MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, Var_9, 1))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_9, 3))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_9, 5))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_9, 6))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_9, 7))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (X_4));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (Var_25));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_goal_mode_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, Var_9, 0))));
  MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, Var_9, 1))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_9, 4))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_9, 5))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_9, 6))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_9, 7))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (X_4));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (Var_25));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_higher_order_value_map_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_7,
  MR_Word * STATE_VARIABLE_GoalInfo_8)
{
  MR_bool succeeded;
  MR_Word Map0_6;
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 6))));

  Map0_6 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  succeeded = (((MR_Word) X_4) == ((MR_Word) Map0_6));
  if (succeeded)
    *STATE_VARIABLE_GoalInfo_8 = STATE_VARIABLE_GoalInfo_0_7;
  else
  {
    MR_Word Var_11 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 6))));
    MR_Word Var_12;
    MR_Word Var_29 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 1))));
    MR_Word Var_30 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 2))));
    MR_Word Var_31 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 3))));
    MR_Word Var_32 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 4))));
    MR_Word Var_33 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 5))));
    MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_7, 0)));
    MR_Word Var_34 = ((MR_Word) ((MR_hl_field(0, Var_11, 0))));
    MR_Word Var_35 = ((MR_Word) ((MR_hl_field(0, Var_11, 1))));
    MR_Word Var_37 = ((MR_Word) ((MR_hl_field(0, Var_11, 3))));
    MR_Word Var_38 = ((MR_Word) ((MR_hl_field(0, Var_11, 4))));
    MR_Word Var_39 = ((MR_Word) ((MR_hl_field(0, Var_11, 5))));
    MR_Word Var_40 = ((MR_Word) ((MR_hl_field(0, Var_11, 6))));
    MR_Word Var_41 = ((MR_Word) ((MR_hl_field(0, Var_11, 7))));

    {
      Var_12 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Var_12, 0) = ((MR_Box) (Var_34));
      MR_hl_field(0, Var_12, 1) = ((MR_Box) (Var_35));
      MR_hl_field(0, Var_12, 2) = ((MR_Box) (X_4));
      MR_hl_field(0, Var_12, 3) = ((MR_Box) (Var_37));
      MR_hl_field(0, Var_12, 4) = ((MR_Box) (Var_38));
      MR_hl_field(0, Var_12, 5) = ((MR_Box) (Var_39));
      MR_hl_field(0, Var_12, 6) = ((MR_Box) (Var_40));
      MR_hl_field(0, Var_12, 7) = ((MR_Box) (Var_41));
    }
    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
      *STATE_VARIABLE_GoalInfo_8 = base;
      MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
      MR_hl_field(0, base, 1) = ((MR_Box) (Var_29));
      MR_hl_field(0, base, 2) = ((MR_Box) (Var_30));
      MR_hl_field(0, base, 3) = ((MR_Box) (Var_31));
      MR_hl_field(0, base, 4) = ((MR_Box) (Var_32));
      MR_hl_field(0, base, 5) = ((MR_Box) (Var_33));
      MR_hl_field(0, base, 6) = ((MR_Box) (Var_12));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_reverse_goal_path_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, Var_9, 0))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_9, 3))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_9, 4))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_9, 5))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_9, 6))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_9, 7))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (X_4));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (Var_25));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_context_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Word Var_10;
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_16 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));
  MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, Var_9, 1))));
  MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, Var_9, 2))));
  MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, Var_9, 3))));
  MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, Var_9, 4))));
  MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, Var_9, 5))));
  MR_Word Var_24 = ((MR_Word) ((MR_hl_field(0, Var_9, 6))));
  MR_Word Var_25 = ((MR_Word) ((MR_hl_field(0, Var_9, 7))));

  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (X_4));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_21));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) (Var_22));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) (Var_23));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) (Var_24));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) (Var_25));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_15));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_16));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_17));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_code_gen_info_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_11 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));

  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_10));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_11));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_12));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 5) = ((MR_Box) (X_4));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_15));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_goal_id_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_11 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));

  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_10));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_11));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_12));
    MR_hl_field(0, base, 4) = ((MR_Box) (X_4));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_15));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_features_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_11 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));

  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_10));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_11));
    MR_hl_field(0, base, 3) = ((MR_Box) (X_4));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_15));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_nonlocals_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
  MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));

  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_10));
    MR_hl_field(0, base, 2) = ((MR_Box) (X_4));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_12));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_15));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_instmap_delta_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_bool succeeded;
  MR_Word Var_8 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));

  succeeded = (((MR_Word) X_4) == ((MR_Word) Var_8));
  if (succeeded)
    *STATE_VARIABLE_GoalInfo_7 = STATE_VARIABLE_GoalInfo_0_6;
  else
  {
    MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
    MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
    MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
    MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
    MR_Word Var_23 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));
    MR_Unsigned packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0)));

    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
      *STATE_VARIABLE_GoalInfo_7 = base;
      MR_hl_field(0, base, 0) = (MR_Box) (packed_word_0);
      MR_hl_field(0, base, 1) = ((MR_Box) (X_4));
      MR_hl_field(0, base, 2) = ((MR_Box) (Var_19));
      MR_hl_field(0, base, 3) = ((MR_Box) (Var_20));
      MR_hl_field(0, base, 4) = ((MR_Box) (Var_21));
      MR_hl_field(0, base, 5) = ((MR_Box) (Var_22));
      MR_hl_field(0, base, 6) = ((MR_Box) (Var_23));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_purity_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_bool succeeded;
  MR_Word Var_23 = ((MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0))) & (MR_Integer) 3);

  succeeded = (X_4 == Var_23);
  if (succeeded)
    *STATE_VARIABLE_GoalInfo_7 = STATE_VARIABLE_GoalInfo_0_6;
  else
  {
    MR_Word Var_15 = ((((MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0))) >> 2)) & (MR_Integer) 7);
    MR_Word Var_17 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
    MR_Word Var_18 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
    MR_Word Var_19 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
    MR_Word Var_20 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
    MR_Word Var_21 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
    MR_Word Var_22 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));

    {
      MR_Word base;
      base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
      *STATE_VARIABLE_GoalInfo_7 = base;
      MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) (Var_15) << 2)) | (MR_Unsigned) (X_4)));
      MR_hl_field(0, base, 1) = ((MR_Box) (Var_17));
      MR_hl_field(0, base, 2) = ((MR_Box) (Var_18));
      MR_hl_field(0, base, 3) = ((MR_Box) (Var_19));
      MR_hl_field(0, base, 4) = ((MR_Box) (Var_20));
      MR_hl_field(0, base, 5) = ((MR_Box) (Var_21));
      MR_hl_field(0, base, 6) = ((MR_Box) (Var_22));
    }
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_set_determinism_3_p_0(
  MR_Word X_4,
  MR_Word STATE_VARIABLE_GoalInfo_0_6,
  MR_Word * STATE_VARIABLE_GoalInfo_7)
{
  MR_Word Var_9 = ((MR_Unsigned) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 0))) & (MR_Integer) 3);
  MR_Word Var_10 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 1))));
  MR_Word Var_11 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 2))));
  MR_Word Var_12 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 3))));
  MR_Word Var_13 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 4))));
  MR_Word Var_14 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 5))));
  MR_Word Var_15 = ((MR_Word) ((MR_hl_field(0, STATE_VARIABLE_GoalInfo_0_6, 6))));

  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *STATE_VARIABLE_GoalInfo_7 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) (X_4) << 2)) | (MR_Unsigned) (Var_9)));
    MR_hl_field(0, base, 1) = ((MR_Box) (Var_10));
    MR_hl_field(0, base, 2) = ((MR_Box) (Var_11));
    MR_hl_field(0, base, 3) = ((MR_Box) (Var_12));
    MR_hl_field(0, base, 4) = ((MR_Box) (Var_13));
    MR_hl_field(0, base, 5) = ((MR_Box) (Var_14));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_15));
  }
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_maybe_dp_info_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 7))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_maybe_mode_constr_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 6))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_maybe_rbmm_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 5))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_maybe_ctgc_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 4))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_goal_mode_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 3))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_higher_order_value_map_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 2))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_reverse_goal_path_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 1))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_context_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4;
  MR_Word Var_5 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 6))));

  X_4 = ((MR_Word) ((MR_hl_field(0, Var_5, 0))));
  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_code_gen_info_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 5))));

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_goal_id_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 4))));

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_features_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 3))));

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_nonlocals_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 2))));

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_instmap_delta_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((MR_Word) ((MR_hl_field(0, GoalInfo_3, 1))));

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_purity_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((MR_Unsigned) ((MR_hl_field(0, GoalInfo_3, 0))) & (MR_Integer) 3);

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__goal_info_get_determinism_1_f_0(
  MR_Word GoalInfo_3)
{
  MR_Word X_4 = ((((MR_Unsigned) ((MR_hl_field(0, GoalInfo_3, 0))) >> 2)) & (MR_Integer) 7);

  return X_4;
}

MR_Word MR_CALL 
hlds__hlds_goal__impure_unreachable_init_goal_info_2_f_0(
  MR_Word NonLocals_4,
  MR_Word Determinism_5)
{
  MR_Word GoalInfo_6;
  MR_Word InstMapDelta_7;
  MR_Word GoalInfo0_8;
  MR_Word Features0_11;
  MR_Word Features_12;
  MR_Word Var_23;
  MR_Word Var_24;
  MR_Word Var_26;
  MR_Word Var_27;
  MR_Word Var_28;
  MR_Unsigned packed_word_0;

  hlds__instmap__instmap_delta_init_unreachable_1_p_0(&InstMapDelta_7);
  hlds__hlds_goal__goal_info_init_5_p_0(NonLocals_4, InstMapDelta_7, Determinism_5, (MR_Integer) 2, &GoalInfo0_8);
  Features0_11 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 3))));
  mercury__set__insert_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) ((MR_Integer) 3)), Features0_11, &Features_12);
  packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_8, 0)));
  Var_23 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 1))));
  Var_24 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 2))));
  Var_26 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 4))));
  Var_27 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 5))));
  Var_28 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_8, 6))));
  {
    GoalInfo_6 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_6, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_6, 1) = ((MR_Box) (Var_23));
    MR_hl_field(0, GoalInfo_6, 2) = ((MR_Box) (Var_24));
    MR_hl_field(0, GoalInfo_6, 3) = ((MR_Box) (Features_12));
    MR_hl_field(0, GoalInfo_6, 4) = ((MR_Box) (Var_26));
    MR_hl_field(0, GoalInfo_6, 5) = ((MR_Box) (Var_27));
    MR_hl_field(0, GoalInfo_6, 6) = ((MR_Box) (Var_28));
  }
  return GoalInfo_6;
}

MR_Word MR_CALL 
hlds__hlds_goal__impure_reachable_init_goal_info_2_f_0(
  MR_Word NonLocals_4,
  MR_Word Determinism_5)
{
  MR_Word GoalInfo_6;
  MR_Word InstMapDelta_7;

  hlds__instmap__instmap_delta_init_reachable_1_p_0(&InstMapDelta_7);
  hlds__hlds_goal__goal_info_init_5_p_0(NonLocals_4, InstMapDelta_7, Determinism_5, (MR_Integer) 2, &GoalInfo_6);
  return GoalInfo_6;
}

MR_Word MR_CALL 
hlds__hlds_goal__impure_init_goal_info_3_f_0(
  MR_Word NonLocals_5,
  MR_Word InstMapDelta_6,
  MR_Word Determinism_7)
{
  MR_Word GoalInfo_8;
  MR_Word GoalInfo0_9;
  MR_Word Features0_12;
  MR_Word Features_13;
  MR_Word Var_24;
  MR_Word Var_25;
  MR_Word Var_27;
  MR_Word Var_28;
  MR_Word Var_29;
  MR_Unsigned packed_word_0;

  hlds__hlds_goal__goal_info_init_5_p_0(NonLocals_5, InstMapDelta_6, Determinism_7, (MR_Integer) 2, &GoalInfo0_9);
  Features0_12 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_9, 3))));
  mercury__set__insert_3_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), ((MR_Box) ((MR_Integer) 3)), Features0_12, &Features_13);
  packed_word_0 = (MR_Unsigned) ((MR_hl_field(0, GoalInfo0_9, 0)));
  Var_24 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_9, 1))));
  Var_25 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_9, 2))));
  Var_27 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_9, 4))));
  Var_28 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_9, 5))));
  Var_29 = ((MR_Word) ((MR_hl_field(0, GoalInfo0_9, 6))));
  {
    GoalInfo_8 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, GoalInfo_8, 0) = (MR_Box) (packed_word_0);
    MR_hl_field(0, GoalInfo_8, 1) = ((MR_Box) (Var_24));
    MR_hl_field(0, GoalInfo_8, 2) = ((MR_Box) (Var_25));
    MR_hl_field(0, GoalInfo_8, 3) = ((MR_Box) (Features_13));
    MR_hl_field(0, GoalInfo_8, 4) = ((MR_Box) (Var_27));
    MR_hl_field(0, GoalInfo_8, 5) = ((MR_Box) (Var_28));
    MR_hl_field(0, GoalInfo_8, 6) = ((MR_Box) (Var_29));
  }
  return GoalInfo_8;
}

MR_Word MR_CALL 
hlds__hlds_goal__ctgc_goal_info_init_0_f_0(void)
{
  MR_Word HeadVar__1_1;
  MR_Word Var_2;
  MR_Word Var_3;

  Var_2 = parse_tree__set_of_var__init_0_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0));
  Var_3 = parse_tree__set_of_var__init_0_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0));
  {
    HeadVar__1_1 = (MR_Word) MR_new_object(MR_Word, (3 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, HeadVar__1_1, 0) = ((MR_Box) (Var_2));
    MR_hl_field(0, HeadVar__1_1, 1) = ((MR_Box) (Var_3));
    MR_hl_field(0, HeadVar__1_1, 2) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  return HeadVar__1_1;
}

void MR_CALL 
hlds__hlds_goal__goal_info_init_context_purity_3_p_0(
  MR_Word Context_4,
  MR_Word Purity_5,
  MR_Word * GoalInfo_6)
{
  MR_Word InstMapDelta_8;
  MR_Word NonLocals_9;
  MR_Word Features_10;
  MR_Word GoalId_11;
  MR_Word Var_13;
  MR_Word HO_Values_16;
  MR_Word Var_18;

  hlds__instmap__instmap_delta_init_unreachable_1_p_0(&InstMapDelta_8);
  NonLocals_9 = parse_tree__set_of_var__init_0_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0));
  mercury__set__init_1_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), &Features_10);
  GoalId_11 = mdbcomp__goal_path__invalid_goal_id_0_f_0();
  HO_Values_16 = mercury__map__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[1]));
  Var_18 = hlds__goal_mode__make_dummy_goal_mode_0_f_0();
  {
    Var_13 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_13, 0) = ((MR_Box) (Context_4));
    MR_hl_field(0, Var_13, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_13, 2) = ((MR_Box) (HO_Values_16));
    MR_hl_field(0, Var_13, 3) = ((MR_Box) (Var_18));
    MR_hl_field(0, Var_13, 4) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_13, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_13, 6) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_13, 7) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *GoalInfo_6 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) ((MR_Integer) 6) << 2)) | (MR_Unsigned) (Purity_5)));
    MR_hl_field(0, base, 1) = ((MR_Box) (InstMapDelta_8));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_9));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_10));
    MR_hl_field(0, base, 4) = ((MR_Box) (GoalId_11));
    MR_hl_field(0, base, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_13));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_init_6_p_0(
  MR_Word NonLocals_7,
  MR_Word InstMapDelta_8,
  MR_Word Detism_9,
  MR_Word Purity_10,
  MR_Word Context_11,
  MR_Word * GoalInfo_12)
{
  MR_Word Features_13;
  MR_Word GoalId_14;
  MR_Word Var_16;
  MR_Word HO_Values_18;
  MR_Word Var_20;

  mercury__set__init_1_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), &Features_13);
  GoalId_14 = mdbcomp__goal_path__invalid_goal_id_0_f_0();
  HO_Values_18 = mercury__map__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[1]));
  Var_20 = hlds__goal_mode__make_dummy_goal_mode_0_f_0();
  {
    Var_16 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_16, 0) = ((MR_Box) (Context_11));
    MR_hl_field(0, Var_16, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_16, 2) = ((MR_Box) (HO_Values_18));
    MR_hl_field(0, Var_16, 3) = ((MR_Box) (Var_20));
    MR_hl_field(0, Var_16, 4) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_16, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_16, 6) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_16, 7) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *GoalInfo_12 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) (Detism_9) << 2)) | (MR_Unsigned) (Purity_10)));
    MR_hl_field(0, base, 1) = ((MR_Box) (InstMapDelta_8));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_7));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_13));
    MR_hl_field(0, base, 4) = ((MR_Box) (GoalId_14));
    MR_hl_field(0, base, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_16));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_init_5_p_0(
  MR_Word NonLocals_6,
  MR_Word InstMapDelta_7,
  MR_Word Detism_8,
  MR_Word Purity_9,
  MR_Word * GoalInfo_10)
{
  MR_Word Features_11;
  MR_Word GoalId_12;
  MR_Word Var_14;
  MR_Word Var_15;
  MR_Word HO_Values_17;
  MR_Word Var_19;

  mercury__set__init_1_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), &Features_11);
  GoalId_12 = mdbcomp__goal_path__invalid_goal_id_0_f_0();
  Var_15 = mercury__term_context__dummy_context_0_f_0();
  HO_Values_17 = mercury__map__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[1]));
  Var_19 = hlds__goal_mode__make_dummy_goal_mode_0_f_0();
  {
    Var_14 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_14, 0) = ((MR_Box) (Var_15));
    MR_hl_field(0, Var_14, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_14, 2) = ((MR_Box) (HO_Values_17));
    MR_hl_field(0, Var_14, 3) = ((MR_Box) (Var_19));
    MR_hl_field(0, Var_14, 4) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_14, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_14, 6) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_14, 7) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *GoalInfo_10 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) (Detism_8) << 2)) | (MR_Unsigned) (Purity_9)));
    MR_hl_field(0, base, 1) = ((MR_Box) (InstMapDelta_7));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_6));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_11));
    MR_hl_field(0, base, 4) = ((MR_Box) (GoalId_12));
    MR_hl_field(0, base, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_14));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_init_2_p_0(
  MR_Word Context_3,
  MR_Word * GoalInfo_4)
{
  MR_Word InstMapDelta_6;
  MR_Word NonLocals_7;
  MR_Word Features_8;
  MR_Word GoalId_9;
  MR_Word Var_12;
  MR_Word HO_Values_15;
  MR_Word Var_17;

  hlds__instmap__instmap_delta_init_unreachable_1_p_0(&InstMapDelta_6);
  NonLocals_7 = parse_tree__set_of_var__init_0_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0));
  mercury__set__init_1_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), &Features_8);
  GoalId_9 = mdbcomp__goal_path__invalid_goal_id_0_f_0();
  HO_Values_15 = mercury__map__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[1]));
  Var_17 = hlds__goal_mode__make_dummy_goal_mode_0_f_0();
  {
    Var_12 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_12, 0) = ((MR_Box) (Context_3));
    MR_hl_field(0, Var_12, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_12, 2) = ((MR_Box) (HO_Values_15));
    MR_hl_field(0, Var_12, 3) = ((MR_Box) (Var_17));
    MR_hl_field(0, Var_12, 4) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_12, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_12, 6) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_12, 7) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *GoalInfo_4 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) ((MR_Integer) 6) << 2)) | (MR_Unsigned) ((MR_Integer) 0)));
    MR_hl_field(0, base, 1) = ((MR_Box) (InstMapDelta_6));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_7));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_8));
    MR_hl_field(0, base, 4) = ((MR_Box) (GoalId_9));
    MR_hl_field(0, base, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_12));
  }
}

void MR_CALL 
hlds__hlds_goal__goal_info_init_1_p_0(
  MR_Word * GoalInfo_2)
{
  MR_Word InstMapDelta_4;
  MR_Word NonLocals_5;
  MR_Word Features_6;
  MR_Word GoalId_7;
  MR_Word Var_10;
  MR_Word Var_11;
  MR_Word HO_Values_14;
  MR_Word Var_16;

  hlds__instmap__instmap_delta_init_unreachable_1_p_0(&InstMapDelta_4);
  NonLocals_5 = parse_tree__set_of_var__init_0_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_prog_var_type_0));
  mercury__set__init_1_p_0((MR_Word) (&hlds__hlds_markers__hlds__hlds_markers__type_ctor_info_goal_feature_0), &Features_6);
  GoalId_7 = mdbcomp__goal_path__invalid_goal_id_0_f_0();
  Var_11 = mercury__term_context__dummy_context_0_f_0();
  HO_Values_14 = mercury__map__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]), (MR_Word) (&hlds__hlds_goal_scalar_common_1[1]));
  Var_16 = hlds__goal_mode__make_dummy_goal_mode_0_f_0();
  {
    Var_10 = (MR_Word) MR_new_object(MR_Word, (8 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_10, 0) = ((MR_Box) (Var_11));
    MR_hl_field(0, Var_10, 1) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_10, 2) = ((MR_Box) (HO_Values_14));
    MR_hl_field(0, Var_10, 3) = ((MR_Box) (Var_16));
    MR_hl_field(0, Var_10, 4) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_10, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_10, 6) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, Var_10, 7) = ((MR_Box) ((MR_Unsigned) 0U));
  }
  {
    MR_Word base;
    base = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
    *GoalInfo_2 = base;
    MR_hl_field(0, base, 0) = (MR_Box) (((((MR_Unsigned) ((MR_Integer) 6) << 2)) | (MR_Unsigned) ((MR_Integer) 0)));
    MR_hl_field(0, base, 1) = ((MR_Box) (InstMapDelta_4));
    MR_hl_field(0, base, 2) = ((MR_Box) (NonLocals_5));
    MR_hl_field(0, base, 3) = ((MR_Box) (Features_6));
    MR_hl_field(0, base, 4) = ((MR_Box) (GoalId_7));
    MR_hl_field(0, base, 5) = ((MR_Box) ((MR_Unsigned) 0U));
    MR_hl_field(0, base, 6) = ((MR_Box) (Var_10));
  }
}

MR_Word MR_CALL 
hlds__hlds_goal__rbmm_info_init_0_f_0(void)
{
  MR_Word HeadVar__1_1;
  MR_Word Var_2;
  MR_Word Var_3;
  MR_Word Var_4;
  MR_Word Var_5;
  MR_Word Var_6;

  Var_2 = mercury__set__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]));
  Var_3 = mercury__set__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]));
  Var_4 = mercury__set__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]));
  Var_5 = mercury__set__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]));
  Var_6 = mercury__set__init_0_f_0((MR_Word) (&hlds__hlds_goal_scalar_common_1[0]));
  {
    HeadVar__1_1 = (MR_Word) MR_new_object(MR_Word, (5 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, HeadVar__1_1, 0) = ((MR_Box) (Var_2));
    MR_hl_field(0, HeadVar__1_1, 1) = ((MR_Box) (Var_3));
    MR_hl_field(0, HeadVar__1_1, 2) = ((MR_Box) (Var_4));
    MR_hl_field(0, HeadVar__1_1, 3) = ((MR_Box) (Var_5));
    MR_hl_field(0, HeadVar__1_1, 4) = ((MR_Box) (Var_6));
  }
  return HeadVar__1_1;
}

MR_Word MR_CALL 
hlds__hlds_goal__generic_call_pred_or_func_1_f_0(
  MR_Word GenericCall_3)
{
  MR_Word PredOrFunc_4;

  switch (MR_tag((MR_Word) GenericCall_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      PredOrFunc_4 = ((MR_Unsigned) ((MR_hl_field(0, GenericCall_3, 1))) & (MR_Integer) 1);
      break;
    case (MR_Integer) 1:
      {
        MR_Word PFSymNameArity_12 = ((MR_Word) ((MR_hl_field(1, GenericCall_3, 3))));

        PredOrFunc_4 = ((MR_Unsigned) ((MR_hl_field(0, PFSymNameArity_12, 0))) & (MR_Integer) 1);
      }
      break;
    case (MR_Integer) 2:
    case (MR_Integer) 3:
      PredOrFunc_4 = (MR_Integer) 0;
      break;
  }
  return PredOrFunc_4;
}

void MR_CALL 
hlds__hlds_goal__generic_call_to_id_2_p_0(
  MR_Word GenericCall_3,
  MR_Word * GenericCallId_4)
{
  switch (MR_tag((MR_Word) GenericCall_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word PredFormArity_8 = ((MR_Word) ((MR_hl_field(0, GenericCall_3, 2))));
        MR_Unsigned packed_word_1 = (MR_Unsigned) ((MR_hl_field(0, GenericCall_3, 1)));

        {
          MR_Word base;
          base = (MR_Word) MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL);
          *GenericCallId_4 = base;
          MR_hl_field(0, base, 0) = (MR_Box) (packed_word_1);
          MR_hl_field(0, base, 1) = ((MR_Box) (PredFormArity_8));
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word ClassId_12 = ((MR_Word) ((MR_hl_field(1, GenericCall_3, 2))));
        MR_Word MethodId_13 = ((MR_Word) ((MR_hl_field(1, GenericCall_3, 3))));

        {
          MR_Word base;
          base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          *GenericCallId_4 = base;
          MR_hl_field(1, base, 0) = ((MR_Box) (ClassId_12));
          MR_hl_field(1, base, 1) = ((MR_Box) (MethodId_13));
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_String EventName_14 = ((MR_String) ((MR_hl_field(2, GenericCall_3, 0))));

        {
          MR_Word base;
          base = (MR_Word) MR_mkword(2, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          *GenericCallId_4 = base;
          MR_hl_field(2, base, 0) = ((MR_Box) (EventName_14));
        }
      }
      break;
    case (MR_Integer) 3:
      {
        MR_Word CastType_15 = ((MR_Unsigned) ((MR_hl_field(3, GenericCall_3, 0))) & (MR_Integer) 7);

        {
          MR_Word base;
          base = (MR_Word) MR_mkword(3, MR_new_object(MR_Word, (1 * sizeof(MR_Word)), NULL, NULL));
          *GenericCallId_4 = base;
          MR_hl_field(3, base, 0) = (MR_Box) ((MR_Unsigned) (CastType_15));
        }
      }
      break;
  }
}

void MR_CALL 
hlds__hlds_goal__make_foreign_args_4_p_0(
  MR_Word Vars_5,
  MR_Word NamesModesBoxes_6,
  MR_Word Types_7,
  MR_Word * Args_8)
{
  MR_bool succeeded = (Vars_5 != (MR_Word) ((MR_Unsigned) 0U));
  MR_Word Var_9;
  MR_Word VarsTail_10;
  MR_Word NameModeBox_11;
  MR_Word NamesModesBoxesTail_12;
  MR_Word Type_13;
  MR_Word TypesTail_14;

  if (succeeded)
  {
    Var_9 = ((MR_Word) ((MR_hl_field(1, Vars_5, 0))));
    VarsTail_10 = ((MR_Word) ((MR_hl_field(1, Vars_5, 1))));
    succeeded = (NamesModesBoxes_6 != (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
    {
      NameModeBox_11 = ((MR_Word) ((MR_hl_field(1, NamesModesBoxes_6, 0))));
      NamesModesBoxesTail_12 = ((MR_Word) ((MR_hl_field(1, NamesModesBoxes_6, 1))));
      succeeded = (Types_7 != (MR_Word) ((MR_Unsigned) 0U));
      if (succeeded)
      {
        Type_13 = ((MR_Word) ((MR_hl_field(1, Types_7, 0))));
        TypesTail_14 = ((MR_Word) ((MR_hl_field(1, Types_7, 1))));
      }
    }
  }
  if (succeeded)
  {
    MR_Word ArgsTail_15;
    MR_Word MaybeNameMode_16;
    MR_Word Box_17;
    MR_Word Arg_18;

    hlds__hlds_goal__make_foreign_args_4_p_0(VarsTail_10, NamesModesBoxesTail_12, TypesTail_14, &ArgsTail_15);
    MaybeNameMode_16 = ((MR_Word) ((MR_hl_field(0, NameModeBox_11, 0))));
    Box_17 = ((MR_Unsigned) ((MR_hl_field(0, NameModeBox_11, 1))) & (MR_Integer) 1);
    {
      Arg_18 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
      MR_hl_field(0, Arg_18, 0) = ((MR_Box) (Var_9));
      MR_hl_field(0, Arg_18, 1) = ((MR_Box) (MaybeNameMode_16));
      MR_hl_field(0, Arg_18, 2) = ((MR_Box) (Type_13));
      MR_hl_field(0, Arg_18, 3) = (MR_Box) ((MR_Unsigned) (Box_17));
    }
    {
      MR_Word base;
      base = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
      *Args_8 = base;
      MR_hl_field(1, base, 0) = ((MR_Box) (Arg_18));
      MR_hl_field(1, base, 1) = ((MR_Box) (ArgsTail_15));
    }
  }
  else
  {
    succeeded = (Vars_5 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
    {
      succeeded = (NamesModesBoxes_6 == (MR_Word) ((MR_Unsigned) 0U));
      if (succeeded)
        succeeded = (Types_7 == (MR_Word) ((MR_Unsigned) 0U));
    }
    if (succeeded)
      *Args_8 = (MR_Word) ((MR_Unsigned) 0U);
    else
      {
        mercury__require__unexpected_2_p_0((MR_String) "predicate \140hlds.hlds_goal.make_foreign_args\'/4", (MR_String) "unmatched lists");
        return;
      }
  }
}

MR_Word MR_CALL 
hlds__hlds_goal__foreign_arg_box_1_f_0(
  MR_Word Arg_3)
{
  MR_Word HeadVar__2_2 = ((MR_Unsigned) ((MR_hl_field(0, Arg_3, 3))) & (MR_Integer) 1);

  return HeadVar__2_2;
}

MR_Word MR_CALL 
hlds__hlds_goal__foreign_arg_type_1_f_0(
  MR_Word Arg_3)
{
  MR_Word HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, Arg_3, 2))));

  return HeadVar__2_2;
}

MR_Word MR_CALL 
hlds__hlds_goal__foreign_arg_maybe_name_mode_1_f_0(
  MR_Word Arg_3)
{
  MR_Word HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, Arg_3, 1))));

  return HeadVar__2_2;
}

MR_Word MR_CALL 
hlds__hlds_goal__foreign_arg_var_1_f_0(
  MR_Word Arg_3)
{
  MR_Word HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, Arg_3, 0))));

  return HeadVar__2_2;
}

MR_Word MR_CALL 
hlds__hlds_goal__get_hlds_goal_info_1_f_0(
  MR_Word Goal_3)
{
  MR_Word HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, Goal_3, 1))));

  return HeadVar__2_2;
}

MR_Word MR_CALL 
hlds__hlds_goal__get_hlds_goal_expr_1_f_0(
  MR_Word Goal_3)
{
  MR_Word HeadVar__2_2 = ((MR_Word) ((MR_hl_field(0, Goal_3, 0))));

  return HeadVar__2_2;
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____atomic_goal_type_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____atomic_goal_type_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____atomic_goal_type_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____atomic_goal_type_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____atomic_interface_vars_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____atomic_interface_vars_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____atomic_interface_vars_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____atomic_interface_vars_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____builtin_state_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____builtin_state_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____builtin_state_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____builtin_state_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____call_unify_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____call_unify_context_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____call_unify_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____call_unify_context_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____can_cgc_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____can_cgc_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____can_cgc_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____can_cgc_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____case_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____case_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____case_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____case_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____case_id_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____case_id_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____case_id_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____case_id_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____cast_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____cast_kind_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____cast_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____cast_kind_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____catch_part_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____catch_part_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____catch_part_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____catch_part_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____cell_is_unique_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____cell_is_unique_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____cell_is_unique_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____cell_is_unique_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____cell_to_reuse_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____cell_to_reuse_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____cell_to_reuse_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____cell_to_reuse_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____conj_type_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____conj_type_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____conj_type_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____conj_type_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____construct_sub_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____construct_sub_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____construct_sub_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____construct_sub_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____contains_trace_goal_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____contains_trace_goal_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____contains_trace_goal_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____contains_trace_goal_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____ctgc_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____ctgc_goal_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____ctgc_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____ctgc_goal_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____dp_coverage_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____dp_coverage_goal_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____dp_coverage_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____dp_coverage_goal_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____dp_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____dp_goal_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____dp_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____dp_goal_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____force_pruning_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____force_pruning_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____force_pruning_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____force_pruning_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____foreign_arg_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____foreign_arg_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____foreign_arg_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____foreign_arg_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____from_ground_term_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____from_ground_term_kind_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____from_ground_term_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____from_ground_term_kind_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____generic_call_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____generic_call_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____generic_call_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____generic_call_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____goal_is_mdprof_inst_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____goal_is_mdprof_inst_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____goal_is_mdprof_inst_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____goal_is_mdprof_inst_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____goal_trivial_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____goal_trivial_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____goal_trivial_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____goal_trivial_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____higher_order_syntax_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____higher_order_syntax_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____higher_order_syntax_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____higher_order_syntax_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____higher_order_value_map_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____higher_order_value_map_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____higher_order_value_map_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____higher_order_value_map_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____hlds_goal_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____hlds_goal_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_code_gen_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____hlds_goal_code_gen_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_code_gen_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____hlds_goal_code_gen_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_expr_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____hlds_goal_expr_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_expr_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____hlds_goal_expr_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_extra_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____hlds_goal_extra_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_extra_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____hlds_goal_extra_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____hlds_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____hlds_goal_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____hlds_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____hlds_goal_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____how_to_construct_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____how_to_construct_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____how_to_construct_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____how_to_construct_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____incremental_rename_map_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____incremental_rename_map_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____incremental_rename_map_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____incremental_rename_map_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_conditional_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____is_conditional_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____is_conditional_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____is_conditional_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_exist_constr_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____is_exist_constr_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____is_exist_constr_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____is_exist_constr_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____is_first_disjunct_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____is_first_disjunct_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____is_first_disjunct_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____is_first_disjunct_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____lc_use_parent_stack_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____lc_use_parent_stack_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____lc_use_parent_stack_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____lc_use_parent_stack_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____missed_message_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____missed_message_0_0(((MR_String) (wrapper_arg_1)), ((MR_String) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____missed_message_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____missed_message_0_0(&conv0_HeadVar__1_1, ((MR_String) (wrapper_arg_2)), ((MR_String) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____mode_constr_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____mode_constr_goal_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____mode_constr_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____mode_constr_goal_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____needs_update_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____needs_update_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____needs_update_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____needs_update_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____port_counts_give_coverage_after_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____port_counts_give_coverage_after_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____port_counts_give_coverage_after_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____port_counts_give_coverage_after_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____promise_solutions_kind_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____promise_solutions_kind_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____promise_solutions_kind_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____promise_solutions_kind_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____quant_creator_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____quant_creator_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____quant_creator_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____quant_creator_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____rbmm_goal_info_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____rbmm_goal_info_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____rbmm_goal_info_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____rbmm_goal_info_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____removable_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____removable_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____removable_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____removable_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____reuse_description_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____reuse_description_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____reuse_description_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____reuse_description_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____scope_reason_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____scope_reason_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____scope_reason_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____scope_reason_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____short_reuse_description_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____short_reuse_description_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____short_reuse_description_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____short_reuse_description_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____shorthand_goal_expr_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____shorthand_goal_expr_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____shorthand_goal_expr_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____shorthand_goal_expr_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____static_how_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____static_how_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____static_how_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____static_how_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____tagged_case_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____tagged_case_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____tagged_case_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____tagged_case_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____term_size_value_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____term_size_value_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____term_size_value_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____term_size_value_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____trace_mutable_var_hlds_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____trace_mutable_var_hlds_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____trace_mutable_var_hlds_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____trace_mutable_var_hlds_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____try_io_state_vars_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____try_io_state_vars_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____try_io_state_vars_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____try_io_state_vars_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unification_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____unification_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____unification_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____unification_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____unify_context_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____unify_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____unify_context_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_main_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____unify_main_context_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____unify_main_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____unify_main_context_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_mode_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____unify_mode_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____unify_mode_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____unify_mode_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_rhs_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____unify_rhs_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____unify_rhs_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____unify_rhs_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

static MR_bool MR_CALL 
hlds__hlds_goal____Unify____unify_sub_context_0_0_10001(
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2)
{
  MR_bool succeeded;

  succeeded = hlds__hlds_goal____Unify____unify_sub_context_0_0(((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
  return succeeded;
}

static void MR_CALL 
hlds__hlds_goal____Compare____unify_sub_context_0_0_10001(
  MR_Box * wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3)
{
  MR_Word conv0_HeadVar__1_1;

  hlds__hlds_goal____Compare____unify_sub_context_0_0(&conv0_HeadVar__1_1, ((MR_Word) (wrapper_arg_2)), ((MR_Word) (wrapper_arg_3)));
  *wrapper_arg_1 = ((MR_Box) (conv0_HeadVar__1_1));
}

void mercury__hlds__hlds_goal__init(void)
{
}

void mercury__hlds__hlds_goal__init_type_tables(void)
{
  static MR_bool initialised = MR_FALSE;
  if (initialised) return;
  initialised = MR_TRUE;

  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_goal_type_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_atomic_interface_vars_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_builtin_state_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_call_unify_context_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_can_cgc_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_case_id_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cast_kind_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_catch_part_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cell_is_unique_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_cell_to_reuse_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_conj_type_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_construct_sub_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_contains_trace_goal_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_ctgc_goal_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_coverage_goal_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_dp_goal_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_force_pruning_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_foreign_arg_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_from_ground_term_kind_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_generic_call_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_goal_is_mdprof_inst_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_goal_trivial_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_higher_order_syntax_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_higher_order_value_map_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_code_gen_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_expr_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_extra_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_hlds_goal_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_how_to_construct_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_incremental_rename_map_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_conditional_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_exist_constr_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_is_first_disjunct_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_lc_use_parent_stack_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_missed_message_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_mode_constr_goal_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_needs_update_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_port_counts_give_coverage_after_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_promise_solutions_kind_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_quant_creator_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_rbmm_goal_info_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_removable_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_reuse_description_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_scope_reason_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_short_reuse_description_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_shorthand_goal_expr_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_static_how_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_tagged_case_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_term_size_value_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_trace_mutable_var_hlds_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_try_io_state_vars_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unification_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_context_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_main_context_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_mode_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_rhs_0);
  MR_register_type_ctor_info(&hlds__hlds_goal__hlds__hlds_goal__type_ctor_info_unify_sub_context_0);
}

void mercury__hlds__hlds_goal__init_debugger(void)
{
  MR_fatal_error("debugger initialization in MLDS grade");
}

// Ensure everything is compiled with the same grade.
const char *mercury__hlds__hlds_goal__grade_check(void)
{
  return &MR_GRADE_VAR;
}

// :- end_module hlds.hlds_goal.
