/*
** Automatically generated from `parse_tree_out_type_repn.m'
** by the Mercury compiler,
** version rotd-2024-11-18
** 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 parse_tree.parse_tree_out_type_repn.
// :- implementation.

/*
INIT mercury__parse_tree__parse_tree_out_type_repn__init
ENDINIT
*/

#include "parse_tree.parse_tree_out_type_repn.mih"


#include "array.mih"
#include "assoc_list.mih"
#include "bitmap.mih"
#include "bool.mih"
#include "builtin.mih"
#include "char.mih"
#include "construct.mih"
#include "cord.mih"
#include "deconstruct.mih"
#include "enum.mih"
#include "int.mih"
#include "integer.mih"
#include "io.mih"
#include "libs.mih"
#include "list.mih"
#include "map.mih"
#include "maybe.mih"
#include "mdbcomp.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 "recompilation.mih"
#include "set.mih"
#include "set_ordlist.mih"
#include "sparse_bitset.mih"
#include "stream.mih"
#include "string.mih"
#include "term.mih"
#include "term_context.mih"
#include "term_io.mih"
#include "time.mih"
#include "tree234.mih"
#include "type_desc.mih"
#include "uint8.mih"
#include "unit.mih"
#include "univ.mih"
#include "varset.mih"
#include "libs.file_util.mih"
#include "libs.globals.mih"
#include "libs.timestamp.mih"
#include "mdbcomp.prim_data.mih"
#include "mdbcomp.sym_name.mih"
#include "parse_tree.error_spec.mih"
#include "parse_tree.maybe_error.mih"
#include "parse_tree.parse_tree_out_info.mih"
#include "parse_tree.parse_tree_out_sym_name.mih"
#include "parse_tree.parse_tree_out_term.mih"
#include "parse_tree.parse_tree_out_type.mih"
#include "parse_tree.parse_tree_output.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_item.mih"
#include "parse_tree.prog_util.mih"
#include "parse_tree.set_of_var.mih"
#include "parse_tree.var_db.mih"
#include "parse_tree.var_table.mih"
#include "recompilation.item_types.mih"
#include "string.builder.mih"
#include "string.format.mih"
#include "string.parse_util.mih"




static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0;

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__parse_tree_out_type_repn__term__pti_var_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0;

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__parse_tree_out_type_repn__term__pti_term_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0;

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_27,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word ConstantRepn_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_27,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word ConstantRepn_9,
  MR_Word STATE_VARIABLE_U_0_17,
  MR_Word * STATE_VARIABLE_U_18);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_121,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_55_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word CellLocalSectag_5,
  MR_Word S_6);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_20,
  MR_Word CellLocalSectag_5,
  MR_Word S_6);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_121,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word STATE_VARIABLE_U_0_28,
  MR_Word * STATE_VARIABLE_U_29);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_54_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word CellLocalSectag_5,
  MR_Word STATE_VARIABLE_U_0_11,
  MR_Word * STATE_VARIABLE_U_12);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_20,
  MR_Word CellLocalSectag_5,
  MR_Word STATE_VARIABLE_U_0_12,
  MR_Word * STATE_VARIABLE_U_13);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_80,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_50_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_31,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word LocalArgRepn_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_54_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_57_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_80,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word STATE_VARIABLE_U_0_21,
  MR_Word * STATE_VARIABLE_U_22);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_56_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_31,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word LocalArgRepn_9,
  MR_Word STATE_VARIABLE_U_0_16,
  MR_Word * STATE_VARIABLE_U_17);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_53_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_54_53_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_83,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word RemoteArgRepn_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_83,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word RemoteArgRepn_9,
  MR_Word STATE_VARIABLE_U_0_23,
  MR_Word * STATE_VARIABLE_U_24);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_21,
  MR_Word S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word DuRepn_12);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word EnumRepn_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepnOrEnum_10);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_23,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepnOrEnum_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_57_51_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_String X_8,
  MR_Word Xs_9,
  MR_Word S_10);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word MoreFunctorsRepn_12);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_49_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10);

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

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_71,
  MR_Word S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word OnlyFunctorRepn_12);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepn_10);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_18,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepn_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_21,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word DuRepn_12,
  MR_Word STATE_VARIABLE_U_0_19,
  MR_Word * STATE_VARIABLE_U_20);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word EnumRepn_10,
  MR_Word STATE_VARIABLE_U_0_21,
  MR_Word * STATE_VARIABLE_U_22);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepnOrEnum_10,
  MR_Word STATE_VARIABLE_U_0_17,
  MR_Word * STATE_VARIABLE_U_18);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_23,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepnOrEnum_10,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_56_54_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_String X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word MoreFunctorsRepn_12,
  MR_Word STATE_VARIABLE_U_0_22,
  MR_Word * STATE_VARIABLE_U_23);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_52_52_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15);

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

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_71,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word OnlyFunctorRepn_12,
  MR_Word STATE_VARIABLE_U_0_23,
  MR_Word * STATE_VARIABLE_U_24);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepn_10,
  MR_Word STATE_VARIABLE_U_0_17,
  MR_Word * STATE_VARIABLE_U_18);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_18,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepn_10,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15);

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

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

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

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_97,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word TVarSet_10,
  MR_Word FunctorRepn_11,
  MR_Word S_12);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_52_51_55_95_95_91_55_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_String Var_29,
  MR_String Var_30,
  MR_Word Var_31,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_55_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_10,
  MR_String FunctorName_5,
  MR_Word S_6);

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

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

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

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_97,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word TVarSet_10,
  MR_Word FunctorRepn_11,
  MR_Word STATE_VARIABLE_U_0_22,
  MR_Word * STATE_VARIABLE_U_23);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_52_53_52_95_95_91_55_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_String Var_29,
  MR_String Var_30,
  MR_Word Var_31,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_48_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_10,
  MR_String FunctorName_5,
  MR_Word STATE_VARIABLE_U_0_8,
  MR_Word * STATE_VARIABLE_U_9);

static MR_Word MR_CALL 
parse_tree__parse_tree_out_type_repn__IntroducedFrom__func__mercury_format_item_type_repn__87__1_2_f_0(
  MR_Word Context_14,
  MR_Word LambdaHeadVar__1_33);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_121,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_28,
  MR_Box * STATE_VARIABLE_U_29);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_49_48_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_cell_remote_sectag_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_20,
  MR_Word CellLocalSectag_5,
  MR_Box S_6,
  MR_Box STATE_VARIABLE_U_0_12,
  MR_Box * STATE_VARIABLE_U_13);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_cell_local_sectag_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word CellLocalSectag_5,
  MR_Box S_6,
  MR_Box STATE_VARIABLE_U_0_11,
  MR_Box * STATE_VARIABLE_U_12);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_80,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_21,
  MR_Box * STATE_VARIABLE_U_22);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_49_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_local_arg_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_31,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word LocalArgRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_16,
  MR_Box * STATE_VARIABLE_U_17);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_48_57_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_50_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_remote_arg_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_83,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word RemoteArgRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_23,
  MR_Box * STATE_VARIABLE_U_24);

static MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__nl_indent_for_humans_2_f_0(
  MR_Word TypeRepnFor_4,
  MR_Integer Indent_5);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_constant_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_27,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word ConstantRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_17,
  MR_Box * STATE_VARIABLE_U_18);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_type_repn_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_21,
  MR_Box S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word DuRepn_12,
  MR_Box STATE_VARIABLE_U_0_19,
  MR_Box * STATE_VARIABLE_U_20);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_more_functors_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Box S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word MoreFunctorsRepn_12,
  MR_Box STATE_VARIABLE_U_0_22,
  MR_Box * STATE_VARIABLE_U_23);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_49_57_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15);

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

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

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

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_97,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word TVarSet_10,
  MR_Word FunctorRepn_11,
  MR_Box S_12,
  MR_Box STATE_VARIABLE_U_0_22,
  MR_Box * STATE_VARIABLE_U_23);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_49_52_95_95_91_55_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_String Var_29,
  MR_String Var_30,
  MR_Word Var_31,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_10,
  MR_String FunctorName_5,
  MR_Box S_6,
  MR_Box STATE_VARIABLE_U_0_8,
  MR_Box * STATE_VARIABLE_U_9);

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

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_71,
  MR_Box S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word OnlyFunctorRepn_12,
  MR_Box STATE_VARIABLE_U_0_23,
  MR_Box * STATE_VARIABLE_U_24);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_48_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_65,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word WriteX_10,
  MR_Word CRepns_11,
  MR_Box S_12,
  MR_Box STATE_VARIABLE_U_0_21,
  MR_Box * STATE_VARIABLE_U_22);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepn_10,
  MR_Box STATE_VARIABLE_U_0_17,
  MR_Box * STATE_VARIABLE_U_18);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_18,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepn_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15);

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_enum_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word EnumRepn_10,
  MR_Box STATE_VARIABLE_U_0_21,
  MR_Box * STATE_VARIABLE_U_22);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_or_enum_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepnOrEnum_10,
  MR_Box STATE_VARIABLE_U_0_17,
  MR_Box * STATE_VARIABLE_U_18);

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

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

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_23,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepnOrEnum_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16);

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_51_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_String X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15);

static MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(
  MR_Integer N_3);

static MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__indent_1_f_0(
  MR_Integer N_3);


static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_1[2][2];

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_2[1][1];

static /* final */ const MR_Integer parse_tree__parse_tree_out_type_repn_scalar_common_4[1][3];

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_5[3][8];

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

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_7[6][3];

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_8[18][10];

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_9[3][11];

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_10[1][6];


struct parse_tree__parse_tree_out_type_repn__vector_common_type_3_0_s {
  const MR_String parse_tree__parse_tree_out_type_repn__vector_common_type_3_0__vct_3_f_0;
};

static /* final */ const struct parse_tree__parse_tree_out_type_repn__vector_common_type_3_0_s parse_tree__parse_tree_out_type_repn_vector_common_3[14];



static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_1[2][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_tvar_type_0))
  },
  /* row   1 */
  {
    ((MR_Box) (&mercury__term__term__type_ctor_info_term_1)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0))
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_2[1][1] = {
  /* row   0 */
  { (MR_Box) (((((MR_Unsigned) 0U << 4)) | (((((MR_Unsigned) 0U << 3)) | (((((MR_Unsigned) 0U << 2)) | (((MR_Unsigned) 0U << 1)))))))) },
};

static /* final */ const MR_Integer parse_tree__parse_tree_out_type_repn_scalar_common_4[1][3] = {
  /* row   0 */
  {
    (MR_Integer) 2,
    (MR_Integer) 67663,
    (MR_Integer) 67695
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_5[3][8] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 5)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   1 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 5)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row   2 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 5)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_6[1][5] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0))
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_7[6][3] = {
  /* row   0 */
  {
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_6[0])),
    ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0_2)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   1 */
  {
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_6[0])),
    ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   2 */
  {
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_6[0])),
    ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   3 */
  {
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_6[0])),
    ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   4 */
  {
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_6[0])),
    ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1)),
    ((MR_Box) ((MR_Integer) 0))
  },
  /* row   5 */
  {
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_6[0])),
    ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2)),
    ((MR_Box) ((MR_Integer) 0))
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_8[18][10] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_only_nonconstant_repn_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   1 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_var_name_print_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   2 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_constant_repn_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   3 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_more_nonconstant_repn_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   4 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   5 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   6 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_constant_repn_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row   7 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_more_nonconstant_repn_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row   8 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_var_name_print_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row   9 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_constant_repn_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
  /* row  10 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_more_nonconstant_repn_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
  /* row  11 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_var_name_print_0)),
    ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
  /* row  12 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_only_nonconstant_repn_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row  13 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_only_nonconstant_repn_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
  /* row  14 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row  15 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row  16 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
  /* row  17 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 7)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_9[3][11] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_4[0])),
    ((MR_Box) ((MR_Integer) 8)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_gen_du_functor_repn_0)),
    ((MR_Box) ((MR_Integer) 1)),
    ((MR_Box) ((MR_Integer) 2)),
    ((MR_Box) ((MR_Integer) 2))
  },
  /* row   1 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 8)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_gen_du_functor_repn_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_handle_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__string__builder__string__builder__type_ctor_info_state_0))
  },
  /* row   2 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 8)),
    ((MR_Box) (&mercury__private_builtin__private_builtin__type_ctor_info_typeclass_info_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_info__parse_tree__parse_tree_out_info__type_ctor_info_type_repn_for_0)),
    ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_int_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_gen_du_functor_repn_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_text_output_stream_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0)),
    ((MR_Box) (&mercury__io__io__type_ctor_info_state_0))
  },
};

static /* final */ const MR_Box parse_tree__parse_tree_out_type_repn_scalar_common_10[1][6] = {
  /* row   0 */
  {
    NULL,
    ((MR_Box) (NULL)),
    ((MR_Box) ((MR_Integer) 3)),
    ((MR_Box) (&mercury__term_context__term_context__type_ctor_info_term_context_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__term__pti_var_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0)),
    ((MR_Box) (&parse_tree__parse_tree_out_type_repn__term__pti_term_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0))
  },
};


static /* final */ const struct parse_tree__parse_tree_out_type_repn__vector_common_type_3_0_s parse_tree__parse_tree_out_type_repn_vector_common_3[14] = {
  /* row   0 */   { (MR_String) "" },
  /* row   1 */   { (MR_String) "    " },
  /* row   2 */   { (MR_String) "        " },
  /* row   3 */   { (MR_String) "            " },
  /* row   4 */   { (MR_String) "                " },
  /* row   5 */   { (MR_String) "                    " },
  /* row   6 */   { (MR_String) "                        " },
  /* row   7 */   { (MR_String) "\n" },
  /* row   8 */   { (MR_String) "\n    " },
  /* row   9 */   { (MR_String) "\n        " },
  /* row  10 */   { (MR_String) "\n            " },
  /* row  11 */   { (MR_String) "\n                " },
  /* row  12 */   { (MR_String) "\n                    " },
  /* row  13 */   { (MR_String) "\n                        " },
};


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


static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__parse_tree_out_type_repn__varset__pti_varset_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0 = {
  &mercury__varset__varset__type_ctor_info_varset_1,
  { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0) }
};

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__parse_tree_out_type_repn__term__pti_var_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0 = {
  &mercury__term__term__type_ctor_info_var_1,
  { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0) }
};

static const MR_FA_PseudoTypeInfo_Struct1 parse_tree__parse_tree_out_type_repn__term__pti_term_1__plain_parse_tree__prog_data__type_ctor_info_tvar_type_0 = {
  &mercury__term__term__type_ctor_info_term_1,
  { (MR_PseudoTypeInfo) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0) }
};

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_105_116_101_109_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_5_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_Word conv2_LambdaHeadVar__2_34;

  conv2_LambdaHeadVar__2_34 = parse_tree__parse_tree_out_type_repn__IntroducedFrom__func__mercury_format_item_type_repn__87__1_2_f_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv2_LambdaHeadVar__2_34));
  return wrapper_arg_2;
}

void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_105_116_101_109_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_5_p_0(
  MR_Word TypeClassInfo_for_pt_output_100,
  MR_Word Info_6,
  MR_Word S_7,
  MR_Word ItemTypeRepn_8)
{
  MR_Word TypeCtorSymName0_10 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 0))));
  MR_Word TypeParams_11 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 1))));
  MR_Word RepnInfo_12 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 2))));
  MR_Word TVarSet_13 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 3))));
  MR_Word Context_14 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 4))));
  MR_Word TypeCtorSymName_16;
  MR_Word Args_17;
  MR_Word TypeTerm_19;
  MR_Word Var_32;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  MR_Box conv1_STATE_VARIABLE_U_31_31;
  void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv4_STATE_VARIABLE_U_39_39;
  void MR_CALL (* func_51)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv52_STATE_VARIABLE_U_29;

  func_0(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ":- type_representation(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_31_31);
  parse_tree__parse_tree_out_info__maybe_unqualify_sym_name_3_p_0(Info_6, TypeCtorSymName0_10, &TypeCtorSymName_16);
  {
    Var_32 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_32, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_10[0]));
    MR_hl_field(0, Var_32, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_105_116_101_109_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_5_p_0_1));
    MR_hl_field(0, Var_32, 2) = ((MR_Box) ((MR_Integer) 1));
    MR_hl_field(0, Var_32, 3) = ((MR_Box) (Context_14));
  }
  Args_17 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_1[0]), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_1[1]), Var_32, TypeParams_11);
  parse_tree__prog_util__construct_qualified_term_with_context_4_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0), TypeCtorSymName_16, Args_17, Context_14, &TypeTerm_19);
  parse_tree__parse_tree_out_term__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_101_114_109_95_110_113_95_118_115_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0), TypeClassInfo_for_pt_output_100, TVarSet_13, (MR_Integer) 2, (MR_Integer) 0, TypeTerm_19, S_7);
  func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  func_3(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv4_STATE_VARIABLE_U_39_39);
  switch (MR_tag((MR_Word) RepnInfo_12)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        void MR_CALL (* func_49)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv50_STATE_VARIABLE_U_45_45;

        func_49(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_word_aligned_ptr")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv50_STATE_VARIABLE_U_45_45);
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word EqvType_20 = ((MR_Word) ((MR_hl_field(1, RepnInfo_12, (MR_Integer) 0))));
        void MR_CALL (* func_37)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv38_STATE_VARIABLE_U_41_41;
        void MR_CALL (* func_39)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv40_STATE_VARIABLE_U_45_45;

        func_37(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_eqv_to(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv38_STATE_VARIABLE_U_41_41);
        parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_100, TVarSet_13, (MR_Integer) 2, EqvType_20, S_7);
        func_39 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_39(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv40_STATE_VARIABLE_U_45_45);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word SuperTypeCtor_21 = ((MR_Word) ((MR_hl_field(2, RepnInfo_12, (MR_Integer) 0))));
        MR_Word SuperTypeCtorSymName_22;
        MR_Integer SuperTypeArity_23;
        void MR_CALL (* func_41)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv42_STATE_VARIABLE_U_47_47;
        void MR_CALL (* func_43)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv44_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_45)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv46_STATE_VARIABLE_U_51_51;
        void MR_CALL (* func_47)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv48_STATE_VARIABLE_U_45_45;

        func_41(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_subtype_of(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv42_STATE_VARIABLE_U_47_47);
        SuperTypeCtorSymName_22 = ((MR_Word) ((MR_hl_field(0, SuperTypeCtor_21, (MR_Integer) 0))));
        SuperTypeArity_23 = ((MR_Integer) ((MR_hl_field(0, SuperTypeCtor_21, (MR_Integer) 1))));
        parse_tree__parse_tree_out_sym_name__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_115_121_109_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_100, SuperTypeCtorSymName_22, S_7);
        func_43 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_43(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "/")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv44_STATE_VARIABLE_U_50_50);
        func_45 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 10))));
        func_45(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (SuperTypeArity_23)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv46_STATE_VARIABLE_U_51_51);
        func_47 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_47(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv48_STATE_VARIABLE_U_45_45);
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word DuRepn_24 = ((MR_Word) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 1))));
            MR_Word TypeRepnFor_25;

            TypeRepnFor_25 = parse_tree__parse_tree_out_info__get_type_repn_for_1_f_0(Info_6);
            switch (TypeRepnFor_25) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 1:
                {
                  MR_String I_26;
                  void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv6_STATE_VARIABLE_U_64_64;
                  void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv8_STATE_VARIABLE_U_65_65;
                  void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv10_STATE_VARIABLE_U_67_67;
                  void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv12_STATE_VARIABLE_U_71_71;
                  void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv14_STATE_VARIABLE_U_72_72;
                  void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv16_STATE_VARIABLE_U_45_45;

                  I_26 = parse_tree__parse_tree_out_type_repn__indent_1_f_0((MR_Integer) 1);
                  func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_5(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv6_STATE_VARIABLE_U_64_64);
                  func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_7(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_26)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv8_STATE_VARIABLE_U_65_65);
                  func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_9(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "du_repn(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv10_STATE_VARIABLE_U_67_67);
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_25, (MR_Integer) 2, TVarSet_13, DuRepn_24);
                  func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_11(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv12_STATE_VARIABLE_U_71_71);
                  func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_13(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_26)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv14_STATE_VARIABLE_U_72_72);
                  func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_15(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv16_STATE_VARIABLE_U_45_45);
                }
                break;
              case (MR_Integer) 0:
                {
                  void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  MR_Box conv18_STATE_VARIABLE_U_57_57;
                  void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv20_STATE_VARIABLE_U_45_45;

                  func_17(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " du_repn(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv18_STATE_VARIABLE_U_57_57);
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_25, (MR_Integer) 2, TVarSet_13, DuRepn_24);
                  func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_19(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv20_STATE_VARIABLE_U_45_45);
                }
                break;
            }
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word MaybeCJCsRepn_27 = ((MR_Word) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 1))));
            MR_Word TypeRepnFor_99;

            TypeRepnFor_99 = parse_tree__parse_tree_out_info__get_type_repn_for_1_f_0(Info_6);
            switch (TypeRepnFor_99) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 1:
                {
                  MR_String I_97;
                  void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv22_STATE_VARIABLE_U_83_83;
                  void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv24_STATE_VARIABLE_U_84_84;
                  void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv26_STATE_VARIABLE_U_86_86;
                  void MR_CALL (* func_27)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv28_STATE_VARIABLE_U_90_90;
                  void MR_CALL (* func_29)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv30_STATE_VARIABLE_U_91_91;
                  void MR_CALL (* func_31)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv32_STATE_VARIABLE_U_45_45;

                  I_97 = parse_tree__parse_tree_out_type_repn__indent_1_f_0((MR_Integer) 1);
                  func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_21(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv22_STATE_VARIABLE_U_83_83);
                  func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_23(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_97)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv24_STATE_VARIABLE_U_84_84);
                  func_25 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_25(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "foreign_type_repn(\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv26_STATE_VARIABLE_U_86_86);
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_99, (MR_Integer) 2, MaybeCJCsRepn_27);
                  func_27 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_27(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv28_STATE_VARIABLE_U_90_90);
                  func_29 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_29(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_97)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv30_STATE_VARIABLE_U_91_91);
                  func_31 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_31(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv32_STATE_VARIABLE_U_45_45);
                }
                break;
              case (MR_Integer) 0:
                {
                  void MR_CALL (* func_33)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  MR_Box conv34_STATE_VARIABLE_U_76_76;
                  void MR_CALL (* func_35)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv36_STATE_VARIABLE_U_45_45;

                  func_33(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " foreign_type_repn(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv34_STATE_VARIABLE_U_76_76);
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_99, (MR_Integer) 2, MaybeCJCsRepn_27);
                  func_35 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_35(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv36_STATE_VARIABLE_U_45_45);
                }
                break;
            }
          }
          break;
      }
      break;
  }
  func_51 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  func_51(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ").\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv52_STATE_VARIABLE_U_29);
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_105_116_101_109_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_5_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_Word conv2_LambdaHeadVar__2_34;

  conv2_LambdaHeadVar__2_34 = parse_tree__parse_tree_out_type_repn__IntroducedFrom__func__mercury_format_item_type_repn__87__1_2_f_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv2_LambdaHeadVar__2_34));
  return wrapper_arg_2;
}

void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_105_116_101_109_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_5_p_0(
  MR_Word TypeClassInfo_for_pt_output_100,
  MR_Word Info_6,
  MR_Word ItemTypeRepn_8,
  MR_Word STATE_VARIABLE_U_0_28,
  MR_Word * STATE_VARIABLE_U_29)
{
  MR_Word TypeCtorSymName0_10 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 0))));
  MR_Word TypeParams_11 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 1))));
  MR_Word RepnInfo_12 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 2))));
  MR_Word TVarSet_13 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 3))));
  MR_Word Context_14 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 4))));
  MR_Word TypeCtorSymName_16;
  MR_Word Args_17;
  MR_Word TypeTerm_19;
  MR_Word STATE_VARIABLE_U_31_31;
  MR_Word Var_32;
  MR_Word STATE_VARIABLE_U_37_37;
  MR_Word STATE_VARIABLE_U_39_39;
  MR_Word STATE_VARIABLE_U_45_45;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  MR_Box conv1_STATE_VARIABLE_U_31_31;
  void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv4_STATE_VARIABLE_U_39_39;
  void MR_CALL (* func_51)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv52_STATE_VARIABLE_U_29;

  func_0(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ":- type_representation(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_28)), &conv1_STATE_VARIABLE_U_31_31);
  STATE_VARIABLE_U_31_31 = ((MR_Word) (conv1_STATE_VARIABLE_U_31_31));
  parse_tree__parse_tree_out_info__maybe_unqualify_sym_name_3_p_0(Info_6, TypeCtorSymName0_10, &TypeCtorSymName_16);
  {
    Var_32 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_32, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_10[0]));
    MR_hl_field(0, Var_32, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_105_116_101_109_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_5_p_0_1));
    MR_hl_field(0, Var_32, 2) = ((MR_Box) ((MR_Integer) 1));
    MR_hl_field(0, Var_32, 3) = ((MR_Box) (Context_14));
  }
  Args_17 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_1[0]), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_1[1]), Var_32, TypeParams_11);
  parse_tree__prog_util__construct_qualified_term_with_context_4_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0), TypeCtorSymName_16, Args_17, Context_14, &TypeTerm_19);
  parse_tree__parse_tree_out_term__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_101_114_109_95_110_113_95_118_115_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0), TypeClassInfo_for_pt_output_100, TVarSet_13, (MR_Integer) 2, (MR_Integer) 0, TypeTerm_19, STATE_VARIABLE_U_31_31, &STATE_VARIABLE_U_37_37);
  func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  func_3(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_37_37)), &conv4_STATE_VARIABLE_U_39_39);
  STATE_VARIABLE_U_39_39 = ((MR_Word) (conv4_STATE_VARIABLE_U_39_39));
  switch (MR_tag((MR_Word) RepnInfo_12)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        void MR_CALL (* func_49)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv50_STATE_VARIABLE_U_45_45;

        func_49(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_word_aligned_ptr")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv50_STATE_VARIABLE_U_45_45);
        STATE_VARIABLE_U_45_45 = ((MR_Word) (conv50_STATE_VARIABLE_U_45_45));
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word EqvType_20 = ((MR_Word) ((MR_hl_field(1, RepnInfo_12, (MR_Integer) 0))));
        MR_Word STATE_VARIABLE_U_41_41;
        MR_Word STATE_VARIABLE_U_43_43;
        void MR_CALL (* func_37)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv38_STATE_VARIABLE_U_41_41;
        void MR_CALL (* func_39)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv40_STATE_VARIABLE_U_45_45;

        func_37(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_eqv_to(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv38_STATE_VARIABLE_U_41_41);
        STATE_VARIABLE_U_41_41 = ((MR_Word) (conv38_STATE_VARIABLE_U_41_41));
        parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_100, TVarSet_13, (MR_Integer) 2, EqvType_20, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_43_43);
        func_39 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_39(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_43_43)), &conv40_STATE_VARIABLE_U_45_45);
        STATE_VARIABLE_U_45_45 = ((MR_Word) (conv40_STATE_VARIABLE_U_45_45));
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word SuperTypeCtor_21 = ((MR_Word) ((MR_hl_field(2, RepnInfo_12, (MR_Integer) 0))));
        MR_Word SuperTypeCtorSymName_22;
        MR_Integer SuperTypeArity_23;
        MR_Word STATE_VARIABLE_U_47_47;
        MR_Word STATE_VARIABLE_U_48_48;
        MR_Word STATE_VARIABLE_U_50_50;
        MR_Word STATE_VARIABLE_U_51_51;
        void MR_CALL (* func_41)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv42_STATE_VARIABLE_U_47_47;
        void MR_CALL (* func_43)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv44_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_45)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv46_STATE_VARIABLE_U_51_51;
        void MR_CALL (* func_47)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv48_STATE_VARIABLE_U_45_45;

        func_41(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_subtype_of(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv42_STATE_VARIABLE_U_47_47);
        STATE_VARIABLE_U_47_47 = ((MR_Word) (conv42_STATE_VARIABLE_U_47_47));
        SuperTypeCtorSymName_22 = ((MR_Word) ((MR_hl_field(0, SuperTypeCtor_21, (MR_Integer) 0))));
        SuperTypeArity_23 = ((MR_Integer) ((MR_hl_field(0, SuperTypeCtor_21, (MR_Integer) 1))));
        parse_tree__parse_tree_out_sym_name__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_115_121_109_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_100, SuperTypeCtorSymName_22, STATE_VARIABLE_U_47_47, &STATE_VARIABLE_U_48_48);
        func_43 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_43(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "/")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_48_48)), &conv44_STATE_VARIABLE_U_50_50);
        STATE_VARIABLE_U_50_50 = ((MR_Word) (conv44_STATE_VARIABLE_U_50_50));
        func_45 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 10))));
        func_45(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (SuperTypeArity_23)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_50_50)), &conv46_STATE_VARIABLE_U_51_51);
        STATE_VARIABLE_U_51_51 = ((MR_Word) (conv46_STATE_VARIABLE_U_51_51));
        func_47 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_47(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_51_51)), &conv48_STATE_VARIABLE_U_45_45);
        STATE_VARIABLE_U_45_45 = ((MR_Word) (conv48_STATE_VARIABLE_U_45_45));
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word DuRepn_24 = ((MR_Word) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 1))));
            MR_Word TypeRepnFor_25;

            TypeRepnFor_25 = parse_tree__parse_tree_out_info__get_type_repn_for_1_f_0(Info_6);
            switch (TypeRepnFor_25) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 1:
                {
                  MR_String I_26;
                  MR_Word STATE_VARIABLE_U_64_64;
                  MR_Word STATE_VARIABLE_U_65_65;
                  MR_Word STATE_VARIABLE_U_67_67;
                  MR_Word STATE_VARIABLE_U_69_69;
                  MR_Word STATE_VARIABLE_U_71_71;
                  MR_Word STATE_VARIABLE_U_72_72;
                  void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv6_STATE_VARIABLE_U_64_64;
                  void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv8_STATE_VARIABLE_U_65_65;
                  void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv10_STATE_VARIABLE_U_67_67;
                  void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv12_STATE_VARIABLE_U_71_71;
                  void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv14_STATE_VARIABLE_U_72_72;
                  void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv16_STATE_VARIABLE_U_45_45;

                  I_26 = parse_tree__parse_tree_out_type_repn__indent_1_f_0((MR_Integer) 1);
                  func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_5(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv6_STATE_VARIABLE_U_64_64);
                  STATE_VARIABLE_U_64_64 = ((MR_Word) (conv6_STATE_VARIABLE_U_64_64));
                  func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_7(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_26)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_64_64)), &conv8_STATE_VARIABLE_U_65_65);
                  STATE_VARIABLE_U_65_65 = ((MR_Word) (conv8_STATE_VARIABLE_U_65_65));
                  func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_9(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "du_repn(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_65_65)), &conv10_STATE_VARIABLE_U_67_67);
                  STATE_VARIABLE_U_67_67 = ((MR_Word) (conv10_STATE_VARIABLE_U_67_67));
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_100, TypeRepnFor_25, (MR_Integer) 2, TVarSet_13, DuRepn_24, STATE_VARIABLE_U_67_67, &STATE_VARIABLE_U_69_69);
                  func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_11(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_69_69)), &conv12_STATE_VARIABLE_U_71_71);
                  STATE_VARIABLE_U_71_71 = ((MR_Word) (conv12_STATE_VARIABLE_U_71_71));
                  func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_13(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_26)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_71_71)), &conv14_STATE_VARIABLE_U_72_72);
                  STATE_VARIABLE_U_72_72 = ((MR_Word) (conv14_STATE_VARIABLE_U_72_72));
                  func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_15(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_72_72)), &conv16_STATE_VARIABLE_U_45_45);
                  STATE_VARIABLE_U_45_45 = ((MR_Word) (conv16_STATE_VARIABLE_U_45_45));
                }
                break;
              case (MR_Integer) 0:
                {
                  MR_Word STATE_VARIABLE_U_57_57;
                  MR_Word STATE_VARIABLE_U_59_59;
                  void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  MR_Box conv18_STATE_VARIABLE_U_57_57;
                  void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv20_STATE_VARIABLE_U_45_45;

                  func_17(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " du_repn(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv18_STATE_VARIABLE_U_57_57);
                  STATE_VARIABLE_U_57_57 = ((MR_Word) (conv18_STATE_VARIABLE_U_57_57));
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_100, TypeRepnFor_25, (MR_Integer) 2, TVarSet_13, DuRepn_24, STATE_VARIABLE_U_57_57, &STATE_VARIABLE_U_59_59);
                  func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_19(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_59_59)), &conv20_STATE_VARIABLE_U_45_45);
                  STATE_VARIABLE_U_45_45 = ((MR_Word) (conv20_STATE_VARIABLE_U_45_45));
                }
                break;
            }
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word MaybeCJCsRepn_27 = ((MR_Word) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 1))));
            MR_Word TypeRepnFor_99;

            TypeRepnFor_99 = parse_tree__parse_tree_out_info__get_type_repn_for_1_f_0(Info_6);
            switch (TypeRepnFor_99) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 1:
                {
                  MR_Word STATE_VARIABLE_U_83_83;
                  MR_Word STATE_VARIABLE_U_84_84;
                  MR_Word STATE_VARIABLE_U_86_86;
                  MR_Word STATE_VARIABLE_U_88_88;
                  MR_Word STATE_VARIABLE_U_90_90;
                  MR_Word STATE_VARIABLE_U_91_91;
                  MR_String I_97;
                  void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv22_STATE_VARIABLE_U_83_83;
                  void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv24_STATE_VARIABLE_U_84_84;
                  void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv26_STATE_VARIABLE_U_86_86;
                  void MR_CALL (* func_27)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv28_STATE_VARIABLE_U_90_90;
                  void MR_CALL (* func_29)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv30_STATE_VARIABLE_U_91_91;
                  void MR_CALL (* func_31)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv32_STATE_VARIABLE_U_45_45;

                  I_97 = parse_tree__parse_tree_out_type_repn__indent_1_f_0((MR_Integer) 1);
                  func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_21(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv22_STATE_VARIABLE_U_83_83);
                  STATE_VARIABLE_U_83_83 = ((MR_Word) (conv22_STATE_VARIABLE_U_83_83));
                  func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_23(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_97)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_83_83)), &conv24_STATE_VARIABLE_U_84_84);
                  STATE_VARIABLE_U_84_84 = ((MR_Word) (conv24_STATE_VARIABLE_U_84_84));
                  func_25 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_25(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "foreign_type_repn(\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_84_84)), &conv26_STATE_VARIABLE_U_86_86);
                  STATE_VARIABLE_U_86_86 = ((MR_Word) (conv26_STATE_VARIABLE_U_86_86));
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_100, TypeRepnFor_99, (MR_Integer) 2, MaybeCJCsRepn_27, STATE_VARIABLE_U_86_86, &STATE_VARIABLE_U_88_88);
                  func_27 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_27(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_88_88)), &conv28_STATE_VARIABLE_U_90_90);
                  STATE_VARIABLE_U_90_90 = ((MR_Word) (conv28_STATE_VARIABLE_U_90_90));
                  func_29 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_29(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_97)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_90_90)), &conv30_STATE_VARIABLE_U_91_91);
                  STATE_VARIABLE_U_91_91 = ((MR_Word) (conv30_STATE_VARIABLE_U_91_91));
                  func_31 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_31(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_91_91)), &conv32_STATE_VARIABLE_U_45_45);
                  STATE_VARIABLE_U_45_45 = ((MR_Word) (conv32_STATE_VARIABLE_U_45_45));
                }
                break;
              case (MR_Integer) 0:
                {
                  MR_Word STATE_VARIABLE_U_76_76;
                  MR_Word STATE_VARIABLE_U_78_78;
                  void MR_CALL (* func_33)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  MR_Box conv34_STATE_VARIABLE_U_76_76;
                  void MR_CALL (* func_35)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  MR_Box conv36_STATE_VARIABLE_U_45_45;

                  func_33(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " foreign_type_repn(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv34_STATE_VARIABLE_U_76_76);
                  STATE_VARIABLE_U_76_76 = ((MR_Word) (conv34_STATE_VARIABLE_U_76_76));
                  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_100, TypeRepnFor_99, (MR_Integer) 2, MaybeCJCsRepn_27, STATE_VARIABLE_U_76_76, &STATE_VARIABLE_U_78_78);
                  func_35 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_35(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_78_78)), &conv36_STATE_VARIABLE_U_45_45);
                  STATE_VARIABLE_U_45_45 = ((MR_Word) (conv36_STATE_VARIABLE_U_45_45));
                }
                break;
            }
          }
          break;
      }
      break;
  }
  func_51 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  func_51(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ").\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_45_45)), &conv52_STATE_VARIABLE_U_29);
  *STATE_VARIABLE_U_29 = ((MR_Word) (conv52_STATE_VARIABLE_U_29));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_27,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word ConstantRepn_9,
  MR_Word S_10)
{
  MR_String NlI_12;
  MR_Unsigned Sectag_13;
  MR_Word SectagWordOrSize_14;
  MR_String SectagWordOrSizeStr_15;
  MR_String Str_16;
  MR_String Var_29;
  MR_String Var_31;
  MR_String Var_33;
  MR_String Var_40;
  MR_String Var_42;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_18;

  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
      break;
    case (MR_Integer) 0:
      NlI_12 = (MR_String) " ";
      break;
  }
  Sectag_13 = ((MR_Unsigned) ((MR_hl_field(0, ConstantRepn_9, (MR_Integer) 0))));
  SectagWordOrSize_14 = ((MR_Word) ((MR_hl_field(0, ConstantRepn_9, (MR_Integer) 1))));
  if (((MR_tag((MR_Word) SectagWordOrSize_14)) == (MR_Integer) 1))
  {
    uint8_t NumBits_52 = ((uint8_t) (MR_Word) (MR_hl_field(1, SectagWordOrSize_14, (MR_Integer) 0)));
    MR_Unsigned Var_67;
    MR_String Var_68;
    MR_String Var_75;

    mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_52, &Var_67);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_67, &Var_68);
    Var_75 = mercury__string__f_43_43_2_f_0(Var_68, (MR_String) ")");
    SectagWordOrSizeStr_15 = mercury__string__f_43_43_2_f_0((MR_String) "lst_part(", Var_75);
  }
  else
  {
    uint8_t NumBits_43 = ((uint8_t) (MR_Word) (MR_hl_field(0, SectagWordOrSize_14, (MR_Integer) 0)));
    MR_Unsigned Var_55;
    MR_String Var_56;
    MR_String Var_63;

    mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_43, &Var_55);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_55, &Var_56);
    Var_63 = mercury__string__f_43_43_2_f_0(Var_56, (MR_String) ")");
    SectagWordOrSizeStr_15 = mercury__string__f_43_43_2_f_0((MR_String) "lst_rest(", Var_63);
  }
  Var_29 = mercury__string__f_43_43_2_f_0(SectagWordOrSizeStr_15, (MR_String) ")");
  Var_31 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_29);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_13, &Var_33);
  Var_40 = mercury__string__f_43_43_2_f_0(Var_33, Var_31);
  Var_42 = mercury__string__f_43_43_2_f_0((MR_String) "constant(", Var_40);
  Str_16 = mercury__string__f_43_43_2_f_0(NlI_12, Var_42);
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_27, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_27)), ((MR_Box) (Str_16)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_18);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_27,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word ConstantRepn_9,
  MR_Word STATE_VARIABLE_U_0_17,
  MR_Word * STATE_VARIABLE_U_18)
{
  MR_String NlI_12;
  MR_Unsigned Sectag_13;
  MR_Word SectagWordOrSize_14;
  MR_String SectagWordOrSizeStr_15;
  MR_String Str_16;
  MR_String Var_29;
  MR_String Var_31;
  MR_String Var_33;
  MR_String Var_40;
  MR_String Var_42;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_18;

  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
      break;
    case (MR_Integer) 0:
      NlI_12 = (MR_String) " ";
      break;
  }
  Sectag_13 = ((MR_Unsigned) ((MR_hl_field(0, ConstantRepn_9, (MR_Integer) 0))));
  SectagWordOrSize_14 = ((MR_Word) ((MR_hl_field(0, ConstantRepn_9, (MR_Integer) 1))));
  if (((MR_tag((MR_Word) SectagWordOrSize_14)) == (MR_Integer) 1))
  {
    uint8_t NumBits_52 = ((uint8_t) (MR_Word) (MR_hl_field(1, SectagWordOrSize_14, (MR_Integer) 0)));
    MR_Unsigned Var_67;
    MR_String Var_68;
    MR_String Var_75;

    mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_52, &Var_67);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_67, &Var_68);
    Var_75 = mercury__string__f_43_43_2_f_0(Var_68, (MR_String) ")");
    SectagWordOrSizeStr_15 = mercury__string__f_43_43_2_f_0((MR_String) "lst_part(", Var_75);
  }
  else
  {
    uint8_t NumBits_43 = ((uint8_t) (MR_Word) (MR_hl_field(0, SectagWordOrSize_14, (MR_Integer) 0)));
    MR_Unsigned Var_55;
    MR_String Var_56;
    MR_String Var_63;

    mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_43, &Var_55);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_55, &Var_56);
    Var_63 = mercury__string__f_43_43_2_f_0(Var_56, (MR_String) ")");
    SectagWordOrSizeStr_15 = mercury__string__f_43_43_2_f_0((MR_String) "lst_rest(", Var_63);
  }
  Var_29 = mercury__string__f_43_43_2_f_0(SectagWordOrSizeStr_15, (MR_String) ")");
  Var_31 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_29);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_13, &Var_33);
  Var_40 = mercury__string__f_43_43_2_f_0(Var_33, Var_31);
  Var_42 = mercury__string__f_43_43_2_f_0((MR_String) "constant(", Var_40);
  Str_16 = mercury__string__f_43_43_2_f_0(NlI_12, Var_42);
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_27, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_27)), ((MR_Box) (Str_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv1_STATE_VARIABLE_U_18);
  *STATE_VARIABLE_U_18 = ((MR_Word) (conv1_STATE_VARIABLE_U_18));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_121,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word S_10)
{
  switch (MR_tag((MR_Word) NonConstantRepn_9)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word LocalRepn_12 = (MR_Word) ((MR_Word) (NonConstantRepn_9));
        MR_Word CellLocalSectag_13 = ((MR_Word) ((MR_hl_field(0, LocalRepn_12, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_14 = ((MR_Word) ((MR_hl_field(0, LocalRepn_12, (MR_Integer) 1))));

        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_String I_17;
              MR_Integer Var_50;
              MR_Word Var_52;
              MR_Integer Var_55;
              MR_Word HeadLocalArgRepn_111;
              MR_Word TailLocalArgRepns_112;
              MR_Box conv1_STATE_VARIABLE_U_43_43;
              MR_Box conv2_STATE_VARIABLE_U_44_44;
              MR_Box conv3_STATE_VARIABLE_U_46_46;
              MR_Box conv4_STATE_VARIABLE_U_49_49;
              MR_Box conv5_STATE_VARIABLE_U_58_58;
              MR_Box conv6_STATE_VARIABLE_U_59_59;
              MR_Box conv7_STATE_VARIABLE_U_29;

              I_17 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_43_43);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_17, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv2_STATE_VARIABLE_U_44_44);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "local_cell(", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_46_46);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellLocalSectag_13, S_10);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ",", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv4_STATE_VARIABLE_U_49_49);
              HeadLocalArgRepn_111 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 0))));
              TailLocalArgRepns_112 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 1))));
              Var_50 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
              Var_55 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
              {
                Var_52 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_52, 0) = ((MR_Box) (HeadLocalArgRepn_111));
                MR_hl_field(1, Var_52, 1) = ((MR_Box) (TailLocalArgRepns_112));
              }
              parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_55_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_121, TypeRepnFor_7, Var_55, TypeClassInfo_for_pt_output_121, Var_50, Var_52, S_10);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_58_58);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_17, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv6_STATE_VARIABLE_U_59_59);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ")", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_29);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word HeadLocalArgRepn_15;
              MR_Word TailLocalArgRepns_16;
              MR_Word Var_35;
              MR_Word Var_37;
              MR_Box conv8_STATE_VARIABLE_U_31_31;
              MR_Box conv9_STATE_VARIABLE_U_34_34;
              MR_Box conv10_STATE_VARIABLE_U_38_38;
              MR_Box conv11_STATE_VARIABLE_U_29;

              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "local_cell(", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv8_STATE_VARIABLE_U_31_31);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellLocalSectag_13, S_10);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", [", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_34_34);
              HeadLocalArgRepn_15 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 0))));
              TailLocalArgRepns_16 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 1))));
              {
                Var_35 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_35, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[16]));
                MR_hl_field(0, Var_35, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
                MR_hl_field(0, Var_35, 2) = ((MR_Box) ((MR_Integer) 3));
                MR_hl_field(0, Var_35, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_121));
                MR_hl_field(0, Var_35, 4) = ((MR_Box) (TypeRepnFor_7));
                MR_hl_field(0, Var_35, 5) = ((MR_Box) ((MR_Integer) 0));
              }
              {
                Var_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_37, 0) = ((MR_Box) (HeadLocalArgRepn_15));
                MR_hl_field(1, Var_37, 1) = ((MR_Box) (TailLocalArgRepns_16));
              }
              parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0), TypeClassInfo_for_pt_output_121, Var_35, (MR_String) ", ", Var_37, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv10_STATE_VARIABLE_U_38_38);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "])", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_29);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word RemoteRepn_18 = (MR_Word) (MR_body((MR_Word) (NonConstantRepn_9), (MR_Integer) 1));
        MR_Word Ptag_19 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 0))));
        MR_Word CellRemoteSectag_20 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 1))));
        MR_Word OoMRemoteArgRepns_21 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 2))));
        uint8_t PtagUint8_22 = (uint8_t) (Ptag_19);
        MR_Unsigned PtagUint_23;

        PtagUint_23 = mercury__uint8__cast_to_uint_1_f_0(PtagUint8_22);
        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Integer Var_88;
              MR_Word Var_90;
              MR_Integer Var_93;
              MR_String I_113;
              MR_Word HeadRemoteArgRepn_114;
              MR_Word TailRemoteArgRepns_115;
              MR_Box conv12_STATE_VARIABLE_U_78_78;
              MR_Box conv13_STATE_VARIABLE_U_79_79;
              MR_Box conv14_STATE_VARIABLE_U_81_81;
              MR_Box conv15_STATE_VARIABLE_U_82_82;
              MR_Box conv16_STATE_VARIABLE_U_84_84;
              MR_Box conv17_STATE_VARIABLE_U_87_87;
              MR_Box conv18_STATE_VARIABLE_U_96_96;
              MR_Box conv19_STATE_VARIABLE_U_97_97;
              MR_Box conv20_STATE_VARIABLE_U_29;

              I_113 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv12_STATE_VARIABLE_U_78_78);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_113, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_79_79);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "remote_cell(", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv14_STATE_VARIABLE_U_81_81);
              parse_tree__parse_tree_output__add_uint_4_p_0(TypeClassInfo_for_pt_output_121, PtagUint_23, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_82_82);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", ", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv16_STATE_VARIABLE_U_84_84);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellRemoteSectag_20, S_10);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ",", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_87_87);
              HeadRemoteArgRepn_114 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 0))));
              TailRemoteArgRepns_115 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 1))));
              Var_88 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
              Var_93 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
              {
                Var_90 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_90, 0) = ((MR_Box) (HeadRemoteArgRepn_114));
                MR_hl_field(1, Var_90, 1) = ((MR_Box) (TailRemoteArgRepns_115));
              }
              parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_54_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_121, TypeRepnFor_7, Var_93, TypeClassInfo_for_pt_output_121, Var_88, Var_90, S_10);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv18_STATE_VARIABLE_U_96_96);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_113, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_97_97);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ")", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv20_STATE_VARIABLE_U_29);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word HeadRemoteArgRepn_24;
              MR_Word TailRemoteArgRepns_25;
              MR_Word Var_70;
              MR_Word Var_72;
              MR_Box conv21_STATE_VARIABLE_U_63_63;
              MR_Box conv22_STATE_VARIABLE_U_64_64;
              MR_Box conv23_STATE_VARIABLE_U_66_66;
              MR_Box conv24_STATE_VARIABLE_U_69_69;
              MR_Box conv25_STATE_VARIABLE_U_73_73;
              MR_Box conv26_STATE_VARIABLE_U_29;

              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "remote_cell(", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_63_63);
              parse_tree__parse_tree_output__add_uint_4_p_0(TypeClassInfo_for_pt_output_121, PtagUint_23, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv22_STATE_VARIABLE_U_64_64);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", ", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_66_66);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellRemoteSectag_20, S_10);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", [", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv24_STATE_VARIABLE_U_69_69);
              HeadRemoteArgRepn_24 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 0))));
              TailRemoteArgRepns_25 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 1))));
              {
                Var_70 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_70, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[17]));
                MR_hl_field(0, Var_70, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2));
                MR_hl_field(0, Var_70, 2) = ((MR_Box) ((MR_Integer) 3));
                MR_hl_field(0, Var_70, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_121));
                MR_hl_field(0, Var_70, 4) = ((MR_Box) (TypeRepnFor_7));
                MR_hl_field(0, Var_70, 5) = ((MR_Box) ((MR_Integer) 0));
              }
              {
                Var_72 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_72, 0) = ((MR_Box) (HeadRemoteArgRepn_24));
                MR_hl_field(1, Var_72, 1) = ((MR_Box) (TailRemoteArgRepns_25));
              }
              parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0), TypeClassInfo_for_pt_output_121, Var_70, (MR_String) ", ", Var_72, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_73_73);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "])", ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv26_STATE_VARIABLE_U_29);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_String Str_26;
        MR_Word Ptag_118 = ((MR_Word) ((MR_hl_field(2, NonConstantRepn_9, (MR_Integer) 0))));
        uint8_t PtagUint8_119 = (uint8_t) (Ptag_118);
        MR_Unsigned PtagUint_120;
        MR_Box conv0_STATE_VARIABLE_U_29;

        PtagUint_120 = mercury__uint8__cast_to_uint_1_f_0(PtagUint8_119);
        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_String NlI_27;
              MR_String Var_155;
              MR_String Var_162;
              MR_String Var_164;

              NlI_27 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
              mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, PtagUint_120, &Var_155);
              Var_162 = mercury__string__f_43_43_2_f_0(Var_155, (MR_String) ")");
              Var_164 = mercury__string__f_43_43_2_f_0((MR_String) "direct_arg(", Var_162);
              Str_26 = mercury__string__f_43_43_2_f_0(NlI_27, Var_164);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_String Var_144;
              MR_String Var_151;

              mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, PtagUint_120, &Var_144);
              Var_151 = mercury__string__f_43_43_2_f_0(Var_144, (MR_String) ")");
              Str_26 = mercury__string__f_43_43_2_f_0((MR_String) "direct_arg(", Var_151);
            }
            break;
        }
        parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, Str_26, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv0_STATE_VARIABLE_U_29);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_55_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word S_10)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_17_17);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv5_STATE_VARIABLE_U_20_20;
    void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv7_STATE_VARIABLE_U_22_22;
    void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv9_STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv11_STATE_VARIABLE_U_16;

    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_20_20);
    func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_6(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_22_22);
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_50_95_95_91_53_93_95_48_6_p_0(Var_28, Var_29, Var_30, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, S_10);
    func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_8(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_24_24);
    func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_10(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_16);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word CellLocalSectag_5,
  MR_Word S_6)
{
  MR_Unsigned Sectag_8 = ((MR_Unsigned) ((MR_hl_field(0, CellLocalSectag_5, (MR_Integer) 0))));
  uint8_t SectagNumBits_9 = ((uint8_t) (MR_Word) (MR_hl_field(0, CellLocalSectag_5, (MR_Integer) 1)));
  MR_String Str_10;
  MR_Unsigned Var_22;
  MR_String Var_23;
  MR_String Var_30;
  MR_String Var_32;
  MR_String Var_34;
  MR_String Var_41;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_12;

  mercury__string__format__format_cast_uint8_to_uint_2_p_0(SectagNumBits_9, &Var_22);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_22, &Var_23);
  Var_30 = mercury__string__f_43_43_2_f_0(Var_23, (MR_String) ")");
  Var_32 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_30);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_8, &Var_34);
  Var_41 = mercury__string__f_43_43_2_f_0(Var_34, Var_32);
  Str_10 = mercury__string__f_43_43_2_f_0((MR_String) "local_sectag(", Var_41);
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) (Str_10)), ((MR_Box) (S_6)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_12);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_20,
  MR_Word CellLocalSectag_5,
  MR_Word S_6)
{
  MR_String Str_8;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_13;

  if ((CellLocalSectag_5 == (MR_Word) ((MR_Unsigned) 0U)))
    Str_8 = (MR_String) "remote_no_sectag";
  else
  {
    MR_Unsigned Sectag_9 = ((MR_Unsigned) ((MR_hl_field(1, CellLocalSectag_5, (MR_Integer) 0))));
    MR_Word SectagWordOrSize_10 = ((MR_Word) ((MR_hl_field(1, CellLocalSectag_5, (MR_Integer) 1))));
    MR_String SectagWordOrSizeStr_11;
    MR_String Var_22;
    MR_String Var_24;
    MR_String Var_26;
    MR_String Var_33;

    if ((SectagWordOrSize_10 == (MR_Word) ((MR_Unsigned) 0U)))
      SectagWordOrSizeStr_11 = (MR_String) "rst_full";
    else
    {
      uint8_t NumBits_35 = ((uint8_t) (MR_Word) (MR_hl_field(1, SectagWordOrSize_10, (MR_Integer) 0)));
      MR_Unsigned Var_42;
      MR_String Var_43;
      MR_String Var_50;

      mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_35, &Var_42);
      mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_42, &Var_43);
      Var_50 = mercury__string__f_43_43_2_f_0(Var_43, (MR_String) ")");
      SectagWordOrSizeStr_11 = mercury__string__f_43_43_2_f_0((MR_String) "rst_part(", Var_50);
    }
    Var_22 = mercury__string__f_43_43_2_f_0(SectagWordOrSizeStr_11, (MR_String) ")");
    Var_24 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_22);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_9, &Var_26);
    Var_33 = mercury__string__f_43_43_2_f_0(Var_26, Var_24);
    Str_8 = mercury__string__f_43_43_2_f_0((MR_String) "remote_sectag(", Var_33);
  }
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_20, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_20)), ((MR_Box) (Str_8)), ((MR_Box) (S_6)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_13);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv26_STATE_VARIABLE_U_24;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv26_STATE_VARIABLE_U_24);
  *wrapper_arg_4 = ((MR_Box) (conv26_STATE_VARIABLE_U_24));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv10_STATE_VARIABLE_U_17;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv10_STATE_VARIABLE_U_17);
  *wrapper_arg_4 = ((MR_Box) (conv10_STATE_VARIABLE_U_17));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_121,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word STATE_VARIABLE_U_0_28,
  MR_Word * STATE_VARIABLE_U_29)
{
  switch (MR_tag((MR_Word) NonConstantRepn_9)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word LocalRepn_12 = (MR_Word) ((MR_Word) (NonConstantRepn_9));
        MR_Word CellLocalSectag_13 = ((MR_Word) ((MR_hl_field(0, LocalRepn_12, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_14 = ((MR_Word) ((MR_hl_field(0, LocalRepn_12, (MR_Integer) 1))));

        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_String I_17;
              MR_Word STATE_VARIABLE_U_43_43;
              MR_Word STATE_VARIABLE_U_44_44;
              MR_Word STATE_VARIABLE_U_46_46;
              MR_Word STATE_VARIABLE_U_47_47;
              MR_Word STATE_VARIABLE_U_49_49;
              MR_Integer Var_50;
              MR_Word Var_52;
              MR_Word STATE_VARIABLE_U_53_53;
              MR_Integer Var_55;
              MR_Word STATE_VARIABLE_U_58_58;
              MR_Word STATE_VARIABLE_U_59_59;
              MR_Word HeadLocalArgRepn_111;
              MR_Word TailLocalArgRepns_112;
              MR_Box conv1_STATE_VARIABLE_U_43_43;
              MR_Box conv2_STATE_VARIABLE_U_44_44;
              MR_Box conv3_STATE_VARIABLE_U_46_46;
              MR_Box conv4_STATE_VARIABLE_U_49_49;
              MR_Box conv5_STATE_VARIABLE_U_58_58;
              MR_Box conv6_STATE_VARIABLE_U_59_59;
              MR_Box conv7_STATE_VARIABLE_U_29;

              I_17 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_28)), &conv1_STATE_VARIABLE_U_43_43);
              STATE_VARIABLE_U_43_43 = ((MR_Word) (conv1_STATE_VARIABLE_U_43_43));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_17, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_43_43)), &conv2_STATE_VARIABLE_U_44_44);
              STATE_VARIABLE_U_44_44 = ((MR_Word) (conv2_STATE_VARIABLE_U_44_44));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "local_cell(", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_44_44)), &conv3_STATE_VARIABLE_U_46_46);
              STATE_VARIABLE_U_46_46 = ((MR_Word) (conv3_STATE_VARIABLE_U_46_46));
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellLocalSectag_13, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_47_47);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ",", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_47_47)), &conv4_STATE_VARIABLE_U_49_49);
              STATE_VARIABLE_U_49_49 = ((MR_Word) (conv4_STATE_VARIABLE_U_49_49));
              HeadLocalArgRepn_111 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 0))));
              TailLocalArgRepns_112 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 1))));
              Var_50 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
              Var_55 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
              {
                Var_52 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_52, 0) = ((MR_Box) (HeadLocalArgRepn_111));
                MR_hl_field(1, Var_52, 1) = ((MR_Box) (TailLocalArgRepns_112));
              }
              parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_54_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_121, TypeRepnFor_7, Var_55, TypeClassInfo_for_pt_output_121, Var_50, Var_52, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_53_53);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_53_53)), &conv5_STATE_VARIABLE_U_58_58);
              STATE_VARIABLE_U_58_58 = ((MR_Word) (conv5_STATE_VARIABLE_U_58_58));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_17, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_58_58)), &conv6_STATE_VARIABLE_U_59_59);
              STATE_VARIABLE_U_59_59 = ((MR_Word) (conv6_STATE_VARIABLE_U_59_59));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ")", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_59_59)), &conv7_STATE_VARIABLE_U_29);
              *STATE_VARIABLE_U_29 = ((MR_Word) (conv7_STATE_VARIABLE_U_29));
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word HeadLocalArgRepn_15;
              MR_Word TailLocalArgRepns_16;
              MR_Word STATE_VARIABLE_U_31_31;
              MR_Word STATE_VARIABLE_U_32_32;
              MR_Word STATE_VARIABLE_U_34_34;
              MR_Word Var_35;
              MR_Word Var_37;
              MR_Word STATE_VARIABLE_U_38_38;
              MR_Box conv8_STATE_VARIABLE_U_31_31;
              MR_Box conv9_STATE_VARIABLE_U_34_34;
              MR_Box conv11_STATE_VARIABLE_U_38_38;
              MR_Box conv12_STATE_VARIABLE_U_29;

              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "local_cell(", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_28)), &conv8_STATE_VARIABLE_U_31_31);
              STATE_VARIABLE_U_31_31 = ((MR_Word) (conv8_STATE_VARIABLE_U_31_31));
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellLocalSectag_13, STATE_VARIABLE_U_31_31, &STATE_VARIABLE_U_32_32);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", [", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_32_32)), &conv9_STATE_VARIABLE_U_34_34);
              STATE_VARIABLE_U_34_34 = ((MR_Word) (conv9_STATE_VARIABLE_U_34_34));
              HeadLocalArgRepn_15 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 0))));
              TailLocalArgRepns_16 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 1))));
              {
                Var_35 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_35, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[14]));
                MR_hl_field(0, Var_35, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
                MR_hl_field(0, Var_35, 2) = ((MR_Box) ((MR_Integer) 3));
                MR_hl_field(0, Var_35, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_121));
                MR_hl_field(0, Var_35, 4) = ((MR_Box) (TypeRepnFor_7));
                MR_hl_field(0, Var_35, 5) = ((MR_Box) ((MR_Integer) 0));
              }
              {
                Var_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_37, 0) = ((MR_Box) (HeadLocalArgRepn_15));
                MR_hl_field(1, Var_37, 1) = ((MR_Box) (TailLocalArgRepns_16));
              }
              parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0), TypeClassInfo_for_pt_output_121, Var_35, (MR_String) ", ", Var_37, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_34_34)), &conv11_STATE_VARIABLE_U_38_38);
              STATE_VARIABLE_U_38_38 = ((MR_Word) (conv11_STATE_VARIABLE_U_38_38));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "])", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_38_38)), &conv12_STATE_VARIABLE_U_29);
              *STATE_VARIABLE_U_29 = ((MR_Word) (conv12_STATE_VARIABLE_U_29));
            }
            break;
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word RemoteRepn_18 = (MR_Word) (MR_body((MR_Word) (NonConstantRepn_9), (MR_Integer) 1));
        MR_Word Ptag_19 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 0))));
        MR_Word CellRemoteSectag_20 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 1))));
        MR_Word OoMRemoteArgRepns_21 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 2))));
        uint8_t PtagUint8_22 = (uint8_t) (Ptag_19);
        MR_Unsigned PtagUint_23;

        PtagUint_23 = mercury__uint8__cast_to_uint_1_f_0(PtagUint8_22);
        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word STATE_VARIABLE_U_78_78;
              MR_Word STATE_VARIABLE_U_79_79;
              MR_Word STATE_VARIABLE_U_81_81;
              MR_Word STATE_VARIABLE_U_82_82;
              MR_Word STATE_VARIABLE_U_84_84;
              MR_Word STATE_VARIABLE_U_85_85;
              MR_Word STATE_VARIABLE_U_87_87;
              MR_Integer Var_88;
              MR_Word Var_90;
              MR_Word STATE_VARIABLE_U_91_91;
              MR_Integer Var_93;
              MR_Word STATE_VARIABLE_U_96_96;
              MR_Word STATE_VARIABLE_U_97_97;
              MR_String I_113;
              MR_Word HeadRemoteArgRepn_114;
              MR_Word TailRemoteArgRepns_115;
              MR_Box conv13_STATE_VARIABLE_U_78_78;
              MR_Box conv14_STATE_VARIABLE_U_79_79;
              MR_Box conv15_STATE_VARIABLE_U_81_81;
              MR_Box conv16_STATE_VARIABLE_U_82_82;
              MR_Box conv17_STATE_VARIABLE_U_84_84;
              MR_Box conv18_STATE_VARIABLE_U_87_87;
              MR_Box conv19_STATE_VARIABLE_U_96_96;
              MR_Box conv20_STATE_VARIABLE_U_97_97;
              MR_Box conv21_STATE_VARIABLE_U_29;

              I_113 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_28)), &conv13_STATE_VARIABLE_U_78_78);
              STATE_VARIABLE_U_78_78 = ((MR_Word) (conv13_STATE_VARIABLE_U_78_78));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_113, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_78_78)), &conv14_STATE_VARIABLE_U_79_79);
              STATE_VARIABLE_U_79_79 = ((MR_Word) (conv14_STATE_VARIABLE_U_79_79));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "remote_cell(", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_79_79)), &conv15_STATE_VARIABLE_U_81_81);
              STATE_VARIABLE_U_81_81 = ((MR_Word) (conv15_STATE_VARIABLE_U_81_81));
              parse_tree__parse_tree_output__add_uint_4_p_0(TypeClassInfo_for_pt_output_121, PtagUint_23, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_81_81)), &conv16_STATE_VARIABLE_U_82_82);
              STATE_VARIABLE_U_82_82 = ((MR_Word) (conv16_STATE_VARIABLE_U_82_82));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", ", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_82_82)), &conv17_STATE_VARIABLE_U_84_84);
              STATE_VARIABLE_U_84_84 = ((MR_Word) (conv17_STATE_VARIABLE_U_84_84));
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellRemoteSectag_20, STATE_VARIABLE_U_84_84, &STATE_VARIABLE_U_85_85);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ",", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_85_85)), &conv18_STATE_VARIABLE_U_87_87);
              STATE_VARIABLE_U_87_87 = ((MR_Word) (conv18_STATE_VARIABLE_U_87_87));
              HeadRemoteArgRepn_114 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 0))));
              TailRemoteArgRepns_115 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 1))));
              Var_88 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
              Var_93 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
              {
                Var_90 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_90, 0) = ((MR_Box) (HeadRemoteArgRepn_114));
                MR_hl_field(1, Var_90, 1) = ((MR_Box) (TailRemoteArgRepns_115));
              }
              parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_53_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_121, TypeRepnFor_7, Var_93, TypeClassInfo_for_pt_output_121, Var_88, Var_90, STATE_VARIABLE_U_87_87, &STATE_VARIABLE_U_91_91);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_91_91)), &conv19_STATE_VARIABLE_U_96_96);
              STATE_VARIABLE_U_96_96 = ((MR_Word) (conv19_STATE_VARIABLE_U_96_96));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_113, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_96_96)), &conv20_STATE_VARIABLE_U_97_97);
              STATE_VARIABLE_U_97_97 = ((MR_Word) (conv20_STATE_VARIABLE_U_97_97));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ")", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_97_97)), &conv21_STATE_VARIABLE_U_29);
              *STATE_VARIABLE_U_29 = ((MR_Word) (conv21_STATE_VARIABLE_U_29));
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word HeadRemoteArgRepn_24;
              MR_Word TailRemoteArgRepns_25;
              MR_Word STATE_VARIABLE_U_63_63;
              MR_Word STATE_VARIABLE_U_64_64;
              MR_Word STATE_VARIABLE_U_66_66;
              MR_Word STATE_VARIABLE_U_67_67;
              MR_Word STATE_VARIABLE_U_69_69;
              MR_Word Var_70;
              MR_Word Var_72;
              MR_Word STATE_VARIABLE_U_73_73;
              MR_Box conv22_STATE_VARIABLE_U_63_63;
              MR_Box conv23_STATE_VARIABLE_U_64_64;
              MR_Box conv24_STATE_VARIABLE_U_66_66;
              MR_Box conv25_STATE_VARIABLE_U_69_69;
              MR_Box conv27_STATE_VARIABLE_U_73_73;
              MR_Box conv28_STATE_VARIABLE_U_29;

              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "remote_cell(", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_28)), &conv22_STATE_VARIABLE_U_63_63);
              STATE_VARIABLE_U_63_63 = ((MR_Word) (conv22_STATE_VARIABLE_U_63_63));
              parse_tree__parse_tree_output__add_uint_4_p_0(TypeClassInfo_for_pt_output_121, PtagUint_23, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_63_63)), &conv23_STATE_VARIABLE_U_64_64);
              STATE_VARIABLE_U_64_64 = ((MR_Word) (conv23_STATE_VARIABLE_U_64_64));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", ", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_64_64)), &conv24_STATE_VARIABLE_U_66_66);
              STATE_VARIABLE_U_66_66 = ((MR_Word) (conv24_STATE_VARIABLE_U_66_66));
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_121, CellRemoteSectag_20, STATE_VARIABLE_U_66_66, &STATE_VARIABLE_U_67_67);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", [", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_67_67)), &conv25_STATE_VARIABLE_U_69_69);
              STATE_VARIABLE_U_69_69 = ((MR_Word) (conv25_STATE_VARIABLE_U_69_69));
              HeadRemoteArgRepn_24 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 0))));
              TailRemoteArgRepns_25 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 1))));
              {
                Var_70 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_70, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[15]));
                MR_hl_field(0, Var_70, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2));
                MR_hl_field(0, Var_70, 2) = ((MR_Box) ((MR_Integer) 3));
                MR_hl_field(0, Var_70, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_121));
                MR_hl_field(0, Var_70, 4) = ((MR_Box) (TypeRepnFor_7));
                MR_hl_field(0, Var_70, 5) = ((MR_Box) ((MR_Integer) 0));
              }
              {
                Var_72 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_72, 0) = ((MR_Box) (HeadRemoteArgRepn_24));
                MR_hl_field(1, Var_72, 1) = ((MR_Box) (TailRemoteArgRepns_25));
              }
              parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0), TypeClassInfo_for_pt_output_121, Var_70, (MR_String) ", ", Var_72, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_69_69)), &conv27_STATE_VARIABLE_U_73_73);
              STATE_VARIABLE_U_73_73 = ((MR_Word) (conv27_STATE_VARIABLE_U_73_73));
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "])", ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_73_73)), &conv28_STATE_VARIABLE_U_29);
              *STATE_VARIABLE_U_29 = ((MR_Word) (conv28_STATE_VARIABLE_U_29));
            }
            break;
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_String Str_26;
        MR_Word Ptag_118 = ((MR_Word) ((MR_hl_field(2, NonConstantRepn_9, (MR_Integer) 0))));
        uint8_t PtagUint8_119 = (uint8_t) (Ptag_118);
        MR_Unsigned PtagUint_120;
        MR_Box conv0_STATE_VARIABLE_U_29;

        PtagUint_120 = mercury__uint8__cast_to_uint_1_f_0(PtagUint8_119);
        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_String NlI_27;
              MR_String Var_155;
              MR_String Var_162;
              MR_String Var_164;

              NlI_27 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
              mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, PtagUint_120, &Var_155);
              Var_162 = mercury__string__f_43_43_2_f_0(Var_155, (MR_String) ")");
              Var_164 = mercury__string__f_43_43_2_f_0((MR_String) "direct_arg(", Var_162);
              Str_26 = mercury__string__f_43_43_2_f_0(NlI_27, Var_164);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_String Var_144;
              MR_String Var_151;

              mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, PtagUint_120, &Var_144);
              Var_151 = mercury__string__f_43_43_2_f_0(Var_144, (MR_String) ")");
              Str_26 = mercury__string__f_43_43_2_f_0((MR_String) "direct_arg(", Var_151);
            }
            break;
        }
        parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, Str_26, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_28)), &conv0_STATE_VARIABLE_U_29);
        *STATE_VARIABLE_U_29 = ((MR_Word) (conv0_STATE_VARIABLE_U_29));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_54_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Word STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv1_STATE_VARIABLE_U_17_17);
    STATE_VARIABLE_U_17_17 = ((MR_Word) (conv1_STATE_VARIABLE_U_17_17));
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_17)), &conv3_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv3_STATE_VARIABLE_U_16));
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    MR_Word STATE_VARIABLE_U_20_20;
    MR_Word STATE_VARIABLE_U_22_22;
    MR_Word STATE_VARIABLE_U_23_23;
    MR_Word STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv5_STATE_VARIABLE_U_20_20;
    void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv7_STATE_VARIABLE_U_22_22;
    void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv9_STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv11_STATE_VARIABLE_U_16;

    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv5_STATE_VARIABLE_U_20_20);
    STATE_VARIABLE_U_20_20 = ((MR_Word) (conv5_STATE_VARIABLE_U_20_20));
    func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_6(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_20)), &conv7_STATE_VARIABLE_U_22_22);
    STATE_VARIABLE_U_22_22 = ((MR_Word) (conv7_STATE_VARIABLE_U_22_22));
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_56_95_95_91_53_93_95_48_6_p_0(Var_28, Var_29, Var_30, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, STATE_VARIABLE_U_22_22, &STATE_VARIABLE_U_23_23);
    func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_8(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_23)), &conv9_STATE_VARIABLE_U_24_24);
    STATE_VARIABLE_U_24_24 = ((MR_Word) (conv9_STATE_VARIABLE_U_24_24));
    func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_10(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_24)), &conv11_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv11_STATE_VARIABLE_U_16));
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_108_111_99_97_108_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word CellLocalSectag_5,
  MR_Word STATE_VARIABLE_U_0_11,
  MR_Word * STATE_VARIABLE_U_12)
{
  MR_Unsigned Sectag_8 = ((MR_Unsigned) ((MR_hl_field(0, CellLocalSectag_5, (MR_Integer) 0))));
  uint8_t SectagNumBits_9 = ((uint8_t) (MR_Word) (MR_hl_field(0, CellLocalSectag_5, (MR_Integer) 1)));
  MR_String Str_10;
  MR_Unsigned Var_22;
  MR_String Var_23;
  MR_String Var_30;
  MR_String Var_32;
  MR_String Var_34;
  MR_String Var_41;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_12;

  mercury__string__format__format_cast_uint8_to_uint_2_p_0(SectagNumBits_9, &Var_22);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_22, &Var_23);
  Var_30 = mercury__string__f_43_43_2_f_0(Var_23, (MR_String) ")");
  Var_32 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_30);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_8, &Var_34);
  Var_41 = mercury__string__f_43_43_2_f_0(Var_34, Var_32);
  Str_10 = mercury__string__f_43_43_2_f_0((MR_String) "local_sectag(", Var_41);
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) (Str_10)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_11)), &conv1_STATE_VARIABLE_U_12);
  *STATE_VARIABLE_U_12 = ((MR_Word) (conv1_STATE_VARIABLE_U_12));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_101_108_108_95_114_101_109_111_116_101_95_115_101_99_116_97_103_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_20,
  MR_Word CellLocalSectag_5,
  MR_Word STATE_VARIABLE_U_0_12,
  MR_Word * STATE_VARIABLE_U_13)
{
  MR_String Str_8;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_13;

  if ((CellLocalSectag_5 == (MR_Word) ((MR_Unsigned) 0U)))
    Str_8 = (MR_String) "remote_no_sectag";
  else
  {
    MR_Unsigned Sectag_9 = ((MR_Unsigned) ((MR_hl_field(1, CellLocalSectag_5, (MR_Integer) 0))));
    MR_Word SectagWordOrSize_10 = ((MR_Word) ((MR_hl_field(1, CellLocalSectag_5, (MR_Integer) 1))));
    MR_String SectagWordOrSizeStr_11;
    MR_String Var_22;
    MR_String Var_24;
    MR_String Var_26;
    MR_String Var_33;

    if ((SectagWordOrSize_10 == (MR_Word) ((MR_Unsigned) 0U)))
      SectagWordOrSizeStr_11 = (MR_String) "rst_full";
    else
    {
      uint8_t NumBits_35 = ((uint8_t) (MR_Word) (MR_hl_field(1, SectagWordOrSize_10, (MR_Integer) 0)));
      MR_Unsigned Var_42;
      MR_String Var_43;
      MR_String Var_50;

      mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_35, &Var_42);
      mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_42, &Var_43);
      Var_50 = mercury__string__f_43_43_2_f_0(Var_43, (MR_String) ")");
      SectagWordOrSizeStr_11 = mercury__string__f_43_43_2_f_0((MR_String) "rst_part(", Var_50);
    }
    Var_22 = mercury__string__f_43_43_2_f_0(SectagWordOrSizeStr_11, (MR_String) ")");
    Var_24 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_22);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_9, &Var_26);
    Var_33 = mercury__string__f_43_43_2_f_0(Var_26, Var_24);
    Str_8 = mercury__string__f_43_43_2_f_0((MR_String) "remote_sectag(", Var_33);
  }
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_20, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_20)), ((MR_Box) (Str_8)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_12)), &conv1_STATE_VARIABLE_U_13);
  *STATE_VARIABLE_U_13 = ((MR_Word) (conv1_STATE_VARIABLE_U_13));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_80,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word S_10)
{
  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      if (((MR_tag((MR_Word) NonConstantRepn_9)) == (MR_Integer) 0))
      {
        MR_Word LocalRepn_12 = ((MR_Word) ((MR_hl_field(0, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_13 = (MR_Word) (LocalRepn_12);
        MR_String I_16;
        MR_Integer Var_37;
        MR_Word Var_39;
        MR_Integer Var_42;
        MR_Word HeadLocalArgRepn_75;
        MR_Word TailLocalArgRepns_76;
        MR_String NlI_105;
        MR_Word HeadX_106;
        MR_Word TailXs_107;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_33_33;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_34_34;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_36_36;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_20_110;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_22_112;
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv11_STATE_VARIABLE_U_24_114;
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv13_STATE_VARIABLE_U_40_40;
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv15_STATE_VARIABLE_U_45_45;
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv17_STATE_VARIABLE_U_46_46;
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv19_STATE_VARIABLE_U_22;

        I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_33_33);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_16)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_34_34);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_local_cell([")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_36_36);
        HeadLocalArgRepn_75 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_13, (MR_Integer) 0))));
        TailLocalArgRepns_76 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_13, (MR_Integer) 1))));
        Var_37 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
        Var_42 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
        {
          Var_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_39, 0) = ((MR_Box) (HeadLocalArgRepn_75));
          MR_hl_field(1, Var_39, 1) = ((MR_Box) (TailLocalArgRepns_76));
        }
        NlI_105 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_37);
        HeadX_106 = ((MR_Word) ((MR_hl_field(1, Var_39, (MR_Integer) 0))));
        TailXs_107 = ((MR_Word) ((MR_hl_field(1, Var_39, (MR_Integer) 1))));
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (NlI_105)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_20_110);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_22_112);
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_50_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_80, TypeRepnFor_7, Var_42, TypeClassInfo_for_pt_output_80, HeadX_106, TailXs_107, S_10);
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (NlI_105)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_24_114);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_40_40);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_45_45);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_16)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_46_46);
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_22);
      }
      else
      {
        MR_Word RemoteRepn_17 = ((MR_Word) ((MR_hl_field(1, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMRemoteArgRepns_18 = (MR_Word) (RemoteRepn_17);
        MR_Integer Var_63;
        MR_Word Var_65;
        MR_Integer Var_68;
        MR_String I_77;
        MR_Word HeadRemoteArgRepn_78;
        MR_Word TailRemoteArgRepns_79;
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv21_STATE_VARIABLE_U_59_59;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_60_60;
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv25_STATE_VARIABLE_U_62_62;
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv27_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_22;

        I_77 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_59_59);
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_77)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_60_60);
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_24(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_remote_cell([")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_62_62);
        HeadRemoteArgRepn_78 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_18, (MR_Integer) 0))));
        TailRemoteArgRepns_79 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_18, (MR_Integer) 1))));
        Var_63 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
        Var_68 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
        {
          Var_65 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_65, 0) = ((MR_Box) (HeadRemoteArgRepn_78));
          MR_hl_field(1, Var_65, 1) = ((MR_Box) (TailRemoteArgRepns_79));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_54_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_80, TypeRepnFor_7, Var_68, TypeClassInfo_for_pt_output_80, Var_63, Var_65, S_10);
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_71_71);
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_77)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_72_72);
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv31_STATE_VARIABLE_U_22);
      }
      break;
    case (MR_Integer) 0:
      if (((MR_tag((MR_Word) NonConstantRepn_9)) == (MR_Integer) 0))
      {
        MR_Word HeadLocalArgRepn_14;
        MR_Word TailLocalArgRepns_15;
        MR_Word Var_25;
        MR_Word Var_27;
        MR_Word LocalRepn_101 = ((MR_Word) ((MR_hl_field(0, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_102 = (MR_Word) (LocalRepn_101);
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv33_STATE_VARIABLE_U_24_24;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv35_STATE_VARIABLE_U_28_28;
        void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv37_STATE_VARIABLE_U_22;

        func_32(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_local_cell([")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv33_STATE_VARIABLE_U_24_24);
        HeadLocalArgRepn_14 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_102, (MR_Integer) 0))));
        TailLocalArgRepns_15 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_102, (MR_Integer) 1))));
        {
          Var_25 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_25, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[16]));
          MR_hl_field(0, Var_25, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
          MR_hl_field(0, Var_25, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_25, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_80));
          MR_hl_field(0, Var_25, 4) = ((MR_Box) (TypeRepnFor_7));
          MR_hl_field(0, Var_25, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        {
          Var_27 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_27, 0) = ((MR_Box) (HeadLocalArgRepn_14));
          MR_hl_field(1, Var_27, 1) = ((MR_Box) (TailLocalArgRepns_15));
        }
        func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 25))));
        func_34(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0)), ((MR_Box) (Var_25)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_27)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv35_STATE_VARIABLE_U_28_28);
        func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_36(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "])")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv37_STATE_VARIABLE_U_22);
      }
      else
      {
        MR_Word HeadRemoteArgRepn_19;
        MR_Word TailRemoteArgRepns_20;
        MR_Word Var_51;
        MR_Word Var_53;
        MR_Word RemoteRepn_103 = ((MR_Word) ((MR_hl_field(1, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMRemoteArgRepns_104 = (MR_Word) (RemoteRepn_103);
        void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv39_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv41_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv43_STATE_VARIABLE_U_22;

        func_38(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_remote_cell([")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv39_STATE_VARIABLE_U_50_50);
        HeadRemoteArgRepn_19 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_104, (MR_Integer) 0))));
        TailRemoteArgRepns_20 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_104, (MR_Integer) 1))));
        {
          Var_51 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_51, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[17]));
          MR_hl_field(0, Var_51, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2));
          MR_hl_field(0, Var_51, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_51, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_80));
          MR_hl_field(0, Var_51, 4) = ((MR_Box) (TypeRepnFor_7));
          MR_hl_field(0, Var_51, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        {
          Var_53 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_53, 0) = ((MR_Box) (HeadRemoteArgRepn_19));
          MR_hl_field(1, Var_53, 1) = ((MR_Box) (TailRemoteArgRepns_20));
        }
        func_40 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 25))));
        func_40(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0)), ((MR_Box) (Var_51)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_53)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv41_STATE_VARIABLE_U_54_54);
        func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_42(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "])")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv43_STATE_VARIABLE_U_22);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_50_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10)
{
  while (MR_TRUE)
  {
    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(Var_21, Var_22, Var_23, X_8, S_10);
    if (!((Xs_9 == (MR_Word) ((MR_Unsigned) 0U))))
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv1_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_31,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word LocalArgRepn_9,
  MR_Word S_10)
{
  MR_String NlI_12;
  MR_String Str_15;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_17;

  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
      break;
    case (MR_Integer) 0:
      NlI_12 = (MR_String) "";
      break;
  }
  if ((LocalArgRepn_9 == (MR_Word) ((MR_Unsigned) 0U)))
    Str_15 = mercury__string__f_43_43_2_f_0(NlI_12, (MR_String) "local_none");
  else
  {
    MR_Unsigned Shift_13 = ((MR_Unsigned) ((MR_hl_field(1, LocalArgRepn_9, (MR_Integer) 0))));
    MR_Word FillKindSize_14 = ((MR_Word) ((MR_hl_field(1, LocalArgRepn_9, (MR_Integer) 1))));
    MR_String Var_25;
    MR_String Var_33;
    MR_String Var_35;
    MR_String Var_37;
    MR_String Var_44;
    MR_String Var_46;

    Var_25 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_14);
    Var_33 = mercury__string__f_43_43_2_f_0(Var_25, (MR_String) ")");
    Var_35 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_33);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Shift_13, &Var_37);
    Var_44 = mercury__string__f_43_43_2_f_0(Var_37, Var_35);
    Var_46 = mercury__string__f_43_43_2_f_0((MR_String) "local_partial(", Var_44);
    Str_15 = mercury__string__f_43_43_2_f_0(NlI_12, Var_46);
  }
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_31, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_31)), ((MR_Box) (Str_15)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_17);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_52_54_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word S_10)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_17_17);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv5_STATE_VARIABLE_U_20_20;
    void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv7_STATE_VARIABLE_U_22_22;
    void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv9_STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv11_STATE_VARIABLE_U_16;

    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_20_20);
    func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_6(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_22_22);
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_57_95_95_91_53_93_95_48_6_p_0(Var_28, Var_29, Var_30, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, S_10);
    func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_8(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_24_24);
    func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_10(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_16);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_55_57_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10)
{
  while (MR_TRUE)
  {
    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(Var_21, Var_22, Var_23, X_8, S_10);
    if (!((Xs_9 == (MR_Word) ((MR_Unsigned) 0U))))
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv1_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv41_STATE_VARIABLE_U_24;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv41_STATE_VARIABLE_U_24);
  *wrapper_arg_4 = ((MR_Box) (conv41_STATE_VARIABLE_U_24));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv34_STATE_VARIABLE_U_17;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv34_STATE_VARIABLE_U_17);
  *wrapper_arg_4 = ((MR_Box) (conv34_STATE_VARIABLE_U_17));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_80,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Word STATE_VARIABLE_U_0_21,
  MR_Word * STATE_VARIABLE_U_22)
{
  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      if (((MR_tag((MR_Word) NonConstantRepn_9)) == (MR_Integer) 0))
      {
        MR_Word LocalRepn_12 = ((MR_Word) ((MR_hl_field(0, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_13 = (MR_Word) (LocalRepn_12);
        MR_String I_16;
        MR_Word STATE_VARIABLE_U_33_33;
        MR_Word STATE_VARIABLE_U_34_34;
        MR_Word STATE_VARIABLE_U_36_36;
        MR_Integer Var_37;
        MR_Word Var_39;
        MR_Word STATE_VARIABLE_U_40_40;
        MR_Integer Var_42;
        MR_Word STATE_VARIABLE_U_45_45;
        MR_Word STATE_VARIABLE_U_46_46;
        MR_Word HeadLocalArgRepn_75;
        MR_Word TailLocalArgRepns_76;
        MR_String NlI_105;
        MR_Word HeadX_106;
        MR_Word TailXs_107;
        MR_Word STATE_VARIABLE_U_20_110;
        MR_Word STATE_VARIABLE_U_22_112;
        MR_Word STATE_VARIABLE_U_23_113;
        MR_Word STATE_VARIABLE_U_24_114;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_33_33;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_34_34;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_36_36;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_20_110;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_22_112;
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv11_STATE_VARIABLE_U_24_114;
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv13_STATE_VARIABLE_U_40_40;
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv15_STATE_VARIABLE_U_45_45;
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv17_STATE_VARIABLE_U_46_46;
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv19_STATE_VARIABLE_U_22;

        I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_21)), &conv1_STATE_VARIABLE_U_33_33);
        STATE_VARIABLE_U_33_33 = ((MR_Word) (conv1_STATE_VARIABLE_U_33_33));
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_33_33)), &conv3_STATE_VARIABLE_U_34_34);
        STATE_VARIABLE_U_34_34 = ((MR_Word) (conv3_STATE_VARIABLE_U_34_34));
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_local_cell([")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_34_34)), &conv5_STATE_VARIABLE_U_36_36);
        STATE_VARIABLE_U_36_36 = ((MR_Word) (conv5_STATE_VARIABLE_U_36_36));
        HeadLocalArgRepn_75 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_13, (MR_Integer) 0))));
        TailLocalArgRepns_76 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_13, (MR_Integer) 1))));
        Var_37 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
        Var_42 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
        {
          Var_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_39, 0) = ((MR_Box) (HeadLocalArgRepn_75));
          MR_hl_field(1, Var_39, 1) = ((MR_Box) (TailLocalArgRepns_76));
        }
        NlI_105 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_37);
        HeadX_106 = ((MR_Word) ((MR_hl_field(1, Var_39, (MR_Integer) 0))));
        TailXs_107 = ((MR_Word) ((MR_hl_field(1, Var_39, (MR_Integer) 1))));
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (NlI_105)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_36_36)), &conv7_STATE_VARIABLE_U_20_110);
        STATE_VARIABLE_U_20_110 = ((MR_Word) (conv7_STATE_VARIABLE_U_20_110));
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_110)), &conv9_STATE_VARIABLE_U_22_112);
        STATE_VARIABLE_U_22_112 = ((MR_Word) (conv9_STATE_VARIABLE_U_22_112));
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_56_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_80, TypeRepnFor_7, Var_42, TypeClassInfo_for_pt_output_80, HeadX_106, TailXs_107, STATE_VARIABLE_U_22_112, &STATE_VARIABLE_U_23_113);
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (NlI_105)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_113)), &conv11_STATE_VARIABLE_U_24_114);
        STATE_VARIABLE_U_24_114 = ((MR_Word) (conv11_STATE_VARIABLE_U_24_114));
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_114)), &conv13_STATE_VARIABLE_U_40_40);
        STATE_VARIABLE_U_40_40 = ((MR_Word) (conv13_STATE_VARIABLE_U_40_40));
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_40_40)), &conv15_STATE_VARIABLE_U_45_45);
        STATE_VARIABLE_U_45_45 = ((MR_Word) (conv15_STATE_VARIABLE_U_45_45));
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_45_45)), &conv17_STATE_VARIABLE_U_46_46);
        STATE_VARIABLE_U_46_46 = ((MR_Word) (conv17_STATE_VARIABLE_U_46_46));
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_46_46)), &conv19_STATE_VARIABLE_U_22);
        *STATE_VARIABLE_U_22 = ((MR_Word) (conv19_STATE_VARIABLE_U_22));
      }
      else
      {
        MR_Word RemoteRepn_17 = ((MR_Word) ((MR_hl_field(1, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMRemoteArgRepns_18 = (MR_Word) (RemoteRepn_17);
        MR_Word STATE_VARIABLE_U_59_59;
        MR_Word STATE_VARIABLE_U_60_60;
        MR_Word STATE_VARIABLE_U_62_62;
        MR_Integer Var_63;
        MR_Word Var_65;
        MR_Word STATE_VARIABLE_U_66_66;
        MR_Integer Var_68;
        MR_Word STATE_VARIABLE_U_71_71;
        MR_Word STATE_VARIABLE_U_72_72;
        MR_String I_77;
        MR_Word HeadRemoteArgRepn_78;
        MR_Word TailRemoteArgRepns_79;
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv21_STATE_VARIABLE_U_59_59;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_60_60;
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv25_STATE_VARIABLE_U_62_62;
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv27_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_22;

        I_77 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_21)), &conv21_STATE_VARIABLE_U_59_59);
        STATE_VARIABLE_U_59_59 = ((MR_Word) (conv21_STATE_VARIABLE_U_59_59));
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_77)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_59_59)), &conv23_STATE_VARIABLE_U_60_60);
        STATE_VARIABLE_U_60_60 = ((MR_Word) (conv23_STATE_VARIABLE_U_60_60));
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_24(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_remote_cell([")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_60_60)), &conv25_STATE_VARIABLE_U_62_62);
        STATE_VARIABLE_U_62_62 = ((MR_Word) (conv25_STATE_VARIABLE_U_62_62));
        HeadRemoteArgRepn_78 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_18, (MR_Integer) 0))));
        TailRemoteArgRepns_79 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_18, (MR_Integer) 1))));
        Var_63 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
        Var_68 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
        {
          Var_65 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_65, 0) = ((MR_Box) (HeadRemoteArgRepn_78));
          MR_hl_field(1, Var_65, 1) = ((MR_Box) (TailRemoteArgRepns_79));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_53_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_80, TypeRepnFor_7, Var_68, TypeClassInfo_for_pt_output_80, Var_63, Var_65, STATE_VARIABLE_U_62_62, &STATE_VARIABLE_U_66_66);
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_66_66)), &conv27_STATE_VARIABLE_U_71_71);
        STATE_VARIABLE_U_71_71 = ((MR_Word) (conv27_STATE_VARIABLE_U_71_71));
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_77)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_71_71)), &conv29_STATE_VARIABLE_U_72_72);
        STATE_VARIABLE_U_72_72 = ((MR_Word) (conv29_STATE_VARIABLE_U_72_72));
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_72_72)), &conv31_STATE_VARIABLE_U_22);
        *STATE_VARIABLE_U_22 = ((MR_Word) (conv31_STATE_VARIABLE_U_22));
      }
      break;
    case (MR_Integer) 0:
      if (((MR_tag((MR_Word) NonConstantRepn_9)) == (MR_Integer) 0))
      {
        MR_Word HeadLocalArgRepn_14;
        MR_Word TailLocalArgRepns_15;
        MR_Word STATE_VARIABLE_U_24_24;
        MR_Word Var_25;
        MR_Word Var_27;
        MR_Word STATE_VARIABLE_U_28_28;
        MR_Word LocalRepn_101 = ((MR_Word) ((MR_hl_field(0, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_102 = (MR_Word) (LocalRepn_101);
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv33_STATE_VARIABLE_U_24_24;
        void MR_CALL (* func_35)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv36_STATE_VARIABLE_U_28_28;
        void MR_CALL (* func_37)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv38_STATE_VARIABLE_U_22;

        func_32(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_local_cell([")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_21)), &conv33_STATE_VARIABLE_U_24_24);
        STATE_VARIABLE_U_24_24 = ((MR_Word) (conv33_STATE_VARIABLE_U_24_24));
        HeadLocalArgRepn_14 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_102, (MR_Integer) 0))));
        TailLocalArgRepns_15 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_102, (MR_Integer) 1))));
        {
          Var_25 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_25, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[14]));
          MR_hl_field(0, Var_25, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
          MR_hl_field(0, Var_25, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_25, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_80));
          MR_hl_field(0, Var_25, 4) = ((MR_Box) (TypeRepnFor_7));
          MR_hl_field(0, Var_25, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        {
          Var_27 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_27, 0) = ((MR_Box) (HeadLocalArgRepn_14));
          MR_hl_field(1, Var_27, 1) = ((MR_Box) (TailLocalArgRepns_15));
        }
        func_35 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 25))));
        func_35(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0)), ((MR_Box) (Var_25)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_27)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_24)), &conv36_STATE_VARIABLE_U_28_28);
        STATE_VARIABLE_U_28_28 = ((MR_Word) (conv36_STATE_VARIABLE_U_28_28));
        func_37 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_37(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "])")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_28_28)), &conv38_STATE_VARIABLE_U_22);
        *STATE_VARIABLE_U_22 = ((MR_Word) (conv38_STATE_VARIABLE_U_22));
      }
      else
      {
        MR_Word HeadRemoteArgRepn_19;
        MR_Word TailRemoteArgRepns_20;
        MR_Word STATE_VARIABLE_U_50_50;
        MR_Word Var_51;
        MR_Word Var_53;
        MR_Word STATE_VARIABLE_U_54_54;
        MR_Word RemoteRepn_103 = ((MR_Word) ((MR_hl_field(1, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMRemoteArgRepns_104 = (MR_Word) (RemoteRepn_103);
        void MR_CALL (* func_39)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv40_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv43_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv45_STATE_VARIABLE_U_22;

        func_39(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_remote_cell([")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_21)), &conv40_STATE_VARIABLE_U_50_50);
        STATE_VARIABLE_U_50_50 = ((MR_Word) (conv40_STATE_VARIABLE_U_50_50));
        HeadRemoteArgRepn_19 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_104, (MR_Integer) 0))));
        TailRemoteArgRepns_20 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_104, (MR_Integer) 1))));
        {
          Var_51 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_51, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[15]));
          MR_hl_field(0, Var_51, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2));
          MR_hl_field(0, Var_51, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_51, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_80));
          MR_hl_field(0, Var_51, 4) = ((MR_Box) (TypeRepnFor_7));
          MR_hl_field(0, Var_51, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        {
          Var_53 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_53, 0) = ((MR_Box) (HeadRemoteArgRepn_19));
          MR_hl_field(1, Var_53, 1) = ((MR_Box) (TailRemoteArgRepns_20));
        }
        func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 25))));
        func_42(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0)), ((MR_Box) (Var_51)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_53)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_50_50)), &conv43_STATE_VARIABLE_U_54_54);
        STATE_VARIABLE_U_54_54 = ((MR_Word) (conv43_STATE_VARIABLE_U_54_54));
        func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_44(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "])")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_54_54)), &conv45_STATE_VARIABLE_U_22);
        *STATE_VARIABLE_U_22 = ((MR_Word) (conv45_STATE_VARIABLE_U_22));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_56_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Word STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(Var_21, Var_22, Var_23, X_8, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Word STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv1_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Word next_value_of_STATE_VARIABLE_U_0_14;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_16_16)), &conv1_STATE_VARIABLE_U_18_18);
      STATE_VARIABLE_U_18_18 = ((MR_Word) (conv1_STATE_VARIABLE_U_18_18));
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_111_99_97_108_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_31,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word LocalArgRepn_9,
  MR_Word STATE_VARIABLE_U_0_16,
  MR_Word * STATE_VARIABLE_U_17)
{
  MR_String NlI_12;
  MR_String Str_15;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  MR_Box conv1_STATE_VARIABLE_U_17;

  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
      break;
    case (MR_Integer) 0:
      NlI_12 = (MR_String) "";
      break;
  }
  if ((LocalArgRepn_9 == (MR_Word) ((MR_Unsigned) 0U)))
    Str_15 = mercury__string__f_43_43_2_f_0(NlI_12, (MR_String) "local_none");
  else
  {
    MR_Unsigned Shift_13 = ((MR_Unsigned) ((MR_hl_field(1, LocalArgRepn_9, (MR_Integer) 0))));
    MR_Word FillKindSize_14 = ((MR_Word) ((MR_hl_field(1, LocalArgRepn_9, (MR_Integer) 1))));
    MR_String Var_25;
    MR_String Var_33;
    MR_String Var_35;
    MR_String Var_37;
    MR_String Var_44;
    MR_String Var_46;

    Var_25 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_14);
    Var_33 = mercury__string__f_43_43_2_f_0(Var_25, (MR_String) ")");
    Var_35 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_33);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Shift_13, &Var_37);
    Var_44 = mercury__string__f_43_43_2_f_0(Var_37, Var_35);
    Var_46 = mercury__string__f_43_43_2_f_0((MR_String) "local_partial(", Var_44);
    Str_15 = mercury__string__f_43_43_2_f_0(NlI_12, Var_46);
  }
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_31, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_31)), ((MR_Box) (Str_15)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_16)), &conv1_STATE_VARIABLE_U_17);
  *STATE_VARIABLE_U_17 = ((MR_Word) (conv1_STATE_VARIABLE_U_17));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_50_55_53_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Word STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv1_STATE_VARIABLE_U_17_17);
    STATE_VARIABLE_U_17_17 = ((MR_Word) (conv1_STATE_VARIABLE_U_17_17));
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_17)), &conv3_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv3_STATE_VARIABLE_U_16));
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    MR_Word STATE_VARIABLE_U_20_20;
    MR_Word STATE_VARIABLE_U_22_22;
    MR_Word STATE_VARIABLE_U_23_23;
    MR_Word STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv5_STATE_VARIABLE_U_20_20;
    void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv7_STATE_VARIABLE_U_22_22;
    void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv9_STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv11_STATE_VARIABLE_U_16;

    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv5_STATE_VARIABLE_U_20_20);
    STATE_VARIABLE_U_20_20 = ((MR_Word) (conv5_STATE_VARIABLE_U_20_20));
    func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_6(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_20)), &conv7_STATE_VARIABLE_U_22_22);
    STATE_VARIABLE_U_22_22 = ((MR_Word) (conv7_STATE_VARIABLE_U_22_22));
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_54_53_95_95_91_53_93_95_48_6_p_0(Var_28, Var_29, Var_30, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, STATE_VARIABLE_U_22_22, &STATE_VARIABLE_U_23_23);
    func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_8(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_23)), &conv9_STATE_VARIABLE_U_24_24);
    STATE_VARIABLE_U_24_24 = ((MR_Word) (conv9_STATE_VARIABLE_U_24_24));
    func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_10(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_24)), &conv11_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv11_STATE_VARIABLE_U_16));
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_54_53_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Word STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(Var_21, Var_22, Var_23, X_8, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Word STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv1_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Word next_value_of_STATE_VARIABLE_U_0_14;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_16_16)), &conv1_STATE_VARIABLE_U_18_18);
      STATE_VARIABLE_U_18_18 = ((MR_Word) (conv1_STATE_VARIABLE_U_18_18));
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_83,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word RemoteArgRepn_9,
  MR_Word S_10)
{
  MR_String NlI_12;
  MR_String Str_17;
  MR_Box conv0_STATE_VARIABLE_U_24;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_for_humans_2_f_0(TypeRepnFor_7, Indent_8);
  switch (MR_tag((MR_Word) RemoteArgRepn_9)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, (MR_String) "none_nowhere");
      break;
    case (MR_Integer) 1:
      {
        MR_Word ArgOnlyOffset_13 = ((MR_Word) ((MR_hl_field(1, RemoteArgRepn_9, (MR_Integer) 0))));
        MR_Word CellOffset_14 = ((MR_Word) ((MR_hl_field(1, RemoteArgRepn_9, (MR_Integer) 1))));
        MR_Integer ArgOnlyOffsetInt_15 = (MR_Integer) (ArgOnlyOffset_13);
        MR_Integer CellOffsetInt_16 = (MR_Integer) (CellOffset_14);
        MR_String Var_207;
        MR_String Var_214;
        MR_String Var_216;
        MR_String Var_217;
        MR_String Var_224;
        MR_String Var_226;

        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_16, &Var_207);
        Var_214 = mercury__string__f_43_43_2_f_0(Var_207, (MR_String) ")");
        Var_216 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_214);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_15, &Var_217);
        Var_224 = mercury__string__f_43_43_2_f_0(Var_217, Var_216);
        Var_226 = mercury__string__f_43_43_2_f_0((MR_String) "full(", Var_224);
        Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_226);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word DoubleKind_18 = ((MR_Unsigned) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 2))) & (MR_Integer) 3);
        MR_String DKStr_19;
        MR_Word ArgOnlyOffset_71 = ((MR_Word) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 0))));
        MR_Word CellOffset_72 = ((MR_Word) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 1))));
        MR_Integer ArgOnlyOffsetInt_73 = (MR_Integer) (ArgOnlyOffset_71);
        MR_Integer CellOffsetInt_74 = (MR_Integer) (CellOffset_72);
        MR_String Var_228;
        MR_String Var_230;
        MR_String Var_231;
        MR_String Var_238;
        MR_String Var_240;
        MR_String Var_241;
        MR_String Var_248;
        MR_String Var_250;

        parse_tree__prog_data__double_word_kind_string_2_p_0(DoubleKind_18, &DKStr_19);
        Var_228 = mercury__string__f_43_43_2_f_0(DKStr_19, (MR_String) ")");
        Var_230 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_228);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_74, &Var_231);
        Var_238 = mercury__string__f_43_43_2_f_0(Var_231, Var_230);
        Var_240 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_238);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_73, &Var_241);
        Var_248 = mercury__string__f_43_43_2_f_0(Var_241, Var_240);
        Var_250 = mercury__string__f_43_43_2_f_0((MR_String) "double(", Var_248);
        Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_250);
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            uint8_t Shift_20 = ((uint8_t) (MR_Word) (MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 3)));
            MR_Word FillKindSize_21 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 4))));
            MR_String Var_56;
            MR_Word ArgOnlyOffset_75 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_76 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_77 = (MR_Integer) (ArgOnlyOffset_75);
            MR_Integer CellOffsetInt_78 = (MR_Integer) (CellOffset_76);
            MR_String Var_146;
            MR_String Var_148;
            MR_Unsigned Var_150;
            MR_String Var_151;
            MR_String Var_158;
            MR_String Var_160;
            MR_String Var_161;
            MR_String Var_168;
            MR_String Var_170;
            MR_String Var_171;
            MR_String Var_178;
            MR_String Var_180;
            MR_String Var_181;
            MR_String Var_183;

            Var_56 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_21);
            Var_146 = mercury__string__f_43_43_2_f_0(Var_56, (MR_String) ")");
            Var_148 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_146);
            mercury__string__format__format_cast_uint8_to_uint_2_p_0(Shift_20, &Var_150);
            mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_150, &Var_151);
            Var_158 = mercury__string__f_43_43_2_f_0(Var_151, Var_148);
            Var_160 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_158);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_78, &Var_161);
            Var_168 = mercury__string__f_43_43_2_f_0(Var_161, Var_160);
            Var_170 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_168);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_77, &Var_171);
            Var_178 = mercury__string__f_43_43_2_f_0(Var_171, Var_170);
            Var_180 = mercury__string__f_43_43_2_f_0((MR_String) "(", Var_178);
            Var_181 = mercury__string__f_43_43_2_f_0((MR_String) "first", Var_180);
            Var_183 = mercury__string__f_43_43_2_f_0((MR_String) "partial_", Var_181);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_183);
          }
          break;
        case (MR_Integer) 1:
          {
            uint8_t Shift_84 = ((uint8_t) (MR_Word) (MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 3)));
            MR_Word FillKindSize_85 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 4))));
            MR_String Var_100;
            MR_Word ArgOnlyOffset_102 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_103 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_104 = (MR_Integer) (ArgOnlyOffset_102);
            MR_Integer CellOffsetInt_105 = (MR_Integer) (CellOffset_103);
            MR_String Var_107;
            MR_String Var_109;
            MR_Unsigned Var_111;
            MR_String Var_112;
            MR_String Var_119;
            MR_String Var_121;
            MR_String Var_122;
            MR_String Var_129;
            MR_String Var_131;
            MR_String Var_132;
            MR_String Var_139;
            MR_String Var_141;
            MR_String Var_142;
            MR_String Var_144;

            Var_100 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_85);
            Var_107 = mercury__string__f_43_43_2_f_0(Var_100, (MR_String) ")");
            Var_109 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_107);
            mercury__string__format__format_cast_uint8_to_uint_2_p_0(Shift_84, &Var_111);
            mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_111, &Var_112);
            Var_119 = mercury__string__f_43_43_2_f_0(Var_112, Var_109);
            Var_121 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_119);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_105, &Var_122);
            Var_129 = mercury__string__f_43_43_2_f_0(Var_122, Var_121);
            Var_131 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_129);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_104, &Var_132);
            Var_139 = mercury__string__f_43_43_2_f_0(Var_132, Var_131);
            Var_141 = mercury__string__f_43_43_2_f_0((MR_String) "(", Var_139);
            Var_142 = mercury__string__f_43_43_2_f_0((MR_String) "shifted", Var_141);
            Var_144 = mercury__string__f_43_43_2_f_0((MR_String) "partial_", Var_142);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_144);
          }
          break;
        case (MR_Integer) 2:
          {
            MR_Word ArgOnlyOffset_79 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_80 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_81 = (MR_Integer) (ArgOnlyOffset_79);
            MR_Integer CellOffsetInt_82 = (MR_Integer) (CellOffset_80);
            MR_String Var_185;
            MR_String Var_192;
            MR_String Var_194;
            MR_String Var_195;
            MR_String Var_202;
            MR_String Var_204;

            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_82, &Var_185);
            Var_192 = mercury__string__f_43_43_2_f_0(Var_185, (MR_String) ")");
            Var_194 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_192);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_81, &Var_195);
            Var_202 = mercury__string__f_43_43_2_f_0(Var_195, Var_194);
            Var_204 = mercury__string__f_43_43_2_f_0((MR_String) "none_shifted(", Var_202);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_204);
          }
          break;
      }
      break;
  }
  parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_83, Str_17, ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv0_STATE_VARIABLE_U_24);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_114_101_109_111_116_101_95_97_114_103_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_83,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word RemoteArgRepn_9,
  MR_Word STATE_VARIABLE_U_0_23,
  MR_Word * STATE_VARIABLE_U_24)
{
  MR_String NlI_12;
  MR_String Str_17;
  MR_Box conv0_STATE_VARIABLE_U_24;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_for_humans_2_f_0(TypeRepnFor_7, Indent_8);
  switch (MR_tag((MR_Word) RemoteArgRepn_9)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, (MR_String) "none_nowhere");
      break;
    case (MR_Integer) 1:
      {
        MR_Word ArgOnlyOffset_13 = ((MR_Word) ((MR_hl_field(1, RemoteArgRepn_9, (MR_Integer) 0))));
        MR_Word CellOffset_14 = ((MR_Word) ((MR_hl_field(1, RemoteArgRepn_9, (MR_Integer) 1))));
        MR_Integer ArgOnlyOffsetInt_15 = (MR_Integer) (ArgOnlyOffset_13);
        MR_Integer CellOffsetInt_16 = (MR_Integer) (CellOffset_14);
        MR_String Var_207;
        MR_String Var_214;
        MR_String Var_216;
        MR_String Var_217;
        MR_String Var_224;
        MR_String Var_226;

        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_16, &Var_207);
        Var_214 = mercury__string__f_43_43_2_f_0(Var_207, (MR_String) ")");
        Var_216 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_214);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_15, &Var_217);
        Var_224 = mercury__string__f_43_43_2_f_0(Var_217, Var_216);
        Var_226 = mercury__string__f_43_43_2_f_0((MR_String) "full(", Var_224);
        Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_226);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word DoubleKind_18 = ((MR_Unsigned) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 2))) & (MR_Integer) 3);
        MR_String DKStr_19;
        MR_Word ArgOnlyOffset_71 = ((MR_Word) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 0))));
        MR_Word CellOffset_72 = ((MR_Word) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 1))));
        MR_Integer ArgOnlyOffsetInt_73 = (MR_Integer) (ArgOnlyOffset_71);
        MR_Integer CellOffsetInt_74 = (MR_Integer) (CellOffset_72);
        MR_String Var_228;
        MR_String Var_230;
        MR_String Var_231;
        MR_String Var_238;
        MR_String Var_240;
        MR_String Var_241;
        MR_String Var_248;
        MR_String Var_250;

        parse_tree__prog_data__double_word_kind_string_2_p_0(DoubleKind_18, &DKStr_19);
        Var_228 = mercury__string__f_43_43_2_f_0(DKStr_19, (MR_String) ")");
        Var_230 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_228);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_74, &Var_231);
        Var_238 = mercury__string__f_43_43_2_f_0(Var_231, Var_230);
        Var_240 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_238);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_73, &Var_241);
        Var_248 = mercury__string__f_43_43_2_f_0(Var_241, Var_240);
        Var_250 = mercury__string__f_43_43_2_f_0((MR_String) "double(", Var_248);
        Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_250);
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            uint8_t Shift_20 = ((uint8_t) (MR_Word) (MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 3)));
            MR_Word FillKindSize_21 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 4))));
            MR_String Var_56;
            MR_Word ArgOnlyOffset_75 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_76 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_77 = (MR_Integer) (ArgOnlyOffset_75);
            MR_Integer CellOffsetInt_78 = (MR_Integer) (CellOffset_76);
            MR_String Var_146;
            MR_String Var_148;
            MR_Unsigned Var_150;
            MR_String Var_151;
            MR_String Var_158;
            MR_String Var_160;
            MR_String Var_161;
            MR_String Var_168;
            MR_String Var_170;
            MR_String Var_171;
            MR_String Var_178;
            MR_String Var_180;
            MR_String Var_181;
            MR_String Var_183;

            Var_56 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_21);
            Var_146 = mercury__string__f_43_43_2_f_0(Var_56, (MR_String) ")");
            Var_148 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_146);
            mercury__string__format__format_cast_uint8_to_uint_2_p_0(Shift_20, &Var_150);
            mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_150, &Var_151);
            Var_158 = mercury__string__f_43_43_2_f_0(Var_151, Var_148);
            Var_160 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_158);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_78, &Var_161);
            Var_168 = mercury__string__f_43_43_2_f_0(Var_161, Var_160);
            Var_170 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_168);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_77, &Var_171);
            Var_178 = mercury__string__f_43_43_2_f_0(Var_171, Var_170);
            Var_180 = mercury__string__f_43_43_2_f_0((MR_String) "(", Var_178);
            Var_181 = mercury__string__f_43_43_2_f_0((MR_String) "first", Var_180);
            Var_183 = mercury__string__f_43_43_2_f_0((MR_String) "partial_", Var_181);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_183);
          }
          break;
        case (MR_Integer) 1:
          {
            uint8_t Shift_84 = ((uint8_t) (MR_Word) (MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 3)));
            MR_Word FillKindSize_85 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 4))));
            MR_String Var_100;
            MR_Word ArgOnlyOffset_102 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_103 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_104 = (MR_Integer) (ArgOnlyOffset_102);
            MR_Integer CellOffsetInt_105 = (MR_Integer) (CellOffset_103);
            MR_String Var_107;
            MR_String Var_109;
            MR_Unsigned Var_111;
            MR_String Var_112;
            MR_String Var_119;
            MR_String Var_121;
            MR_String Var_122;
            MR_String Var_129;
            MR_String Var_131;
            MR_String Var_132;
            MR_String Var_139;
            MR_String Var_141;
            MR_String Var_142;
            MR_String Var_144;

            Var_100 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_85);
            Var_107 = mercury__string__f_43_43_2_f_0(Var_100, (MR_String) ")");
            Var_109 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_107);
            mercury__string__format__format_cast_uint8_to_uint_2_p_0(Shift_84, &Var_111);
            mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_111, &Var_112);
            Var_119 = mercury__string__f_43_43_2_f_0(Var_112, Var_109);
            Var_121 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_119);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_105, &Var_122);
            Var_129 = mercury__string__f_43_43_2_f_0(Var_122, Var_121);
            Var_131 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_129);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_104, &Var_132);
            Var_139 = mercury__string__f_43_43_2_f_0(Var_132, Var_131);
            Var_141 = mercury__string__f_43_43_2_f_0((MR_String) "(", Var_139);
            Var_142 = mercury__string__f_43_43_2_f_0((MR_String) "shifted", Var_141);
            Var_144 = mercury__string__f_43_43_2_f_0((MR_String) "partial_", Var_142);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_144);
          }
          break;
        case (MR_Integer) 2:
          {
            MR_Word ArgOnlyOffset_79 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_80 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_81 = (MR_Integer) (ArgOnlyOffset_79);
            MR_Integer CellOffsetInt_82 = (MR_Integer) (CellOffset_80);
            MR_String Var_185;
            MR_String Var_192;
            MR_String Var_194;
            MR_String Var_195;
            MR_String Var_202;
            MR_String Var_204;

            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_82, &Var_185);
            Var_192 = mercury__string__f_43_43_2_f_0(Var_185, (MR_String) ")");
            Var_194 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_192);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_81, &Var_195);
            Var_202 = mercury__string__f_43_43_2_f_0(Var_195, Var_194);
            Var_204 = mercury__string__f_43_43_2_f_0((MR_String) "none_shifted(", Var_202);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_204);
          }
          break;
      }
      break;
  }
  parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_83, Str_17, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_23)), &conv0_STATE_VARIABLE_U_24);
  *STATE_VARIABLE_U_24 = ((MR_Word) (conv0_STATE_VARIABLE_U_24));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_21,
  MR_Word S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word DuRepn_12)
{
  switch (MR_tag((MR_Word) DuRepn_12)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word DummyRepn_14 = (MR_Word) ((MR_Word) (DuRepn_12));
        MR_String FunctorName_22 = ((MR_String) ((MR_hl_field(0, DummyRepn_14, (MR_Integer) 0))));
        MR_Word MaybeCJCsRepnOrEnum_23 = ((MR_Word) ((MR_hl_field(0, DummyRepn_14, (MR_Integer) 1))));

        switch (TypeRepnFor_9) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word TypeClassInfo_for_writer_49;
              MR_String I_24;
              MR_Integer Var_42;
              void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv1_STATE_VARIABLE_U_28_35;
              void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv3_STATE_VARIABLE_U_29_36;
              void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv5_STATE_VARIABLE_U_31_38;
              void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv7_STATE_VARIABLE_U_34_41;
              void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv9_STATE_VARIABLE_U_39_46;
              void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv11_STATE_VARIABLE_U_40_47;
              void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv13_STATE_VARIABLE_U_20;

              I_24 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
              func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_0(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_28_35);
              func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_2(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_24)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_29_36);
              func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_4(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "direct_dummy(")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_31_38);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_49);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_49, S_8, FunctorName_22);
              func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_6(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_34_41);
              Var_42 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Var_42, MaybeCJCsRepnOrEnum_23);
              func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_8(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_39_46);
              func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_10(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_24)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_40_47);
              func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_12(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_20);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word TypeClassInfo_for_writer_51;
              MR_Integer Var_30;
              void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              MR_Box conv15_STATE_VARIABLE_U_18_26;
              void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv17_STATE_VARIABLE_U_21_29;
              void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv19_STATE_VARIABLE_U_20;

              func_14(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "direct_dummy(")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_18_26);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_51);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_51, S_8, FunctorName_22);
              func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_16(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_21_29);
              Var_30 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Var_30, MaybeCJCsRepnOrEnum_23);
              func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_18(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_20);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word EnumRepn_15 = (MR_Word) (MR_body((MR_Word) (DuRepn_12), (MR_Integer) 1));

        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Indent_10, EnumRepn_15);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word NotagRepn_16 = (MR_Word) (MR_body((MR_Word) (DuRepn_12), (MR_Integer) 2));
        MR_String FunctorName_53 = ((MR_String) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 0))));
        MR_Word ArgType_54 = ((MR_Word) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 1))));
        MR_Word MaybeCJCsRepn_55 = ((MR_Word) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 2))));

        switch (TypeRepnFor_9) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word TypeClassInfo_for_writer_93;
              MR_String I_56;
              MR_String I1_57;
              MR_Integer Var_70;
              MR_Integer Var_86;
              void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv21_STATE_VARIABLE_U_37_73;
              void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv23_STATE_VARIABLE_U_38_74;
              void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv25_STATE_VARIABLE_U_40_76;
              void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv27_STATE_VARIABLE_U_41_77;
              void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv29_STATE_VARIABLE_U_44_80;
              void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv31_STATE_VARIABLE_U_45_81;
              void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv33_STATE_VARIABLE_U_49_85;
              void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv35_STATE_VARIABLE_U_54_90;
              void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv37_STATE_VARIABLE_U_55_91;
              void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv39_STATE_VARIABLE_U_20;

              I_56 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
              Var_70 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              I1_57 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_70);
              func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_20(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_37_73);
              func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_22(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_56)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_38_74);
              func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_24(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "notag(\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_40_76);
              func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_26(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I1_57)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_41_77);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_93);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_93, S_8, FunctorName_53);
              func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_28(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_44_80);
              func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_30(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I1_57)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv31_STATE_VARIABLE_U_45_81);
              parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TVarSet_11, (MR_Integer) 2, ArgType_54, S_8);
              func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_32(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv33_STATE_VARIABLE_U_49_85);
              Var_86 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Var_86, MaybeCJCsRepn_55);
              func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_34(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv35_STATE_VARIABLE_U_54_90);
              func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_36(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_56)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv37_STATE_VARIABLE_U_55_91);
              func_38 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_38(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv39_STATE_VARIABLE_U_20);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word TypeClassInfo_for_writer_95;
              void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              MR_Box conv41_STATE_VARIABLE_U_22_59;
              void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv43_STATE_VARIABLE_U_25_62;
              void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv45_STATE_VARIABLE_U_29_66;
              void MR_CALL (* func_46)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv47_STATE_VARIABLE_U_20;

              func_40(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "notag(")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv41_STATE_VARIABLE_U_22_59);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_95);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_95, S_8, FunctorName_53);
              func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_42(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv43_STATE_VARIABLE_U_25_62);
              parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TVarSet_11, (MR_Integer) 2, ArgType_54, S_8);
              func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_44(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv45_STATE_VARIABLE_U_29_66);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_55);
              func_46 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_46(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv47_STATE_VARIABLE_U_20);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word OnlyFunctorRepn_17 = ((MR_Word) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 1))));

            parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Indent_10, TVarSet_11, OnlyFunctorRepn_17);
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word MoreFunctorsRepn_18 = ((MR_Word) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 1))));

            parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Indent_10, TVarSet_11, MoreFunctorsRepn_18);
          }
          break;
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_String) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word EnumRepn_10)
{
  MR_String Functor1_12 = ((MR_String) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 0))));
  MR_String Functor2_13 = ((MR_String) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 1))));
  MR_Word OtherFunctors_14 = ((MR_Word) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepnOrEnum_15 = ((MR_Word) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 3))));

  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Word TypeClassInfo_for_writer_87;
        MR_Word TypeClassInfo_for_writer_91;
        MR_Integer Indent1_18 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        MR_String I_19;
        MR_String NlI1_20;
        MR_String Var_63;
        MR_Integer Var_64;
        MR_String NlI_93;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_49_49;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_52_52;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_14_85;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv11_STATE_VARIABLE_U_56_56;
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv13_STATE_VARIABLE_U_14_89;
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv15_STATE_VARIABLE_U_58_58;
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv17_STATE_VARIABLE_U_60_60;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_68_68;
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv33_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv35_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv37_STATE_VARIABLE_U_22;

        I_19 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        NlI1_20 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_49_49);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_19)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_50_50);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "enum(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_52_52);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI1_20)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_14_85);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_87);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_87, S_7, Functor1_12);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_54_54);
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_56_56);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI1_20)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_14_89);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_91);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_91, S_7, Functor2_13);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_58_58);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_60_60);
        Var_64 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        Var_63 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_64);
        NlI_93 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        if ((OtherFunctors_14 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv19_STATE_VARIABLE_U_17_96;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_62_62;

          func_18(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_17_96);
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_62_62);
        }
        else
        {
          MR_String HeadX_94 = ((MR_String) ((MR_hl_field(1, OtherFunctors_14, (MR_Integer) 0))));
          MR_Word TailXs_95 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_14, (MR_Integer) 1))));
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv23_STATE_VARIABLE_U_20_98;
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv25_STATE_VARIABLE_U_22_100;
          void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv27_STATE_VARIABLE_U_24_102;
          void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv29_STATE_VARIABLE_U_62_62;

          func_22(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_20_98);
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_22_100);
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_57_51_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_74, Var_63, (MR_String) "", TypeClassInfo_for_pt_output_74, HeadX_94, TailXs_95, S_7);
          func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_26(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_24_102);
          func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_28(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_62_62);
        }
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv31_STATE_VARIABLE_U_68_68);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, S_7, TypeRepnFor_8, Indent1_18, MaybeCJCsRepnOrEnum_15);
        func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_32(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv33_STATE_VARIABLE_U_71_71);
        func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_34(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_19)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv35_STATE_VARIABLE_U_72_72);
        func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_36(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv37_STATE_VARIABLE_U_22);
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word TypeClassInfo_for_writer_105;
        MR_Word TypeClassInfo_for_writer_107;
        void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv39_STATE_VARIABLE_U_24_24;
        void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv41_STATE_VARIABLE_U_27_27;
        void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv43_STATE_VARIABLE_U_30_30;
        void MR_CALL (* func_52)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv53_STATE_VARIABLE_U_42_42;
        void MR_CALL (* func_54)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv55_STATE_VARIABLE_U_22;

        func_38(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "enum(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv39_STATE_VARIABLE_U_24_24);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_105);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_105, S_7, Functor1_12);
        func_40 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_40(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv41_STATE_VARIABLE_U_27_27);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_107);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_107, S_7, Functor2_13);
        func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_42(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv43_STATE_VARIABLE_U_30_30);
        if ((OtherFunctors_14 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv45_STATE_VARIABLE_U_32_32;

          func_44(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv45_STATE_VARIABLE_U_32_32);
        }
        else
        {
          MR_Word Var_35;
          void MR_CALL (* func_46)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv47_STATE_VARIABLE_U_34_34;
          void MR_CALL (* func_48)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv49_STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_50)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv51_STATE_VARIABLE_U_32_32;

          func_46(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv47_STATE_VARIABLE_U_34_34);
          {
            Var_35 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Var_35, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_5[2]));
            MR_hl_field(0, Var_35, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
            MR_hl_field(0, Var_35, 2) = ((MR_Box) ((MR_Integer) 1));
            MR_hl_field(0, Var_35, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_74));
          }
          func_48 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 25))));
          func_48(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)), ((MR_Box) (Var_35)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (OtherFunctors_14)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv49_STATE_VARIABLE_U_38_38);
          func_50 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_50(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv51_STATE_VARIABLE_U_32_32);
        }
        func_52 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_52(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv53_STATE_VARIABLE_U_42_42);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, S_7, TypeRepnFor_8, (MR_Integer) 0, MaybeCJCsRepnOrEnum_15);
        func_54 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_54(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv55_STATE_VARIABLE_U_22);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepnOrEnum_10)
{
  MR_bool succeeded;
  MR_Word MaybeRepnOrEnumC_12 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 0))));
  MR_Word MaybeRepnOrEnumJava_13 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 1))));
  MR_Word MaybeRepnOrEnumCsharp_14 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 2))));
  MR_Integer Indent1_15 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
  MR_String I_16;

  I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
  succeeded = (MaybeRepnOrEnumC_12 == (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = (MaybeRepnOrEnumJava_13 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
      succeeded = (MaybeRepnOrEnumCsharp_14 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv1_STATE_VARIABLE_U_22_22;
          void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv3_STATE_VARIABLE_U_18;

          func_0(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_22_22);
          func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_2(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "no_c_j_cs")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv5_STATE_VARIABLE_U_18;

          func_4(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " no_c_j_cs")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_18);
        }
        break;
    }
  else
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv7_STATE_VARIABLE_U_37_37;
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv9_STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv11_STATE_VARIABLE_U_40_40;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_43_43;
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv15_STATE_VARIABLE_U_46_46;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_49_49;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_50_50;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_18;

          func_6(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_37_37);
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_38_38);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "c_j_cs(\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_40_40);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumC_12);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_43_43);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumJava_13);
          func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_14(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_46_46);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumCsharp_14);
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_49_49);
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_50_50);
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv23_STATE_VARIABLE_U_26_26;
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv25_STATE_VARIABLE_U_29_29;
          void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv27_STATE_VARIABLE_U_32_32;
          void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv29_STATE_VARIABLE_U_18;

          func_22(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " c_j_cs(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_26_26);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumC_12);
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_29_29);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumJava_13);
          func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_26(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_32_32);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumCsharp_14);
          func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_28(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_18);
        }
        break;
    }
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv30_Str_4;

  conv30_Str_4 = parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv30_Str_4));
  return wrapper_arg_2;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_String) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_23,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepnOrEnum_10)
{
  if ((MaybeTypeRepnOrEnum_10 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_String I_12;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_12 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_12 = (MR_String) "";
        break;
    }
    func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
    func_0(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_12)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_17_17);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "no_foreign")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word Var_24 = ((MR_Word) ((MR_hl_field(1, MaybeTypeRepnOrEnum_10, (MR_Integer) 0))));

    if (((MR_tag((MR_Word) Var_24)) == (MR_Integer) 1))
    {
      MR_Word EnumRepn_13 = ((MR_Word) ((MR_hl_field(1, Var_24, (MR_Integer) 0))));
      MR_String HeadEnum_25 = ((MR_String) ((MR_hl_field(0, EnumRepn_13, (MR_Integer) 0))));
      MR_Word TailEnums_26 = ((MR_Word) ((MR_hl_field(0, EnumRepn_13, (MR_Integer) 1))));

      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          {
            MR_String I_27;
            MR_Integer Var_38;
            MR_Word Var_40;
            MR_String Var_43;
            MR_Integer Var_44;
            MR_String NlI_53;
            MR_String HeadX_54;
            MR_Word TailXs_55;
            void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv5_STATE_VARIABLE_U_25_35;
            void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv7_STATE_VARIABLE_U_27_37;
            void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv9_STATE_VARIABLE_U_20_58;
            void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv11_STATE_VARIABLE_U_22_60;
            void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv13_STATE_VARIABLE_U_24_62;
            void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv15_STATE_VARIABLE_U_31_41;
            void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv17_STATE_VARIABLE_U_38_48;
            void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv19_STATE_VARIABLE_U_39_49;
            void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv21_STATE_VARIABLE_U_16;

            I_27 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
            func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_4(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_27)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_25_35);
            func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_6(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "foreign_enum(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_27_37);
            Var_38 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
            Var_44 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
            Var_43 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_44);
            {
              Var_40 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, Var_40, 0) = ((MR_Box) (HeadEnum_25));
              MR_hl_field(1, Var_40, 1) = ((MR_Box) (TailEnums_26));
            }
            NlI_53 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_38);
            HeadX_54 = ((MR_String) ((MR_hl_field(1, Var_40, (MR_Integer) 0))));
            TailXs_55 = ((MR_Word) ((MR_hl_field(1, Var_40, (MR_Integer) 1))));
            func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_8(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (NlI_53)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_20_58);
            func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_10(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_22_60);
            parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_57_51_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_23, Var_43, (MR_String) "", TypeClassInfo_for_pt_output_23, HeadX_54, TailXs_55, S_7);
            func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_12(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (NlI_53)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_24_62);
            func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_14(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_31_41);
            func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_16(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_38_48);
            func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_18(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_27)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_39_49);
            func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_20(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_16);
          }
          break;
        case (MR_Integer) 0:
          {
            MR_Word Var_30;
            MR_Word Var_32;
            void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            MR_Box conv23_STATE_VARIABLE_U_18_29;
            void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv25_STATE_VARIABLE_U_22_33;
            void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv27_STATE_VARIABLE_U_16;

            func_22(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "foreign_enum([")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_18_29);
            {
              Var_30 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
              MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_5[2]));
              MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
              MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 1));
              MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_23));
            }
            {
              Var_32 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, Var_32, 0) = ((MR_Box) (HeadEnum_25));
              MR_hl_field(1, Var_32, 1) = ((MR_Box) (TailEnums_26));
            }
            func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 25))));
            func_24(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)), ((MR_Box) (Var_30)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_32)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_22_33);
            func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_26(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "])")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_16);
          }
          break;
      }
    }
    else
    {
      MR_Word TypeRepn_14 = (MR_Word) ((MR_Word) (Var_24));
      MR_String ForeignTypeName_65 = ((MR_String) ((MR_hl_field(0, TypeRepn_14, (MR_Integer) 0))));
      MR_Word ForeignTypeAssertions_66 = ((MR_Word) ((MR_hl_field(0, TypeRepn_14, (MR_Integer) 1))));
      MR_String I_67;
      MR_Word Assertions_68;
      MR_Word AssertionsList_69;
      MR_String InitStr_70;
      MR_Word AssertionStrs_71;
      MR_String AssertionsStr_72;
      MR_String FinalStr_73;
      MR_String Var_83;
      MR_String Var_85;
      void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
      MR_Box conv29_STATE_VARIABLE_U_30_75;
      void MR_CALL (* func_31)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
      MR_Box conv32_STATE_VARIABLE_U_16;

      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          I_67 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          break;
        case (MR_Integer) 0:
          I_67 = (MR_String) "";
          break;
      }
      Assertions_68 = (MR_Word) (ForeignTypeAssertions_66);
      mercury__set__to_sorted_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), Assertions_68, &AssertionsList_69);
      Var_83 = mercury__string__f_43_43_2_f_0(ForeignTypeName_65, (MR_String) "\",");
      Var_85 = mercury__string__f_43_43_2_f_0((MR_String) "foreign_type(\"", Var_83);
      InitStr_70 = mercury__string__f_43_43_2_f_0(I_67, Var_85);
      func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
      func_28(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (InitStr_70)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_30_75);
      AssertionStrs_71 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_7[5]), AssertionsList_69);
      AssertionsStr_72 = mercury__string__join_list_2_f_0((MR_String) ", ", AssertionStrs_71);
      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          {
            MR_String I1_74;
            MR_Integer Var_78 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
            MR_String Var_90;
            MR_String Var_92;
            MR_String Var_93;
            MR_String Var_95;
            MR_String Var_96;

            I1_74 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_78);
            Var_90 = mercury__string__f_43_43_2_f_0(I_67, (MR_String) ")");
            Var_92 = mercury__string__f_43_43_2_f_0((MR_String) "]\n", Var_90);
            Var_93 = mercury__string__f_43_43_2_f_0(AssertionsStr_72, Var_92);
            Var_95 = mercury__string__f_43_43_2_f_0((MR_String) "[", Var_93);
            Var_96 = mercury__string__f_43_43_2_f_0(I1_74, Var_95);
            FinalStr_73 = mercury__string__f_43_43_2_f_0((MR_String) "\n", Var_96);
          }
          break;
        case (MR_Integer) 0:
          {
            MR_String Var_87;

            Var_87 = mercury__string__f_43_43_2_f_0(AssertionsStr_72, (MR_String) "])");
            FinalStr_73 = mercury__string__f_43_43_2_f_0((MR_String) " [", Var_87);
          }
          break;
      }
      func_31 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
      func_31(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (FinalStr_73)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv32_STATE_VARIABLE_U_16);
    }
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_57_51_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_String X_8,
  MR_Word Xs_9,
  MR_Word S_10)
{
  while (MR_TRUE)
  {
    MR_Word TypeClassInfo_for_writer_26;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_14_24;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    func_0(((MR_Box) (Var_21)), ((MR_Box) (Var_22)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_14_24);
    mercury__private_builtin__superclass_from_typeclass_info_3_p_0(Var_21, (MR_Integer) 1, &TypeClassInfo_for_writer_26);
    mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_26, S_10, X_8);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (Var_21)), ((MR_Box) (Var_23)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_16_16);
    if (!((Xs_9 == (MR_Word) ((MR_Unsigned) 0U))))
    {
      MR_String HeadX_12 = ((MR_String) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv5_STATE_VARIABLE_U_18_18;
      MR_String next_value_of_X_8;
      MR_Word next_value_of_Xs_9;

      func_4(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 6)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word MoreFunctorsRepn_12)
{
  MR_Word Functor1_14 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 0))));
  MR_Word Functor2_15 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 1))));
  MR_Word OtherFunctors_16 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepn_17 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 3))));

  switch (TypeRepnFor_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Integer Indent1_20 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
        MR_String I_21;
        MR_Integer Var_65;
        MR_String NlI_85;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_53_53;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_56_56;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_59_59;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_62_62;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_68_68;
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv25_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv27_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_23;

        I_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_53_53);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_21)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_54_54);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "gen_du_more_functors(")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_56_56);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, TVarSet_11, Functor1_14, S_8);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_59_59);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, TVarSet_11, Functor2_15, S_8);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_62_62);
        Var_65 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 2);
        NlI_85 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_20);
        if ((OtherFunctors_16 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv11_STATE_VARIABLE_U_17_88;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_64_64;

          func_10(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_17_88);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_64_64);
        }
        else
        {
          MR_Word HeadX_86 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_16, (MR_Integer) 0))));
          MR_Word TailXs_87 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_16, (MR_Integer) 1))));
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv15_STATE_VARIABLE_U_20_90;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_22_92;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_24_94;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_64_64;

          func_14(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_20_90);
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_22_92);
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_49_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Var_65, TVarSet_11, TypeClassInfo_for_pt_output_74, HeadX_86, TailXs_87, S_8);
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_24_94);
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_64_64);
        }
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_68_68);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, S_8, TypeRepnFor_9, Indent1_20, MaybeCJCsRepn_17);
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_24(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_71_71);
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_21)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_72_72);
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_23);
      }
      break;
    case (MR_Integer) 0:
      {
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv31_STATE_VARIABLE_U_25_25;
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv33_STATE_VARIABLE_U_29_29;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv35_STATE_VARIABLE_U_33_33;
        void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv45_STATE_VARIABLE_U_46_46;
        void MR_CALL (* func_46)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv47_STATE_VARIABLE_U_23;

        func_30(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "gen_du_more_functors(")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv31_STATE_VARIABLE_U_25_25);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, TVarSet_11, Functor1_14, S_8);
        func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_32(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv33_STATE_VARIABLE_U_29_29);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, TVarSet_11, Functor2_15, S_8);
        func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_34(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv35_STATE_VARIABLE_U_33_33);
        if ((OtherFunctors_16 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv37_STATE_VARIABLE_U_35_35;

          func_36(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv37_STATE_VARIABLE_U_35_35);
        }
        else
        {
          MR_Word Var_38;
          void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv39_STATE_VARIABLE_U_37_37;
          void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv41_STATE_VARIABLE_U_41_41;
          void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv43_STATE_VARIABLE_U_35_35;

          func_38(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv39_STATE_VARIABLE_U_37_37);
          {
            Var_38 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Var_38, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_9[2]));
            MR_hl_field(0, Var_38, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1));
            MR_hl_field(0, Var_38, 2) = ((MR_Box) ((MR_Integer) 4));
            MR_hl_field(0, Var_38, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_74));
            MR_hl_field(0, Var_38, 4) = ((MR_Box) (TypeRepnFor_9));
            MR_hl_field(0, Var_38, 5) = ((MR_Box) ((MR_Integer) 0));
            MR_hl_field(0, Var_38, 6) = ((MR_Box) (TVarSet_11));
          }
          func_40 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 25))));
          func_40(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_gen_du_functor_repn_0)), ((MR_Box) (Var_38)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (OtherFunctors_16)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv41_STATE_VARIABLE_U_41_41);
          func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_42(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv43_STATE_VARIABLE_U_35_35);
        }
        func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_44(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv45_STATE_VARIABLE_U_46_46);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, S_8, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_17);
        func_46 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_46(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv47_STATE_VARIABLE_U_23);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_53_49_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10)
{
  while (MR_TRUE)
  {
    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(Var_21, Var_22, Var_23, Var_24, X_8, S_10);
    if (!((Xs_9 == (MR_Word) ((MR_Unsigned) 0U))))
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv1_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_71,
  MR_Word S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word OnlyFunctorRepn_12)
{
  MR_String FunctorName_14 = ((MR_String) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 0))));
  MR_Word ArgTypes_15 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 1))));
  MR_Word CRepns_16 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepn_17 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 3))));

  switch (TypeRepnFor_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Word TypeClassInfo_for_writer_92;
        MR_Integer Indent1_18 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
        MR_Integer Indent2_19 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 2);
        MR_String I_20;
        MR_String I1_21;
        MR_String NlI2_22;
        MR_Word Var_62;
        MR_String NlI_94;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_49_49;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_52_52;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_53_53;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_56_56;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_61_61;
        MR_Box conv24_STATE_VARIABLE_U_63_63;
        void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv26_STATE_VARIABLE_U_65_65;
        void MR_CALL (* func_27)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv28_STATE_VARIABLE_U_68_68;
        void MR_CALL (* func_29)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv30_STATE_VARIABLE_U_69_69;
        void MR_CALL (* func_31)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv32_STATE_VARIABLE_U_24;

        I_20 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
        I1_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent1_18);
        NlI2_22 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent2_19);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_49_49);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I_20)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_50_50);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "gen_du_only_functor(\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_52_52);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I1_21)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_53_53);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_71, (MR_Integer) 1, &TypeClassInfo_for_writer_92);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_92, S_8, FunctorName_14);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_56_56);
        NlI_94 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        if ((ArgTypes_15 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv11_STATE_VARIABLE_U_17_97;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_58_58;

          func_10(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_17_97);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_58_58);
        }
        else
        {
          MR_Word HeadX_95 = ((MR_Word) ((MR_hl_field(1, ArgTypes_15, (MR_Integer) 0))));
          MR_Word TailXs_96 = ((MR_Word) ((MR_hl_field(1, ArgTypes_15, (MR_Integer) 1))));
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv15_STATE_VARIABLE_U_20_99;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_22_101;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_24_103;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_58_58;

          func_14(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_20_99);
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_22_101);
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_55_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_71, NlI2_22, (MR_String) "", TVarSet_11, TypeClassInfo_for_pt_output_71, HeadX_95, TailXs_96, S_8);
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_24_103);
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_58_58);
        }
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_61_61);
        {
          Var_62 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_62, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[13]));
          MR_hl_field(0, Var_62, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1));
          MR_hl_field(0, Var_62, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_62, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_62, 4) = ((MR_Box) (TypeRepnFor_9));
          MR_hl_field(0, Var_62, 5) = ((MR_Box) (Indent2_19));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, Indent1_18, Var_62, CRepns_16, ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv24_STATE_VARIABLE_U_63_63);
        func_25 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_25(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv26_STATE_VARIABLE_U_65_65);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_71, S_8, TypeRepnFor_9, Indent1_18, MaybeCJCsRepn_17);
        func_27 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_27(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv28_STATE_VARIABLE_U_68_68);
        func_29 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_29(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I_20)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv30_STATE_VARIABLE_U_69_69);
        func_31 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_31(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv32_STATE_VARIABLE_U_24);
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word TypeClassInfo_for_writer_106;
        MR_Word Var_30;
        MR_Word Var_37;
        void MR_CALL (* func_33)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv34_STATE_VARIABLE_U_26_26;
        void MR_CALL (* func_35)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv36_STATE_VARIABLE_U_29_29;
        void MR_CALL (* func_37)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv38_STATE_VARIABLE_U_32_32;
        void MR_CALL (* func_39)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv40_STATE_VARIABLE_U_35_35;
        MR_Box conv41_STATE_VARIABLE_U_38_38;
        void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv43_STATE_VARIABLE_U_41_41;
        void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv45_STATE_VARIABLE_U_24;

        func_33(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "gen_du_only_functor(")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv34_STATE_VARIABLE_U_26_26);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_71, (MR_Integer) 1, &TypeClassInfo_for_writer_106);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_106, S_8, FunctorName_14);
        func_35 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_35(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ", [")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv36_STATE_VARIABLE_U_29_29);
        {
          Var_30 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[11]));
          MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2));
          MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_30, 4) = ((MR_Box) (TVarSet_11));
          MR_hl_field(0, Var_30, 5) = ((MR_Box) ((MR_Integer) 2));
        }
        func_37 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 25))));
        func_37(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0)), ((MR_Box) (Var_30)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (ArgTypes_15)), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv38_STATE_VARIABLE_U_32_32);
        func_39 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_39(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "],")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv40_STATE_VARIABLE_U_35_35);
        {
          Var_37 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_37, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[13]));
          MR_hl_field(0, Var_37, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3));
          MR_hl_field(0, Var_37, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_37, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_37, 4) = ((MR_Box) (TypeRepnFor_9));
          MR_hl_field(0, Var_37, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, (MR_Integer) 0, Var_37, CRepns_16, ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv41_STATE_VARIABLE_U_38_38);
        func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_42(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv43_STATE_VARIABLE_U_41_41);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_71, S_8, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_17);
        func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_44(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_8)), ((MR_Box) ((MR_Integer) 0)), &conv45_STATE_VARIABLE_U_24);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepn_10)
{
  MR_bool succeeded;
  MR_Word MaybeRepnC_12 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 0))));
  MR_Word MaybeRepnJava_13 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 1))));
  MR_Word MaybeRepnCsharp_14 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 2))));

  succeeded = (MaybeRepnC_12 == (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = (MaybeRepnJava_13 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
      succeeded = (MaybeRepnCsharp_14 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I_15;
          void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv1_STATE_VARIABLE_U_21_21;
          void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv3_STATE_VARIABLE_U_18;

          I_15 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_0(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_15)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_21_21);
          func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_2(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "no_c_j_cs")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv5_STATE_VARIABLE_U_18;

          func_4(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " no_c_j_cs")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_18);
        }
        break;
    }
  else
  {
    MR_Integer Indent1_16 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I_51;
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv7_STATE_VARIABLE_U_36_36;
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv9_STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv11_STATE_VARIABLE_U_41_41;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_44_44;
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv15_STATE_VARIABLE_U_47_47;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_48_48;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_18;

          I_51 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_6(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_51)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_36_36);
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "c_j_cs(\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_38_38);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnC_12);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_41_41);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnJava_13);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv13_STATE_VARIABLE_U_44_44);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnCsharp_14);
          func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_14(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv15_STATE_VARIABLE_U_47_47);
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_51)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv17_STATE_VARIABLE_U_48_48);
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv19_STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv21_STATE_VARIABLE_U_26_26;
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv23_STATE_VARIABLE_U_29_29;
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv25_STATE_VARIABLE_U_32_32;
          void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv27_STATE_VARIABLE_U_18;

          func_20(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " c_j_cs(")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv21_STATE_VARIABLE_U_26_26);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnC_12);
          func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_22(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv23_STATE_VARIABLE_U_29_29);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnJava_13);
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_32_32);
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnCsharp_14);
          func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_26(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_18);
        }
        break;
    }
  }
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv6_Str_4;

  conv6_Str_4 = parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv6_Str_4));
  return wrapper_arg_2;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_18,
  MR_Word S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepn_10)
{
  if ((MaybeTypeRepn_10 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_String I_12;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv1_STATE_VARIABLE_U_16_16;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_15;

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_12 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_12 = (MR_String) "";
        break;
    }
    func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_0(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (I_12)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_16_16);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) ((MR_String) "no_foreign")), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_15);
  }
  else
  {
    MR_Word TypeRepn_13 = ((MR_Word) ((MR_hl_field(1, MaybeTypeRepn_10, (MR_Integer) 0))));
    MR_String ForeignTypeName_19 = ((MR_String) ((MR_hl_field(0, TypeRepn_13, (MR_Integer) 0))));
    MR_Word ForeignTypeAssertions_20 = ((MR_Word) ((MR_hl_field(0, TypeRepn_13, (MR_Integer) 1))));
    MR_String I_21;
    MR_Word Assertions_22;
    MR_Word AssertionsList_23;
    MR_String InitStr_24;
    MR_Word AssertionStrs_25;
    MR_String AssertionsStr_26;
    MR_String FinalStr_27;
    MR_String Var_37;
    MR_String Var_39;
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv5_STATE_VARIABLE_U_30_29;
    void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv8_STATE_VARIABLE_U_15;

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_21 = (MR_String) "";
        break;
    }
    Assertions_22 = (MR_Word) (ForeignTypeAssertions_20);
    mercury__set__to_sorted_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), Assertions_22, &AssertionsList_23);
    Var_37 = mercury__string__f_43_43_2_f_0(ForeignTypeName_19, (MR_String) "\",");
    Var_39 = mercury__string__f_43_43_2_f_0((MR_String) "foreign_type(\"", Var_37);
    InitStr_24 = mercury__string__f_43_43_2_f_0(I_21, Var_39);
    func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_4(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (InitStr_24)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_30_29);
    AssertionStrs_25 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_7[4]), AssertionsList_23);
    AssertionsStr_26 = mercury__string__join_list_2_f_0((MR_String) ", ", AssertionStrs_25);
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I1_28;
          MR_Integer Var_32 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
          MR_String Var_44;
          MR_String Var_46;
          MR_String Var_47;
          MR_String Var_49;
          MR_String Var_50;

          I1_28 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_32);
          Var_44 = mercury__string__f_43_43_2_f_0(I_21, (MR_String) ")");
          Var_46 = mercury__string__f_43_43_2_f_0((MR_String) "]\n", Var_44);
          Var_47 = mercury__string__f_43_43_2_f_0(AssertionsStr_26, Var_46);
          Var_49 = mercury__string__f_43_43_2_f_0((MR_String) "[", Var_47);
          Var_50 = mercury__string__f_43_43_2_f_0(I1_28, Var_49);
          FinalStr_27 = mercury__string__f_43_43_2_f_0((MR_String) "\n", Var_50);
        }
        break;
      case (MR_Integer) 0:
        {
          MR_String Var_41;

          Var_41 = mercury__string__f_43_43_2_f_0(AssertionsStr_26, (MR_String) "])");
          FinalStr_27 = mercury__string__f_43_43_2_f_0((MR_String) " [", Var_41);
        }
        break;
    }
    func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_7(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (FinalStr_27)), ((MR_Box) (S_7)), ((MR_Box) ((MR_Integer) 0)), &conv8_STATE_VARIABLE_U_15);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_21,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word DuRepn_12,
  MR_Word STATE_VARIABLE_U_0_19,
  MR_Word * STATE_VARIABLE_U_20)
{
  switch (MR_tag((MR_Word) DuRepn_12)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word DummyRepn_14 = (MR_Word) ((MR_Word) (DuRepn_12));
        MR_String FunctorName_22 = ((MR_String) ((MR_hl_field(0, DummyRepn_14, (MR_Integer) 0))));
        MR_Word MaybeCJCsRepnOrEnum_23 = ((MR_Word) ((MR_hl_field(0, DummyRepn_14, (MR_Integer) 1))));

        switch (TypeRepnFor_9) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word TypeClassInfo_for_writer_49;
              MR_String I_24;
              MR_Word STATE_VARIABLE_U_28_35;
              MR_Word STATE_VARIABLE_U_29_36;
              MR_Word STATE_VARIABLE_U_31_38;
              MR_Word STATE_VARIABLE_U_32_39;
              MR_Word STATE_VARIABLE_U_34_41;
              MR_Integer Var_42;
              MR_Word STATE_VARIABLE_U_36_43;
              MR_Word STATE_VARIABLE_U_39_46;
              MR_Word STATE_VARIABLE_U_40_47;
              void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv1_STATE_VARIABLE_U_28_35;
              void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv3_STATE_VARIABLE_U_29_36;
              void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv5_STATE_VARIABLE_U_31_38;
              void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv7_STATE_VARIABLE_U_34_41;
              void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv9_STATE_VARIABLE_U_39_46;
              void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv11_STATE_VARIABLE_U_40_47;
              void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv13_STATE_VARIABLE_U_20;

              I_24 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
              func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_0(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_19)), &conv1_STATE_VARIABLE_U_28_35);
              STATE_VARIABLE_U_28_35 = ((MR_Word) (conv1_STATE_VARIABLE_U_28_35));
              func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_2(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_24)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_28_35)), &conv3_STATE_VARIABLE_U_29_36);
              STATE_VARIABLE_U_29_36 = ((MR_Word) (conv3_STATE_VARIABLE_U_29_36));
              func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_4(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "direct_dummy(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_29_36)), &conv5_STATE_VARIABLE_U_31_38);
              STATE_VARIABLE_U_31_38 = ((MR_Word) (conv5_STATE_VARIABLE_U_31_38));
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_49);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_49, FunctorName_22, STATE_VARIABLE_U_31_38, &STATE_VARIABLE_U_32_39);
              func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_6(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_32_39)), &conv7_STATE_VARIABLE_U_34_41);
              STATE_VARIABLE_U_34_41 = ((MR_Word) (conv7_STATE_VARIABLE_U_34_41));
              Var_42 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, Var_42, MaybeCJCsRepnOrEnum_23, STATE_VARIABLE_U_34_41, &STATE_VARIABLE_U_36_43);
              func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_8(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_36_43)), &conv9_STATE_VARIABLE_U_39_46);
              STATE_VARIABLE_U_39_46 = ((MR_Word) (conv9_STATE_VARIABLE_U_39_46));
              func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_10(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_24)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_46)), &conv11_STATE_VARIABLE_U_40_47);
              STATE_VARIABLE_U_40_47 = ((MR_Word) (conv11_STATE_VARIABLE_U_40_47));
              func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_12(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_40_47)), &conv13_STATE_VARIABLE_U_20);
              *STATE_VARIABLE_U_20 = ((MR_Word) (conv13_STATE_VARIABLE_U_20));
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word TypeClassInfo_for_writer_51;
              MR_Word STATE_VARIABLE_U_18_26;
              MR_Word STATE_VARIABLE_U_19_27;
              MR_Word STATE_VARIABLE_U_21_29;
              MR_Integer Var_30;
              MR_Word STATE_VARIABLE_U_23_31;
              void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              MR_Box conv15_STATE_VARIABLE_U_18_26;
              void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv17_STATE_VARIABLE_U_21_29;
              void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv19_STATE_VARIABLE_U_20;

              func_14(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "direct_dummy(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_19)), &conv15_STATE_VARIABLE_U_18_26);
              STATE_VARIABLE_U_18_26 = ((MR_Word) (conv15_STATE_VARIABLE_U_18_26));
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_51);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_51, FunctorName_22, STATE_VARIABLE_U_18_26, &STATE_VARIABLE_U_19_27);
              func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_16(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_19_27)), &conv17_STATE_VARIABLE_U_21_29);
              STATE_VARIABLE_U_21_29 = ((MR_Word) (conv17_STATE_VARIABLE_U_21_29));
              Var_30 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, Var_30, MaybeCJCsRepnOrEnum_23, STATE_VARIABLE_U_21_29, &STATE_VARIABLE_U_23_31);
              func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_18(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_31)), &conv19_STATE_VARIABLE_U_20);
              *STATE_VARIABLE_U_20 = ((MR_Word) (conv19_STATE_VARIABLE_U_20));
            }
            break;
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word EnumRepn_15 = (MR_Word) (MR_body((MR_Word) (DuRepn_12), (MR_Integer) 1));

        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, Indent_10, EnumRepn_15, STATE_VARIABLE_U_0_19, STATE_VARIABLE_U_20);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word NotagRepn_16 = (MR_Word) (MR_body((MR_Word) (DuRepn_12), (MR_Integer) 2));
        MR_String FunctorName_53 = ((MR_String) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 0))));
        MR_Word ArgType_54 = ((MR_Word) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 1))));
        MR_Word MaybeCJCsRepn_55 = ((MR_Word) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 2))));

        switch (TypeRepnFor_9) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word TypeClassInfo_for_writer_93;
              MR_String I_56;
              MR_String I1_57;
              MR_Integer Var_70;
              MR_Word STATE_VARIABLE_U_37_73;
              MR_Word STATE_VARIABLE_U_38_74;
              MR_Word STATE_VARIABLE_U_40_76;
              MR_Word STATE_VARIABLE_U_41_77;
              MR_Word STATE_VARIABLE_U_42_78;
              MR_Word STATE_VARIABLE_U_44_80;
              MR_Word STATE_VARIABLE_U_45_81;
              MR_Word STATE_VARIABLE_U_47_83;
              MR_Word STATE_VARIABLE_U_49_85;
              MR_Integer Var_86;
              MR_Word STATE_VARIABLE_U_51_87;
              MR_Word STATE_VARIABLE_U_54_90;
              MR_Word STATE_VARIABLE_U_55_91;
              void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv21_STATE_VARIABLE_U_37_73;
              void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv23_STATE_VARIABLE_U_38_74;
              void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv25_STATE_VARIABLE_U_40_76;
              void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv27_STATE_VARIABLE_U_41_77;
              void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv29_STATE_VARIABLE_U_44_80;
              void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv31_STATE_VARIABLE_U_45_81;
              void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv33_STATE_VARIABLE_U_49_85;
              void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv35_STATE_VARIABLE_U_54_90;
              void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv37_STATE_VARIABLE_U_55_91;
              void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv39_STATE_VARIABLE_U_20;

              I_56 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
              Var_70 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              I1_57 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_70);
              func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_20(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_19)), &conv21_STATE_VARIABLE_U_37_73);
              STATE_VARIABLE_U_37_73 = ((MR_Word) (conv21_STATE_VARIABLE_U_37_73));
              func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_22(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_56)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_37_73)), &conv23_STATE_VARIABLE_U_38_74);
              STATE_VARIABLE_U_38_74 = ((MR_Word) (conv23_STATE_VARIABLE_U_38_74));
              func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_24(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "notag(\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_38_74)), &conv25_STATE_VARIABLE_U_40_76);
              STATE_VARIABLE_U_40_76 = ((MR_Word) (conv25_STATE_VARIABLE_U_40_76));
              func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_26(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I1_57)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_40_76)), &conv27_STATE_VARIABLE_U_41_77);
              STATE_VARIABLE_U_41_77 = ((MR_Word) (conv27_STATE_VARIABLE_U_41_77));
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_93);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_93, FunctorName_53, STATE_VARIABLE_U_41_77, &STATE_VARIABLE_U_42_78);
              func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_28(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_42_78)), &conv29_STATE_VARIABLE_U_44_80);
              STATE_VARIABLE_U_44_80 = ((MR_Word) (conv29_STATE_VARIABLE_U_44_80));
              func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_30(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I1_57)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_44_80)), &conv31_STATE_VARIABLE_U_45_81);
              STATE_VARIABLE_U_45_81 = ((MR_Word) (conv31_STATE_VARIABLE_U_45_81));
              parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TVarSet_11, (MR_Integer) 2, ArgType_54, STATE_VARIABLE_U_45_81, &STATE_VARIABLE_U_47_83);
              func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_32(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_47_83)), &conv33_STATE_VARIABLE_U_49_85);
              STATE_VARIABLE_U_49_85 = ((MR_Word) (conv33_STATE_VARIABLE_U_49_85));
              Var_86 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, Var_86, MaybeCJCsRepn_55, STATE_VARIABLE_U_49_85, &STATE_VARIABLE_U_51_87);
              func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_34(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_51_87)), &conv35_STATE_VARIABLE_U_54_90);
              STATE_VARIABLE_U_54_90 = ((MR_Word) (conv35_STATE_VARIABLE_U_54_90));
              func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_36(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_56)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_54_90)), &conv37_STATE_VARIABLE_U_55_91);
              STATE_VARIABLE_U_55_91 = ((MR_Word) (conv37_STATE_VARIABLE_U_55_91));
              func_38 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_38(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_55_91)), &conv39_STATE_VARIABLE_U_20);
              *STATE_VARIABLE_U_20 = ((MR_Word) (conv39_STATE_VARIABLE_U_20));
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word TypeClassInfo_for_writer_95;
              MR_Word STATE_VARIABLE_U_22_59;
              MR_Word STATE_VARIABLE_U_23_60;
              MR_Word STATE_VARIABLE_U_25_62;
              MR_Word STATE_VARIABLE_U_27_64;
              MR_Word STATE_VARIABLE_U_29_66;
              MR_Word STATE_VARIABLE_U_31_68;
              void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              MR_Box conv41_STATE_VARIABLE_U_22_59;
              void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv43_STATE_VARIABLE_U_25_62;
              void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv45_STATE_VARIABLE_U_29_66;
              void MR_CALL (* func_46)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              MR_Box conv47_STATE_VARIABLE_U_20;

              func_40(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "notag(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_19)), &conv41_STATE_VARIABLE_U_22_59);
              STATE_VARIABLE_U_22_59 = ((MR_Word) (conv41_STATE_VARIABLE_U_22_59));
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_95);
              mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_95, FunctorName_53, STATE_VARIABLE_U_22_59, &STATE_VARIABLE_U_23_60);
              func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_42(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_60)), &conv43_STATE_VARIABLE_U_25_62);
              STATE_VARIABLE_U_25_62 = ((MR_Word) (conv43_STATE_VARIABLE_U_25_62));
              parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TVarSet_11, (MR_Integer) 2, ArgType_54, STATE_VARIABLE_U_25_62, &STATE_VARIABLE_U_27_64);
              func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_44(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_27_64)), &conv45_STATE_VARIABLE_U_29_66);
              STATE_VARIABLE_U_29_66 = ((MR_Word) (conv45_STATE_VARIABLE_U_29_66));
              parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_55, STATE_VARIABLE_U_29_66, &STATE_VARIABLE_U_31_68);
              func_46 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_46(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_31_68)), &conv47_STATE_VARIABLE_U_20);
              *STATE_VARIABLE_U_20 = ((MR_Word) (conv47_STATE_VARIABLE_U_20));
            }
            break;
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word OnlyFunctorRepn_17 = ((MR_Word) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 1))));

            parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, Indent_10, TVarSet_11, OnlyFunctorRepn_17, STATE_VARIABLE_U_0_19, STATE_VARIABLE_U_20);
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word MoreFunctorsRepn_18 = ((MR_Word) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 1))));

            parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_21, TypeRepnFor_9, Indent_10, TVarSet_11, MoreFunctorsRepn_18, STATE_VARIABLE_U_0_19, STATE_VARIABLE_U_20);
          }
          break;
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv48_STATE_VARIABLE_U_9;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_String) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv48_STATE_VARIABLE_U_9);
  *wrapper_arg_4 = ((MR_Box) (conv48_STATE_VARIABLE_U_9));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word EnumRepn_10,
  MR_Word STATE_VARIABLE_U_0_21,
  MR_Word * STATE_VARIABLE_U_22)
{
  MR_String Functor1_12 = ((MR_String) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 0))));
  MR_String Functor2_13 = ((MR_String) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 1))));
  MR_Word OtherFunctors_14 = ((MR_Word) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepnOrEnum_15 = ((MR_Word) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 3))));

  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Word TypeClassInfo_for_writer_87;
        MR_Word TypeClassInfo_for_writer_91;
        MR_Integer Indent1_18 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        MR_String I_19;
        MR_String NlI1_20;
        MR_Word STATE_VARIABLE_U_49_49;
        MR_Word STATE_VARIABLE_U_50_50;
        MR_Word STATE_VARIABLE_U_52_52;
        MR_Word STATE_VARIABLE_U_54_54;
        MR_Word STATE_VARIABLE_U_56_56;
        MR_Word STATE_VARIABLE_U_58_58;
        MR_Word STATE_VARIABLE_U_60_60;
        MR_Word STATE_VARIABLE_U_62_62;
        MR_String Var_63;
        MR_Integer Var_64;
        MR_Word STATE_VARIABLE_U_68_68;
        MR_Word STATE_VARIABLE_U_69_69;
        MR_Word STATE_VARIABLE_U_71_71;
        MR_Word STATE_VARIABLE_U_72_72;
        MR_Word STATE_VARIABLE_U_14_85;
        MR_Word STATE_VARIABLE_U_15_86;
        MR_Word STATE_VARIABLE_U_14_89;
        MR_Word STATE_VARIABLE_U_15_90;
        MR_String NlI_93;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_49_49;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_52_52;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_14_85;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv11_STATE_VARIABLE_U_56_56;
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv13_STATE_VARIABLE_U_14_89;
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv15_STATE_VARIABLE_U_58_58;
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv17_STATE_VARIABLE_U_60_60;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_68_68;
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv33_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv35_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv37_STATE_VARIABLE_U_22;

        I_19 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        NlI1_20 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_21)), &conv1_STATE_VARIABLE_U_49_49);
        STATE_VARIABLE_U_49_49 = ((MR_Word) (conv1_STATE_VARIABLE_U_49_49));
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_19)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_49_49)), &conv3_STATE_VARIABLE_U_50_50);
        STATE_VARIABLE_U_50_50 = ((MR_Word) (conv3_STATE_VARIABLE_U_50_50));
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "enum(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_50_50)), &conv5_STATE_VARIABLE_U_52_52);
        STATE_VARIABLE_U_52_52 = ((MR_Word) (conv5_STATE_VARIABLE_U_52_52));
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI1_20)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_52_52)), &conv7_STATE_VARIABLE_U_14_85);
        STATE_VARIABLE_U_14_85 = ((MR_Word) (conv7_STATE_VARIABLE_U_14_85));
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_87);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_87, Functor1_12, STATE_VARIABLE_U_14_85, &STATE_VARIABLE_U_15_86);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_15_86)), &conv9_STATE_VARIABLE_U_54_54);
        STATE_VARIABLE_U_54_54 = ((MR_Word) (conv9_STATE_VARIABLE_U_54_54));
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_54_54)), &conv11_STATE_VARIABLE_U_56_56);
        STATE_VARIABLE_U_56_56 = ((MR_Word) (conv11_STATE_VARIABLE_U_56_56));
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI1_20)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_56_56)), &conv13_STATE_VARIABLE_U_14_89);
        STATE_VARIABLE_U_14_89 = ((MR_Word) (conv13_STATE_VARIABLE_U_14_89));
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_91);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_91, Functor2_13, STATE_VARIABLE_U_14_89, &STATE_VARIABLE_U_15_90);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_15_90)), &conv15_STATE_VARIABLE_U_58_58);
        STATE_VARIABLE_U_58_58 = ((MR_Word) (conv15_STATE_VARIABLE_U_58_58));
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_58_58)), &conv17_STATE_VARIABLE_U_60_60);
        STATE_VARIABLE_U_60_60 = ((MR_Word) (conv17_STATE_VARIABLE_U_60_60));
        Var_64 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        Var_63 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_64);
        NlI_93 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        if ((OtherFunctors_14 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          MR_Word STATE_VARIABLE_U_17_96;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv19_STATE_VARIABLE_U_17_96;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_62_62;

          func_18(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_60_60)), &conv19_STATE_VARIABLE_U_17_96);
          STATE_VARIABLE_U_17_96 = ((MR_Word) (conv19_STATE_VARIABLE_U_17_96));
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_96)), &conv21_STATE_VARIABLE_U_62_62);
          STATE_VARIABLE_U_62_62 = ((MR_Word) (conv21_STATE_VARIABLE_U_62_62));
        }
        else
        {
          MR_String HeadX_94 = ((MR_String) ((MR_hl_field(1, OtherFunctors_14, (MR_Integer) 0))));
          MR_Word TailXs_95 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_14, (MR_Integer) 1))));
          MR_Word STATE_VARIABLE_U_20_98;
          MR_Word STATE_VARIABLE_U_22_100;
          MR_Word STATE_VARIABLE_U_23_101;
          MR_Word STATE_VARIABLE_U_24_102;
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv23_STATE_VARIABLE_U_20_98;
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv25_STATE_VARIABLE_U_22_100;
          void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv27_STATE_VARIABLE_U_24_102;
          void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv29_STATE_VARIABLE_U_62_62;

          func_22(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_60_60)), &conv23_STATE_VARIABLE_U_20_98);
          STATE_VARIABLE_U_20_98 = ((MR_Word) (conv23_STATE_VARIABLE_U_20_98));
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_98)), &conv25_STATE_VARIABLE_U_22_100);
          STATE_VARIABLE_U_22_100 = ((MR_Word) (conv25_STATE_VARIABLE_U_22_100));
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_56_54_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_74, Var_63, (MR_String) "", TypeClassInfo_for_pt_output_74, HeadX_94, TailXs_95, STATE_VARIABLE_U_22_100, &STATE_VARIABLE_U_23_101);
          func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_26(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_101)), &conv27_STATE_VARIABLE_U_24_102);
          STATE_VARIABLE_U_24_102 = ((MR_Word) (conv27_STATE_VARIABLE_U_24_102));
          func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_28(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_102)), &conv29_STATE_VARIABLE_U_62_62);
          STATE_VARIABLE_U_62_62 = ((MR_Word) (conv29_STATE_VARIABLE_U_62_62));
        }
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_62_62)), &conv31_STATE_VARIABLE_U_68_68);
        STATE_VARIABLE_U_68_68 = ((MR_Word) (conv31_STATE_VARIABLE_U_68_68));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_8, Indent1_18, MaybeCJCsRepnOrEnum_15, STATE_VARIABLE_U_68_68, &STATE_VARIABLE_U_69_69);
        func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_32(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_69_69)), &conv33_STATE_VARIABLE_U_71_71);
        STATE_VARIABLE_U_71_71 = ((MR_Word) (conv33_STATE_VARIABLE_U_71_71));
        func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_34(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_19)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_71_71)), &conv35_STATE_VARIABLE_U_72_72);
        STATE_VARIABLE_U_72_72 = ((MR_Word) (conv35_STATE_VARIABLE_U_72_72));
        func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_36(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_72_72)), &conv37_STATE_VARIABLE_U_22);
        *STATE_VARIABLE_U_22 = ((MR_Word) (conv37_STATE_VARIABLE_U_22));
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word TypeClassInfo_for_writer_105;
        MR_Word TypeClassInfo_for_writer_107;
        MR_Word STATE_VARIABLE_U_24_24;
        MR_Word STATE_VARIABLE_U_25_25;
        MR_Word STATE_VARIABLE_U_27_27;
        MR_Word STATE_VARIABLE_U_28_28;
        MR_Word STATE_VARIABLE_U_30_30;
        MR_Word STATE_VARIABLE_U_32_32;
        MR_Word STATE_VARIABLE_U_42_42;
        MR_Word STATE_VARIABLE_U_44_44;
        void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv39_STATE_VARIABLE_U_24_24;
        void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv41_STATE_VARIABLE_U_27_27;
        void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv43_STATE_VARIABLE_U_30_30;
        void MR_CALL (* func_53)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv54_STATE_VARIABLE_U_42_42;
        void MR_CALL (* func_55)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv56_STATE_VARIABLE_U_22;

        func_38(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "enum(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_21)), &conv39_STATE_VARIABLE_U_24_24);
        STATE_VARIABLE_U_24_24 = ((MR_Word) (conv39_STATE_VARIABLE_U_24_24));
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_105);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_105, Functor1_12, STATE_VARIABLE_U_24_24, &STATE_VARIABLE_U_25_25);
        func_40 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_40(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_25_25)), &conv41_STATE_VARIABLE_U_27_27);
        STATE_VARIABLE_U_27_27 = ((MR_Word) (conv41_STATE_VARIABLE_U_27_27));
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_107);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_107, Functor2_13, STATE_VARIABLE_U_27_27, &STATE_VARIABLE_U_28_28);
        func_42 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_42(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_28_28)), &conv43_STATE_VARIABLE_U_30_30);
        STATE_VARIABLE_U_30_30 = ((MR_Word) (conv43_STATE_VARIABLE_U_30_30));
        if ((OtherFunctors_14 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv45_STATE_VARIABLE_U_32_32;

          func_44(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_30_30)), &conv45_STATE_VARIABLE_U_32_32);
          STATE_VARIABLE_U_32_32 = ((MR_Word) (conv45_STATE_VARIABLE_U_32_32));
        }
        else
        {
          MR_Word STATE_VARIABLE_U_34_34;
          MR_Word Var_35;
          MR_Word STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_46)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv47_STATE_VARIABLE_U_34_34;
          void MR_CALL (* func_49)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv50_STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_51)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv52_STATE_VARIABLE_U_32_32;

          func_46(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_30_30)), &conv47_STATE_VARIABLE_U_34_34);
          STATE_VARIABLE_U_34_34 = ((MR_Word) (conv47_STATE_VARIABLE_U_34_34));
          {
            Var_35 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Var_35, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_5[1]));
            MR_hl_field(0, Var_35, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
            MR_hl_field(0, Var_35, 2) = ((MR_Box) ((MR_Integer) 1));
            MR_hl_field(0, Var_35, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_74));
          }
          func_49 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 25))));
          func_49(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)), ((MR_Box) (Var_35)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (OtherFunctors_14)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_34_34)), &conv50_STATE_VARIABLE_U_38_38);
          STATE_VARIABLE_U_38_38 = ((MR_Word) (conv50_STATE_VARIABLE_U_38_38));
          func_51 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_51(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_38_38)), &conv52_STATE_VARIABLE_U_32_32);
          STATE_VARIABLE_U_32_32 = ((MR_Word) (conv52_STATE_VARIABLE_U_32_32));
        }
        func_53 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_53(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_32_32)), &conv54_STATE_VARIABLE_U_42_42);
        STATE_VARIABLE_U_42_42 = ((MR_Word) (conv54_STATE_VARIABLE_U_42_42));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_8, (MR_Integer) 0, MaybeCJCsRepnOrEnum_15, STATE_VARIABLE_U_42_42, &STATE_VARIABLE_U_44_44);
        func_55 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_55(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_44_44)), &conv56_STATE_VARIABLE_U_22);
        *STATE_VARIABLE_U_22 = ((MR_Word) (conv56_STATE_VARIABLE_U_22));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_111_114_95_101_110_117_109_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepnOrEnum_10,
  MR_Word STATE_VARIABLE_U_0_17,
  MR_Word * STATE_VARIABLE_U_18)
{
  MR_bool succeeded;
  MR_Word MaybeRepnOrEnumC_12 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 0))));
  MR_Word MaybeRepnOrEnumJava_13 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 1))));
  MR_Word MaybeRepnOrEnumCsharp_14 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 2))));
  MR_Integer Indent1_15 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
  MR_String I_16;

  I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
  succeeded = (MaybeRepnOrEnumC_12 == (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = (MaybeRepnOrEnumJava_13 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
      succeeded = (MaybeRepnOrEnumCsharp_14 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_Word STATE_VARIABLE_U_22_22;
          void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv1_STATE_VARIABLE_U_22_22;
          void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv3_STATE_VARIABLE_U_18;

          func_0(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv1_STATE_VARIABLE_U_22_22);
          STATE_VARIABLE_U_22_22 = ((MR_Word) (conv1_STATE_VARIABLE_U_22_22));
          func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_2(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "no_c_j_cs")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_22_22)), &conv3_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv3_STATE_VARIABLE_U_18));
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv5_STATE_VARIABLE_U_18;

          func_4(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " no_c_j_cs")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv5_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv5_STATE_VARIABLE_U_18));
        }
        break;
    }
  else
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_Word STATE_VARIABLE_U_37_37;
          MR_Word STATE_VARIABLE_U_38_38;
          MR_Word STATE_VARIABLE_U_40_40;
          MR_Word STATE_VARIABLE_U_41_41;
          MR_Word STATE_VARIABLE_U_43_43;
          MR_Word STATE_VARIABLE_U_44_44;
          MR_Word STATE_VARIABLE_U_46_46;
          MR_Word STATE_VARIABLE_U_47_47;
          MR_Word STATE_VARIABLE_U_49_49;
          MR_Word STATE_VARIABLE_U_50_50;
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv7_STATE_VARIABLE_U_37_37;
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv9_STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv11_STATE_VARIABLE_U_40_40;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_43_43;
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv15_STATE_VARIABLE_U_46_46;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_49_49;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_50_50;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_18;

          func_6(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv7_STATE_VARIABLE_U_37_37);
          STATE_VARIABLE_U_37_37 = ((MR_Word) (conv7_STATE_VARIABLE_U_37_37));
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_37_37)), &conv9_STATE_VARIABLE_U_38_38);
          STATE_VARIABLE_U_38_38 = ((MR_Word) (conv9_STATE_VARIABLE_U_38_38));
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "c_j_cs(\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_38_38)), &conv11_STATE_VARIABLE_U_40_40);
          STATE_VARIABLE_U_40_40 = ((MR_Word) (conv11_STATE_VARIABLE_U_40_40));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumC_12, STATE_VARIABLE_U_40_40, &STATE_VARIABLE_U_41_41);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_41_41)), &conv13_STATE_VARIABLE_U_43_43);
          STATE_VARIABLE_U_43_43 = ((MR_Word) (conv13_STATE_VARIABLE_U_43_43));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumJava_13, STATE_VARIABLE_U_43_43, &STATE_VARIABLE_U_44_44);
          func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_14(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_44_44)), &conv15_STATE_VARIABLE_U_46_46);
          STATE_VARIABLE_U_46_46 = ((MR_Word) (conv15_STATE_VARIABLE_U_46_46));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumCsharp_14, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_47_47);
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_47_47)), &conv17_STATE_VARIABLE_U_49_49);
          STATE_VARIABLE_U_49_49 = ((MR_Word) (conv17_STATE_VARIABLE_U_49_49));
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_49_49)), &conv19_STATE_VARIABLE_U_50_50);
          STATE_VARIABLE_U_50_50 = ((MR_Word) (conv19_STATE_VARIABLE_U_50_50));
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_50_50)), &conv21_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv21_STATE_VARIABLE_U_18));
        }
        break;
      case (MR_Integer) 0:
        {
          MR_Word STATE_VARIABLE_U_26_26;
          MR_Word STATE_VARIABLE_U_27_27;
          MR_Word STATE_VARIABLE_U_29_29;
          MR_Word STATE_VARIABLE_U_30_30;
          MR_Word STATE_VARIABLE_U_32_32;
          MR_Word STATE_VARIABLE_U_33_33;
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv23_STATE_VARIABLE_U_26_26;
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv25_STATE_VARIABLE_U_29_29;
          void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv27_STATE_VARIABLE_U_32_32;
          void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv29_STATE_VARIABLE_U_18;

          func_22(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " c_j_cs(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv23_STATE_VARIABLE_U_26_26);
          STATE_VARIABLE_U_26_26 = ((MR_Word) (conv23_STATE_VARIABLE_U_26_26));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumC_12, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_27_27)), &conv25_STATE_VARIABLE_U_29_29);
          STATE_VARIABLE_U_29_29 = ((MR_Word) (conv25_STATE_VARIABLE_U_29_29));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumJava_13, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_30_30);
          func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_26(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_30_30)), &conv27_STATE_VARIABLE_U_32_32);
          STATE_VARIABLE_U_32_32 = ((MR_Word) (conv27_STATE_VARIABLE_U_32_32));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumCsharp_14, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_33_33);
          func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_28(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_33_33)), &conv29_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv29_STATE_VARIABLE_U_18));
        }
        break;
    }
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv31_Str_4;

  conv31_Str_4 = parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv31_Str_4));
  return wrapper_arg_2;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv24_STATE_VARIABLE_U_9;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_String) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv24_STATE_VARIABLE_U_9);
  *wrapper_arg_4 = ((MR_Box) (conv24_STATE_VARIABLE_U_9));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_23,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepnOrEnum_10,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16)
{
  if ((MaybeTypeRepnOrEnum_10 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_String I_12;
    MR_Word STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_12 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_12 = (MR_String) "";
        break;
    }
    func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
    func_0(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv1_STATE_VARIABLE_U_17_17);
    STATE_VARIABLE_U_17_17 = ((MR_Word) (conv1_STATE_VARIABLE_U_17_17));
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "no_foreign")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_17)), &conv3_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv3_STATE_VARIABLE_U_16));
  }
  else
  {
    MR_Word Var_24 = ((MR_Word) ((MR_hl_field(1, MaybeTypeRepnOrEnum_10, (MR_Integer) 0))));

    if (((MR_tag((MR_Word) Var_24)) == (MR_Integer) 1))
    {
      MR_Word EnumRepn_13 = ((MR_Word) ((MR_hl_field(1, Var_24, (MR_Integer) 0))));
      MR_String HeadEnum_25 = ((MR_String) ((MR_hl_field(0, EnumRepn_13, (MR_Integer) 0))));
      MR_Word TailEnums_26 = ((MR_Word) ((MR_hl_field(0, EnumRepn_13, (MR_Integer) 1))));

      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          {
            MR_String I_27;
            MR_Word STATE_VARIABLE_U_25_35;
            MR_Word STATE_VARIABLE_U_27_37;
            MR_Integer Var_38;
            MR_Word Var_40;
            MR_Word STATE_VARIABLE_U_31_41;
            MR_String Var_43;
            MR_Integer Var_44;
            MR_Word STATE_VARIABLE_U_38_48;
            MR_Word STATE_VARIABLE_U_39_49;
            MR_String NlI_53;
            MR_String HeadX_54;
            MR_Word TailXs_55;
            MR_Word STATE_VARIABLE_U_20_58;
            MR_Word STATE_VARIABLE_U_22_60;
            MR_Word STATE_VARIABLE_U_23_61;
            MR_Word STATE_VARIABLE_U_24_62;
            void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv5_STATE_VARIABLE_U_25_35;
            void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv7_STATE_VARIABLE_U_27_37;
            void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv9_STATE_VARIABLE_U_20_58;
            void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv11_STATE_VARIABLE_U_22_60;
            void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv13_STATE_VARIABLE_U_24_62;
            void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv15_STATE_VARIABLE_U_31_41;
            void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv17_STATE_VARIABLE_U_38_48;
            void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv19_STATE_VARIABLE_U_39_49;
            void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv21_STATE_VARIABLE_U_16;

            I_27 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
            func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_4(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_27)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv5_STATE_VARIABLE_U_25_35);
            STATE_VARIABLE_U_25_35 = ((MR_Word) (conv5_STATE_VARIABLE_U_25_35));
            func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_6(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "foreign_enum(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_25_35)), &conv7_STATE_VARIABLE_U_27_37);
            STATE_VARIABLE_U_27_37 = ((MR_Word) (conv7_STATE_VARIABLE_U_27_37));
            Var_38 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
            Var_44 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
            Var_43 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_44);
            {
              Var_40 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, Var_40, 0) = ((MR_Box) (HeadEnum_25));
              MR_hl_field(1, Var_40, 1) = ((MR_Box) (TailEnums_26));
            }
            NlI_53 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_38);
            HeadX_54 = ((MR_String) ((MR_hl_field(1, Var_40, (MR_Integer) 0))));
            TailXs_55 = ((MR_Word) ((MR_hl_field(1, Var_40, (MR_Integer) 1))));
            func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_8(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (NlI_53)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_27_37)), &conv9_STATE_VARIABLE_U_20_58);
            STATE_VARIABLE_U_20_58 = ((MR_Word) (conv9_STATE_VARIABLE_U_20_58));
            func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_10(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_58)), &conv11_STATE_VARIABLE_U_22_60);
            STATE_VARIABLE_U_22_60 = ((MR_Word) (conv11_STATE_VARIABLE_U_22_60));
            parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_56_54_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_23, Var_43, (MR_String) "", TypeClassInfo_for_pt_output_23, HeadX_54, TailXs_55, STATE_VARIABLE_U_22_60, &STATE_VARIABLE_U_23_61);
            func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_12(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (NlI_53)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_61)), &conv13_STATE_VARIABLE_U_24_62);
            STATE_VARIABLE_U_24_62 = ((MR_Word) (conv13_STATE_VARIABLE_U_24_62));
            func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_14(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_62)), &conv15_STATE_VARIABLE_U_31_41);
            STATE_VARIABLE_U_31_41 = ((MR_Word) (conv15_STATE_VARIABLE_U_31_41));
            func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_16(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_31_41)), &conv17_STATE_VARIABLE_U_38_48);
            STATE_VARIABLE_U_38_48 = ((MR_Word) (conv17_STATE_VARIABLE_U_38_48));
            func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_18(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_27)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_38_48)), &conv19_STATE_VARIABLE_U_39_49);
            STATE_VARIABLE_U_39_49 = ((MR_Word) (conv19_STATE_VARIABLE_U_39_49));
            func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_20(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_49)), &conv21_STATE_VARIABLE_U_16);
            *STATE_VARIABLE_U_16 = ((MR_Word) (conv21_STATE_VARIABLE_U_16));
          }
          break;
        case (MR_Integer) 0:
          {
            MR_Word STATE_VARIABLE_U_18_29;
            MR_Word Var_30;
            MR_Word Var_32;
            MR_Word STATE_VARIABLE_U_22_33;
            void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            MR_Box conv23_STATE_VARIABLE_U_18_29;
            void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv26_STATE_VARIABLE_U_22_33;
            void MR_CALL (* func_27)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            MR_Box conv28_STATE_VARIABLE_U_16;

            func_22(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "foreign_enum([")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv23_STATE_VARIABLE_U_18_29);
            STATE_VARIABLE_U_18_29 = ((MR_Word) (conv23_STATE_VARIABLE_U_18_29));
            {
              Var_30 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
              MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_5[1]));
              MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_101_110_117_109_95_102_111_114_101_105_103_110_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1));
              MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 1));
              MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_23));
            }
            {
              Var_32 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, Var_32, 0) = ((MR_Box) (HeadEnum_25));
              MR_hl_field(1, Var_32, 1) = ((MR_Box) (TailEnums_26));
            }
            func_25 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 25))));
            func_25(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)), ((MR_Box) (Var_30)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_32)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_18_29)), &conv26_STATE_VARIABLE_U_22_33);
            STATE_VARIABLE_U_22_33 = ((MR_Word) (conv26_STATE_VARIABLE_U_22_33));
            func_27 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_27(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "])")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_22_33)), &conv28_STATE_VARIABLE_U_16);
            *STATE_VARIABLE_U_16 = ((MR_Word) (conv28_STATE_VARIABLE_U_16));
          }
          break;
      }
    }
    else
    {
      MR_Word TypeRepn_14 = (MR_Word) ((MR_Word) (Var_24));
      MR_String ForeignTypeName_65 = ((MR_String) ((MR_hl_field(0, TypeRepn_14, (MR_Integer) 0))));
      MR_Word ForeignTypeAssertions_66 = ((MR_Word) ((MR_hl_field(0, TypeRepn_14, (MR_Integer) 1))));
      MR_String I_67;
      MR_Word Assertions_68;
      MR_Word AssertionsList_69;
      MR_String InitStr_70;
      MR_Word AssertionStrs_71;
      MR_String AssertionsStr_72;
      MR_String FinalStr_73;
      MR_Word STATE_VARIABLE_U_30_75;
      MR_String Var_83;
      MR_String Var_85;
      void MR_CALL (* func_29)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
      MR_Box conv30_STATE_VARIABLE_U_30_75;
      void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
      MR_Box conv33_STATE_VARIABLE_U_16;

      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          I_67 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          break;
        case (MR_Integer) 0:
          I_67 = (MR_String) "";
          break;
      }
      Assertions_68 = (MR_Word) (ForeignTypeAssertions_66);
      mercury__set__to_sorted_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), Assertions_68, &AssertionsList_69);
      Var_83 = mercury__string__f_43_43_2_f_0(ForeignTypeName_65, (MR_String) "\",");
      Var_85 = mercury__string__f_43_43_2_f_0((MR_String) "foreign_type(\"", Var_83);
      InitStr_70 = mercury__string__f_43_43_2_f_0(I_67, Var_85);
      func_29 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
      func_29(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (InitStr_70)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv30_STATE_VARIABLE_U_30_75);
      STATE_VARIABLE_U_30_75 = ((MR_Word) (conv30_STATE_VARIABLE_U_30_75));
      AssertionStrs_71 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_7[3]), AssertionsList_69);
      AssertionsStr_72 = mercury__string__join_list_2_f_0((MR_String) ", ", AssertionStrs_71);
      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          {
            MR_String I1_74;
            MR_Integer Var_78 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
            MR_String Var_90;
            MR_String Var_92;
            MR_String Var_93;
            MR_String Var_95;
            MR_String Var_96;

            I1_74 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_78);
            Var_90 = mercury__string__f_43_43_2_f_0(I_67, (MR_String) ")");
            Var_92 = mercury__string__f_43_43_2_f_0((MR_String) "]\n", Var_90);
            Var_93 = mercury__string__f_43_43_2_f_0(AssertionsStr_72, Var_92);
            Var_95 = mercury__string__f_43_43_2_f_0((MR_String) "[", Var_93);
            Var_96 = mercury__string__f_43_43_2_f_0(I1_74, Var_95);
            FinalStr_73 = mercury__string__f_43_43_2_f_0((MR_String) "\n", Var_96);
          }
          break;
        case (MR_Integer) 0:
          {
            MR_String Var_87;

            Var_87 = mercury__string__f_43_43_2_f_0(AssertionsStr_72, (MR_String) "])");
            FinalStr_73 = mercury__string__f_43_43_2_f_0((MR_String) " [", Var_87);
          }
          break;
      }
      func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
      func_32(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (FinalStr_73)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_30_75)), &conv33_STATE_VARIABLE_U_16);
      *STATE_VARIABLE_U_16 = ((MR_Word) (conv33_STATE_VARIABLE_U_16));
    }
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_56_54_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_String X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Word TypeClassInfo_for_writer_26;
    MR_Word STATE_VARIABLE_U_16_16;
    MR_Word STATE_VARIABLE_U_14_24;
    MR_Word STATE_VARIABLE_U_15_25;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_14_24;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    func_0(((MR_Box) (Var_21)), ((MR_Box) (Var_22)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_14)), &conv1_STATE_VARIABLE_U_14_24);
    STATE_VARIABLE_U_14_24 = ((MR_Word) (conv1_STATE_VARIABLE_U_14_24));
    mercury__private_builtin__superclass_from_typeclass_info_3_p_0(Var_21, (MR_Integer) 1, &TypeClassInfo_for_writer_26);
    mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_26, X_8, STATE_VARIABLE_U_14_24, &STATE_VARIABLE_U_15_25);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (Var_21)), ((MR_Box) (Var_23)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_15_25)), &conv3_STATE_VARIABLE_U_16_16);
    STATE_VARIABLE_U_16_16 = ((MR_Word) (conv3_STATE_VARIABLE_U_16_16));
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_String HeadX_12 = ((MR_String) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Word STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv5_STATE_VARIABLE_U_18_18;
      MR_String next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Word next_value_of_STATE_VARIABLE_U_0_14;

      func_4(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_16_16)), &conv5_STATE_VARIABLE_U_18_18);
      STATE_VARIABLE_U_18_18 = ((MR_Word) (conv5_STATE_VARIABLE_U_18_18));
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv40_STATE_VARIABLE_U_23;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 6)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv40_STATE_VARIABLE_U_23);
  *wrapper_arg_4 = ((MR_Box) (conv40_STATE_VARIABLE_U_23));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word MoreFunctorsRepn_12,
  MR_Word STATE_VARIABLE_U_0_22,
  MR_Word * STATE_VARIABLE_U_23)
{
  MR_Word Functor1_14 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 0))));
  MR_Word Functor2_15 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 1))));
  MR_Word OtherFunctors_16 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepn_17 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 3))));

  switch (TypeRepnFor_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Integer Indent1_20 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
        MR_String I_21;
        MR_Word STATE_VARIABLE_U_53_53;
        MR_Word STATE_VARIABLE_U_54_54;
        MR_Word STATE_VARIABLE_U_56_56;
        MR_Word STATE_VARIABLE_U_57_57;
        MR_Word STATE_VARIABLE_U_59_59;
        MR_Word STATE_VARIABLE_U_60_60;
        MR_Word STATE_VARIABLE_U_62_62;
        MR_Word STATE_VARIABLE_U_64_64;
        MR_Integer Var_65;
        MR_Word STATE_VARIABLE_U_68_68;
        MR_Word STATE_VARIABLE_U_69_69;
        MR_Word STATE_VARIABLE_U_71_71;
        MR_Word STATE_VARIABLE_U_72_72;
        MR_String NlI_85;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_53_53;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_56_56;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_59_59;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_62_62;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_68_68;
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv25_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv27_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_23;

        I_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_22)), &conv1_STATE_VARIABLE_U_53_53);
        STATE_VARIABLE_U_53_53 = ((MR_Word) (conv1_STATE_VARIABLE_U_53_53));
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_21)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_53_53)), &conv3_STATE_VARIABLE_U_54_54);
        STATE_VARIABLE_U_54_54 = ((MR_Word) (conv3_STATE_VARIABLE_U_54_54));
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "gen_du_more_functors(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_54_54)), &conv5_STATE_VARIABLE_U_56_56);
        STATE_VARIABLE_U_56_56 = ((MR_Word) (conv5_STATE_VARIABLE_U_56_56));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, TVarSet_11, Functor1_14, STATE_VARIABLE_U_56_56, &STATE_VARIABLE_U_57_57);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_57_57)), &conv7_STATE_VARIABLE_U_59_59);
        STATE_VARIABLE_U_59_59 = ((MR_Word) (conv7_STATE_VARIABLE_U_59_59));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, TVarSet_11, Functor2_15, STATE_VARIABLE_U_59_59, &STATE_VARIABLE_U_60_60);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_60_60)), &conv9_STATE_VARIABLE_U_62_62);
        STATE_VARIABLE_U_62_62 = ((MR_Word) (conv9_STATE_VARIABLE_U_62_62));
        Var_65 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 2);
        NlI_85 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_20);
        if ((OtherFunctors_16 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          MR_Word STATE_VARIABLE_U_17_88;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv11_STATE_VARIABLE_U_17_88;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_64_64;

          func_10(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_62_62)), &conv11_STATE_VARIABLE_U_17_88);
          STATE_VARIABLE_U_17_88 = ((MR_Word) (conv11_STATE_VARIABLE_U_17_88));
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_88)), &conv13_STATE_VARIABLE_U_64_64);
          STATE_VARIABLE_U_64_64 = ((MR_Word) (conv13_STATE_VARIABLE_U_64_64));
        }
        else
        {
          MR_Word HeadX_86 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_16, (MR_Integer) 0))));
          MR_Word TailXs_87 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_16, (MR_Integer) 1))));
          MR_Word STATE_VARIABLE_U_20_90;
          MR_Word STATE_VARIABLE_U_22_92;
          MR_Word STATE_VARIABLE_U_23_93;
          MR_Word STATE_VARIABLE_U_24_94;
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv15_STATE_VARIABLE_U_20_90;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_22_92;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_24_94;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_64_64;

          func_14(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_62_62)), &conv15_STATE_VARIABLE_U_20_90);
          STATE_VARIABLE_U_20_90 = ((MR_Word) (conv15_STATE_VARIABLE_U_20_90));
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_90)), &conv17_STATE_VARIABLE_U_22_92);
          STATE_VARIABLE_U_22_92 = ((MR_Word) (conv17_STATE_VARIABLE_U_22_92));
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_52_52_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Var_65, TVarSet_11, TypeClassInfo_for_pt_output_74, HeadX_86, TailXs_87, STATE_VARIABLE_U_22_92, &STATE_VARIABLE_U_23_93);
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_93)), &conv19_STATE_VARIABLE_U_24_94);
          STATE_VARIABLE_U_24_94 = ((MR_Word) (conv19_STATE_VARIABLE_U_24_94));
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_94)), &conv21_STATE_VARIABLE_U_64_64);
          STATE_VARIABLE_U_64_64 = ((MR_Word) (conv21_STATE_VARIABLE_U_64_64));
        }
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_64_64)), &conv23_STATE_VARIABLE_U_68_68);
        STATE_VARIABLE_U_68_68 = ((MR_Word) (conv23_STATE_VARIABLE_U_68_68));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, MaybeCJCsRepn_17, STATE_VARIABLE_U_68_68, &STATE_VARIABLE_U_69_69);
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_24(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_69_69)), &conv25_STATE_VARIABLE_U_71_71);
        STATE_VARIABLE_U_71_71 = ((MR_Word) (conv25_STATE_VARIABLE_U_71_71));
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_21)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_71_71)), &conv27_STATE_VARIABLE_U_72_72);
        STATE_VARIABLE_U_72_72 = ((MR_Word) (conv27_STATE_VARIABLE_U_72_72));
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_72_72)), &conv29_STATE_VARIABLE_U_23);
        *STATE_VARIABLE_U_23 = ((MR_Word) (conv29_STATE_VARIABLE_U_23));
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word STATE_VARIABLE_U_25_25;
        MR_Word STATE_VARIABLE_U_27_27;
        MR_Word STATE_VARIABLE_U_29_29;
        MR_Word STATE_VARIABLE_U_31_31;
        MR_Word STATE_VARIABLE_U_33_33;
        MR_Word STATE_VARIABLE_U_35_35;
        MR_Word STATE_VARIABLE_U_46_46;
        MR_Word STATE_VARIABLE_U_48_48;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv31_STATE_VARIABLE_U_25_25;
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv33_STATE_VARIABLE_U_29_29;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv35_STATE_VARIABLE_U_33_33;
        void MR_CALL (* func_45)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv46_STATE_VARIABLE_U_46_46;
        void MR_CALL (* func_47)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv48_STATE_VARIABLE_U_23;

        func_30(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "gen_du_more_functors(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_22)), &conv31_STATE_VARIABLE_U_25_25);
        STATE_VARIABLE_U_25_25 = ((MR_Word) (conv31_STATE_VARIABLE_U_25_25));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, TVarSet_11, Functor1_14, STATE_VARIABLE_U_25_25, &STATE_VARIABLE_U_27_27);
        func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_32(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_27_27)), &conv33_STATE_VARIABLE_U_29_29);
        STATE_VARIABLE_U_29_29 = ((MR_Word) (conv33_STATE_VARIABLE_U_29_29));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, TVarSet_11, Functor2_15, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_31_31);
        func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_34(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_31_31)), &conv35_STATE_VARIABLE_U_33_33);
        STATE_VARIABLE_U_33_33 = ((MR_Word) (conv35_STATE_VARIABLE_U_33_33));
        if ((OtherFunctors_16 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv37_STATE_VARIABLE_U_35_35;

          func_36(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_33_33)), &conv37_STATE_VARIABLE_U_35_35);
          STATE_VARIABLE_U_35_35 = ((MR_Word) (conv37_STATE_VARIABLE_U_35_35));
        }
        else
        {
          MR_Word STATE_VARIABLE_U_37_37;
          MR_Word Var_38;
          MR_Word STATE_VARIABLE_U_41_41;
          void MR_CALL (* func_38)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv39_STATE_VARIABLE_U_37_37;
          void MR_CALL (* func_41)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv42_STATE_VARIABLE_U_41_41;
          void MR_CALL (* func_43)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv44_STATE_VARIABLE_U_35_35;

          func_38(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_33_33)), &conv39_STATE_VARIABLE_U_37_37);
          STATE_VARIABLE_U_37_37 = ((MR_Word) (conv39_STATE_VARIABLE_U_37_37));
          {
            Var_38 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Var_38, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_9[1]));
            MR_hl_field(0, Var_38, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_109_111_114_101_95_102_117_110_99_116_111_114_115_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1));
            MR_hl_field(0, Var_38, 2) = ((MR_Box) ((MR_Integer) 4));
            MR_hl_field(0, Var_38, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_74));
            MR_hl_field(0, Var_38, 4) = ((MR_Box) (TypeRepnFor_9));
            MR_hl_field(0, Var_38, 5) = ((MR_Box) ((MR_Integer) 0));
            MR_hl_field(0, Var_38, 6) = ((MR_Box) (TVarSet_11));
          }
          func_41 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 25))));
          func_41(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_gen_du_functor_repn_0)), ((MR_Box) (Var_38)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (OtherFunctors_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_37_37)), &conv42_STATE_VARIABLE_U_41_41);
          STATE_VARIABLE_U_41_41 = ((MR_Word) (conv42_STATE_VARIABLE_U_41_41));
          func_43 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_43(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_41_41)), &conv44_STATE_VARIABLE_U_35_35);
          STATE_VARIABLE_U_35_35 = ((MR_Word) (conv44_STATE_VARIABLE_U_35_35));
        }
        func_45 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_45(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_35_35)), &conv46_STATE_VARIABLE_U_46_46);
        STATE_VARIABLE_U_46_46 = ((MR_Word) (conv46_STATE_VARIABLE_U_46_46));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_17, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_48_48);
        func_47 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_47(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_48_48)), &conv48_STATE_VARIABLE_U_23);
        *STATE_VARIABLE_U_23 = ((MR_Word) (conv48_STATE_VARIABLE_U_23));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_52_52_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Word STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(Var_21, Var_22, Var_23, Var_24, X_8, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Word STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv1_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Word next_value_of_STATE_VARIABLE_U_0_14;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_16_16)), &conv1_STATE_VARIABLE_U_18_18);
      STATE_VARIABLE_U_18_18 = ((MR_Word) (conv1_STATE_VARIABLE_U_18_18));
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv43_STATE_VARIABLE_U_22;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv43_STATE_VARIABLE_U_22);
  *wrapper_arg_4 = ((MR_Box) (conv43_STATE_VARIABLE_U_22));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv38_HeadVar__6_6;

  parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv38_HeadVar__6_6);
  *wrapper_arg_4 = ((MR_Box) (conv38_HeadVar__6_6));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv24_STATE_VARIABLE_U_22;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_111_110_108_121_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv24_STATE_VARIABLE_U_22);
  *wrapper_arg_4 = ((MR_Box) (conv24_STATE_VARIABLE_U_22));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_71,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word OnlyFunctorRepn_12,
  MR_Word STATE_VARIABLE_U_0_23,
  MR_Word * STATE_VARIABLE_U_24)
{
  MR_String FunctorName_14 = ((MR_String) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 0))));
  MR_Word ArgTypes_15 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 1))));
  MR_Word CRepns_16 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepn_17 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 3))));

  switch (TypeRepnFor_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Word TypeClassInfo_for_writer_92;
        MR_Integer Indent1_18 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
        MR_Integer Indent2_19 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 2);
        MR_String I_20;
        MR_String I1_21;
        MR_String NlI2_22;
        MR_Word STATE_VARIABLE_U_49_49;
        MR_Word STATE_VARIABLE_U_50_50;
        MR_Word STATE_VARIABLE_U_52_52;
        MR_Word STATE_VARIABLE_U_53_53;
        MR_Word STATE_VARIABLE_U_54_54;
        MR_Word STATE_VARIABLE_U_56_56;
        MR_Word STATE_VARIABLE_U_58_58;
        MR_Word STATE_VARIABLE_U_61_61;
        MR_Word Var_62;
        MR_Word STATE_VARIABLE_U_63_63;
        MR_Word STATE_VARIABLE_U_65_65;
        MR_Word STATE_VARIABLE_U_66_66;
        MR_Word STATE_VARIABLE_U_68_68;
        MR_Word STATE_VARIABLE_U_69_69;
        MR_String NlI_94;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_49_49;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_52_52;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_53_53;
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv9_STATE_VARIABLE_U_56_56;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_61_61;
        MR_Box conv25_STATE_VARIABLE_U_63_63;
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv27_STATE_VARIABLE_U_65_65;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_68_68;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_69_69;
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv33_STATE_VARIABLE_U_24;

        I_20 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
        I1_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent1_18);
        NlI2_22 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent2_19);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_23)), &conv1_STATE_VARIABLE_U_49_49);
        STATE_VARIABLE_U_49_49 = ((MR_Word) (conv1_STATE_VARIABLE_U_49_49));
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I_20)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_49_49)), &conv3_STATE_VARIABLE_U_50_50);
        STATE_VARIABLE_U_50_50 = ((MR_Word) (conv3_STATE_VARIABLE_U_50_50));
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "gen_du_only_functor(\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_50_50)), &conv5_STATE_VARIABLE_U_52_52);
        STATE_VARIABLE_U_52_52 = ((MR_Word) (conv5_STATE_VARIABLE_U_52_52));
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I1_21)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_52_52)), &conv7_STATE_VARIABLE_U_53_53);
        STATE_VARIABLE_U_53_53 = ((MR_Word) (conv7_STATE_VARIABLE_U_53_53));
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_71, (MR_Integer) 1, &TypeClassInfo_for_writer_92);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_92, FunctorName_14, STATE_VARIABLE_U_53_53, &STATE_VARIABLE_U_54_54);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_54_54)), &conv9_STATE_VARIABLE_U_56_56);
        STATE_VARIABLE_U_56_56 = ((MR_Word) (conv9_STATE_VARIABLE_U_56_56));
        NlI_94 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        if ((ArgTypes_15 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          MR_Word STATE_VARIABLE_U_17_97;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv11_STATE_VARIABLE_U_17_97;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_58_58;

          func_10(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_56_56)), &conv11_STATE_VARIABLE_U_17_97);
          STATE_VARIABLE_U_17_97 = ((MR_Word) (conv11_STATE_VARIABLE_U_17_97));
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_97)), &conv13_STATE_VARIABLE_U_58_58);
          STATE_VARIABLE_U_58_58 = ((MR_Word) (conv13_STATE_VARIABLE_U_58_58));
        }
        else
        {
          MR_Word HeadX_95 = ((MR_Word) ((MR_hl_field(1, ArgTypes_15, (MR_Integer) 0))));
          MR_Word TailXs_96 = ((MR_Word) ((MR_hl_field(1, ArgTypes_15, (MR_Integer) 1))));
          MR_Word STATE_VARIABLE_U_20_99;
          MR_Word STATE_VARIABLE_U_22_101;
          MR_Word STATE_VARIABLE_U_23_102;
          MR_Word STATE_VARIABLE_U_24_103;
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv15_STATE_VARIABLE_U_20_99;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_22_101;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_24_103;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv21_STATE_VARIABLE_U_58_58;

          func_14(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_56_56)), &conv15_STATE_VARIABLE_U_20_99);
          STATE_VARIABLE_U_20_99 = ((MR_Word) (conv15_STATE_VARIABLE_U_20_99));
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_99)), &conv17_STATE_VARIABLE_U_22_101);
          STATE_VARIABLE_U_22_101 = ((MR_Word) (conv17_STATE_VARIABLE_U_22_101));
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_48_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_71, NlI2_22, (MR_String) "", TVarSet_11, TypeClassInfo_for_pt_output_71, HeadX_95, TailXs_96, STATE_VARIABLE_U_22_101, &STATE_VARIABLE_U_23_102);
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_102)), &conv19_STATE_VARIABLE_U_24_103);
          STATE_VARIABLE_U_24_103 = ((MR_Word) (conv19_STATE_VARIABLE_U_24_103));
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_103)), &conv21_STATE_VARIABLE_U_58_58);
          STATE_VARIABLE_U_58_58 = ((MR_Word) (conv21_STATE_VARIABLE_U_58_58));
        }
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_58_58)), &conv23_STATE_VARIABLE_U_61_61);
        STATE_VARIABLE_U_61_61 = ((MR_Word) (conv23_STATE_VARIABLE_U_61_61));
        {
          Var_62 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_62, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[12]));
          MR_hl_field(0, Var_62, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1));
          MR_hl_field(0, Var_62, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_62, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_62, 4) = ((MR_Box) (TypeRepnFor_9));
          MR_hl_field(0, Var_62, 5) = ((MR_Box) (Indent2_19));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, Indent1_18, Var_62, CRepns_16, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_61_61)), &conv25_STATE_VARIABLE_U_63_63);
        STATE_VARIABLE_U_63_63 = ((MR_Word) (conv25_STATE_VARIABLE_U_63_63));
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_63_63)), &conv27_STATE_VARIABLE_U_65_65);
        STATE_VARIABLE_U_65_65 = ((MR_Word) (conv27_STATE_VARIABLE_U_65_65));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, Indent1_18, MaybeCJCsRepn_17, STATE_VARIABLE_U_65_65, &STATE_VARIABLE_U_66_66);
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_66_66)), &conv29_STATE_VARIABLE_U_68_68);
        STATE_VARIABLE_U_68_68 = ((MR_Word) (conv29_STATE_VARIABLE_U_68_68));
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I_20)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_68_68)), &conv31_STATE_VARIABLE_U_69_69);
        STATE_VARIABLE_U_69_69 = ((MR_Word) (conv31_STATE_VARIABLE_U_69_69));
        func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_32(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_69_69)), &conv33_STATE_VARIABLE_U_24);
        *STATE_VARIABLE_U_24 = ((MR_Word) (conv33_STATE_VARIABLE_U_24));
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word TypeClassInfo_for_writer_106;
        MR_Word STATE_VARIABLE_U_26_26;
        MR_Word STATE_VARIABLE_U_27_27;
        MR_Word STATE_VARIABLE_U_29_29;
        MR_Word Var_30;
        MR_Word STATE_VARIABLE_U_32_32;
        MR_Word STATE_VARIABLE_U_35_35;
        MR_Word Var_37;
        MR_Word STATE_VARIABLE_U_38_38;
        MR_Word STATE_VARIABLE_U_41_41;
        MR_Word STATE_VARIABLE_U_43_43;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv35_STATE_VARIABLE_U_26_26;
        void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv37_STATE_VARIABLE_U_29_29;
        void MR_CALL (* func_39)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv40_STATE_VARIABLE_U_32_32;
        void MR_CALL (* func_41)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv42_STATE_VARIABLE_U_35_35;
        MR_Box conv44_STATE_VARIABLE_U_38_38;
        void MR_CALL (* func_45)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv46_STATE_VARIABLE_U_41_41;
        void MR_CALL (* func_47)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv48_STATE_VARIABLE_U_24;

        func_34(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "gen_du_only_functor(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_23)), &conv35_STATE_VARIABLE_U_26_26);
        STATE_VARIABLE_U_26_26 = ((MR_Word) (conv35_STATE_VARIABLE_U_26_26));
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_71, (MR_Integer) 1, &TypeClassInfo_for_writer_106);
        mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_106, FunctorName_14, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
        func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_36(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ", [")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_27_27)), &conv37_STATE_VARIABLE_U_29_29);
        STATE_VARIABLE_U_29_29 = ((MR_Word) (conv37_STATE_VARIABLE_U_29_29));
        {
          Var_30 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[8]));
          MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2));
          MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_30, 4) = ((MR_Box) (TVarSet_11));
          MR_hl_field(0, Var_30, 5) = ((MR_Box) ((MR_Integer) 2));
        }
        func_39 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 25))));
        func_39(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0)), ((MR_Box) (Var_30)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (ArgTypes_15)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_29_29)), &conv40_STATE_VARIABLE_U_32_32);
        STATE_VARIABLE_U_32_32 = ((MR_Word) (conv40_STATE_VARIABLE_U_32_32));
        func_41 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_41(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "],")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_32_32)), &conv42_STATE_VARIABLE_U_35_35);
        STATE_VARIABLE_U_35_35 = ((MR_Word) (conv42_STATE_VARIABLE_U_35_35));
        {
          Var_37 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_37, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[12]));
          MR_hl_field(0, Var_37, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_100_117_95_111_110_108_121_95_102_117_110_99_116_111_114_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3));
          MR_hl_field(0, Var_37, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_37, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_37, 4) = ((MR_Box) (TypeRepnFor_9));
          MR_hl_field(0, Var_37, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, (MR_Integer) 0, Var_37, CRepns_16, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_35_35)), &conv44_STATE_VARIABLE_U_38_38);
        STATE_VARIABLE_U_38_38 = ((MR_Word) (conv44_STATE_VARIABLE_U_38_38));
        func_45 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_45(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_38_38)), &conv46_STATE_VARIABLE_U_41_41);
        STATE_VARIABLE_U_41_41 = ((MR_Word) (conv46_STATE_VARIABLE_U_41_41));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_17, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_43_43);
        func_47 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_47(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_43_43)), &conv48_STATE_VARIABLE_U_24);
        *STATE_VARIABLE_U_24 = ((MR_Word) (conv48_STATE_VARIABLE_U_24));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_106_95_99_115_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepn_10,
  MR_Word STATE_VARIABLE_U_0_17,
  MR_Word * STATE_VARIABLE_U_18)
{
  MR_bool succeeded;
  MR_Word MaybeRepnC_12 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 0))));
  MR_Word MaybeRepnJava_13 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 1))));
  MR_Word MaybeRepnCsharp_14 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 2))));

  succeeded = (MaybeRepnC_12 == (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = (MaybeRepnJava_13 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
      succeeded = (MaybeRepnCsharp_14 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I_15;
          MR_Word STATE_VARIABLE_U_21_21;
          void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv1_STATE_VARIABLE_U_21_21;
          void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv3_STATE_VARIABLE_U_18;

          I_15 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_0(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_15)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv1_STATE_VARIABLE_U_21_21);
          STATE_VARIABLE_U_21_21 = ((MR_Word) (conv1_STATE_VARIABLE_U_21_21));
          func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_2(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "no_c_j_cs")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_21_21)), &conv3_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv3_STATE_VARIABLE_U_18));
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv5_STATE_VARIABLE_U_18;

          func_4(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " no_c_j_cs")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv5_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv5_STATE_VARIABLE_U_18));
        }
        break;
    }
  else
  {
    MR_Integer Indent1_16 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_Word STATE_VARIABLE_U_36_36;
          MR_Word STATE_VARIABLE_U_38_38;
          MR_Word STATE_VARIABLE_U_39_39;
          MR_Word STATE_VARIABLE_U_41_41;
          MR_Word STATE_VARIABLE_U_42_42;
          MR_Word STATE_VARIABLE_U_44_44;
          MR_Word STATE_VARIABLE_U_45_45;
          MR_Word STATE_VARIABLE_U_47_47;
          MR_Word STATE_VARIABLE_U_48_48;
          MR_String I_51;
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv7_STATE_VARIABLE_U_36_36;
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv9_STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv11_STATE_VARIABLE_U_41_41;
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv13_STATE_VARIABLE_U_44_44;
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv15_STATE_VARIABLE_U_47_47;
          void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv17_STATE_VARIABLE_U_48_48;
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv19_STATE_VARIABLE_U_18;

          I_51 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_6(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_51)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv7_STATE_VARIABLE_U_36_36);
          STATE_VARIABLE_U_36_36 = ((MR_Word) (conv7_STATE_VARIABLE_U_36_36));
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "c_j_cs(\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_36_36)), &conv9_STATE_VARIABLE_U_38_38);
          STATE_VARIABLE_U_38_38 = ((MR_Word) (conv9_STATE_VARIABLE_U_38_38));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_16, MaybeRepnC_12, STATE_VARIABLE_U_38_38, &STATE_VARIABLE_U_39_39);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_39_39)), &conv11_STATE_VARIABLE_U_41_41);
          STATE_VARIABLE_U_41_41 = ((MR_Word) (conv11_STATE_VARIABLE_U_41_41));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_16, MaybeRepnJava_13, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_42_42);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_42_42)), &conv13_STATE_VARIABLE_U_44_44);
          STATE_VARIABLE_U_44_44 = ((MR_Word) (conv13_STATE_VARIABLE_U_44_44));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_16, MaybeRepnCsharp_14, STATE_VARIABLE_U_44_44, &STATE_VARIABLE_U_45_45);
          func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_14(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_45_45)), &conv15_STATE_VARIABLE_U_47_47);
          STATE_VARIABLE_U_47_47 = ((MR_Word) (conv15_STATE_VARIABLE_U_47_47));
          func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_16(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_51)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_47_47)), &conv17_STATE_VARIABLE_U_48_48);
          STATE_VARIABLE_U_48_48 = ((MR_Word) (conv17_STATE_VARIABLE_U_48_48));
          func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_18(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_48_48)), &conv19_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv19_STATE_VARIABLE_U_18));
        }
        break;
      case (MR_Integer) 0:
        {
          MR_Word STATE_VARIABLE_U_26_26;
          MR_Word STATE_VARIABLE_U_27_27;
          MR_Word STATE_VARIABLE_U_29_29;
          MR_Word STATE_VARIABLE_U_30_30;
          MR_Word STATE_VARIABLE_U_32_32;
          MR_Word STATE_VARIABLE_U_33_33;
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          MR_Box conv21_STATE_VARIABLE_U_26_26;
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv23_STATE_VARIABLE_U_29_29;
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv25_STATE_VARIABLE_U_32_32;
          void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          MR_Box conv27_STATE_VARIABLE_U_18;

          func_20(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " c_j_cs(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_17)), &conv21_STATE_VARIABLE_U_26_26);
          STATE_VARIABLE_U_26_26 = ((MR_Word) (conv21_STATE_VARIABLE_U_26_26));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_16, MaybeRepnC_12, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
          func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_22(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_27_27)), &conv23_STATE_VARIABLE_U_29_29);
          STATE_VARIABLE_U_29_29 = ((MR_Word) (conv23_STATE_VARIABLE_U_29_29));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_16, MaybeRepnJava_13, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_30_30);
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_30_30)), &conv25_STATE_VARIABLE_U_32_32);
          STATE_VARIABLE_U_32_32 = ((MR_Word) (conv25_STATE_VARIABLE_U_32_32));
          parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(TypeClassInfo_for_pt_output_52, TypeRepnFor_8, Indent1_16, MaybeRepnCsharp_14, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_33_33);
          func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_26(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_33_33)), &conv27_STATE_VARIABLE_U_18);
          *STATE_VARIABLE_U_18 = ((MR_Word) (conv27_STATE_VARIABLE_U_18));
        }
        break;
    }
  }
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv6_Str_4;

  conv6_Str_4 = parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv6_Str_4));
  return wrapper_arg_2;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_97_121_98_101_95_102_111_114_101_105_103_110_95_116_121_112_101_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_18,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepn_10,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15)
{
  if ((MaybeTypeRepn_10 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_String I_12;
    MR_Word STATE_VARIABLE_U_16_16;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv1_STATE_VARIABLE_U_16_16;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_15;

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_12 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_12 = (MR_String) "";
        break;
    }
    func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_0(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (I_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_14)), &conv1_STATE_VARIABLE_U_16_16);
    STATE_VARIABLE_U_16_16 = ((MR_Word) (conv1_STATE_VARIABLE_U_16_16));
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) ((MR_String) "no_foreign")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_16_16)), &conv3_STATE_VARIABLE_U_15);
    *STATE_VARIABLE_U_15 = ((MR_Word) (conv3_STATE_VARIABLE_U_15));
  }
  else
  {
    MR_Word TypeRepn_13 = ((MR_Word) ((MR_hl_field(1, MaybeTypeRepn_10, (MR_Integer) 0))));
    MR_String ForeignTypeName_19 = ((MR_String) ((MR_hl_field(0, TypeRepn_13, (MR_Integer) 0))));
    MR_Word ForeignTypeAssertions_20 = ((MR_Word) ((MR_hl_field(0, TypeRepn_13, (MR_Integer) 1))));
    MR_String I_21;
    MR_Word Assertions_22;
    MR_Word AssertionsList_23;
    MR_String InitStr_24;
    MR_Word AssertionStrs_25;
    MR_String AssertionsStr_26;
    MR_String FinalStr_27;
    MR_Word STATE_VARIABLE_U_30_29;
    MR_String Var_37;
    MR_String Var_39;
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv5_STATE_VARIABLE_U_30_29;
    void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv8_STATE_VARIABLE_U_15;

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_21 = (MR_String) "";
        break;
    }
    Assertions_22 = (MR_Word) (ForeignTypeAssertions_20);
    mercury__set__to_sorted_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), Assertions_22, &AssertionsList_23);
    Var_37 = mercury__string__f_43_43_2_f_0(ForeignTypeName_19, (MR_String) "\",");
    Var_39 = mercury__string__f_43_43_2_f_0((MR_String) "foreign_type(\"", Var_37);
    InitStr_24 = mercury__string__f_43_43_2_f_0(I_21, Var_39);
    func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_4(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (InitStr_24)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_14)), &conv5_STATE_VARIABLE_U_30_29);
    STATE_VARIABLE_U_30_29 = ((MR_Word) (conv5_STATE_VARIABLE_U_30_29));
    AssertionStrs_25 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_7[2]), AssertionsList_23);
    AssertionsStr_26 = mercury__string__join_list_2_f_0((MR_String) ", ", AssertionStrs_25);
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I1_28;
          MR_Integer Var_32 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
          MR_String Var_44;
          MR_String Var_46;
          MR_String Var_47;
          MR_String Var_49;
          MR_String Var_50;

          I1_28 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_32);
          Var_44 = mercury__string__f_43_43_2_f_0(I_21, (MR_String) ")");
          Var_46 = mercury__string__f_43_43_2_f_0((MR_String) "]\n", Var_44);
          Var_47 = mercury__string__f_43_43_2_f_0(AssertionsStr_26, Var_46);
          Var_49 = mercury__string__f_43_43_2_f_0((MR_String) "[", Var_47);
          Var_50 = mercury__string__f_43_43_2_f_0(I1_28, Var_49);
          FinalStr_27 = mercury__string__f_43_43_2_f_0((MR_String) "\n", Var_50);
        }
        break;
      case (MR_Integer) 0:
        {
          MR_String Var_41;

          Var_41 = mercury__string__f_43_43_2_f_0(AssertionsStr_26, (MR_String) "])");
          FinalStr_27 = mercury__string__f_43_43_2_f_0((MR_String) " [", Var_41);
        }
        break;
    }
    func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_7(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (FinalStr_27)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_30_29)), &conv8_STATE_VARIABLE_U_15);
    *STATE_VARIABLE_U_15 = ((MR_Word) (conv8_STATE_VARIABLE_U_15));
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_5(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_2)));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_97,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word TVarSet_10,
  MR_Word FunctorRepn_11,
  MR_Word S_12)
{
  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      if (((MR_tag((MR_Word) FunctorRepn_11)) == (MR_Integer) 0))
      {
        MR_String FunctorName_14 = ((MR_String) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 0))));
        MR_Word ConstantRepns_15 = ((MR_Word) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 1))));
        MR_String I_16;
        MR_Integer Indent1_17;
        MR_Word Var_44;
        MR_Integer Var_46;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_36_36;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_37_37;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_39_39;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_42_42;
        MR_Box conv8_STATE_VARIABLE_U_45_45;
        void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv10_STATE_VARIABLE_U_49_49;
        void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv12_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv14_STATE_VARIABLE_U_23;

        I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_36_36);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_16)), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_37_37);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "constant_functor(")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_39_39);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_14, S_12);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_42_42);
        Indent1_17 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        Var_46 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        {
          Var_44 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_44, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[9]));
          MR_hl_field(0, Var_44, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1));
          MR_hl_field(0, Var_44, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_44, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_44, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_44, 5) = ((MR_Box) (Var_46));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, Indent1_17, Var_44, ConstantRepns_15, ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv8_STATE_VARIABLE_U_45_45);
        func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_9(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv10_STATE_VARIABLE_U_49_49);
        func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_11(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_16)), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv12_STATE_VARIABLE_U_50_50);
        func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_13(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv14_STATE_VARIABLE_U_23);
      }
      else
      {
        MR_Word ArgTypes_18 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 1))));
        MR_Word NonConstantRepns_19 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 2))));
        MR_Integer Indent2_20;
        MR_String NlI2_21;
        MR_Word Var_85;
        MR_String I_92;
        MR_Integer Indent1_93;
        MR_String FunctorName_96 = ((MR_String) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 0))));
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv16_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv18_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv20_STATE_VARIABLE_U_74_74;
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv22_STATE_VARIABLE_U_77_77;
        void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv24_STATE_VARIABLE_U_84_84;
        MR_Box conv25_STATE_VARIABLE_U_86_86;
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv27_STATE_VARIABLE_U_88_88;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_89_89;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_23;

        I_92 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_15(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv16_STATE_VARIABLE_U_71_71);
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_17(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_92)), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv18_STATE_VARIABLE_U_72_72);
        func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_19(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "nonconstant_functor(")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv20_STATE_VARIABLE_U_74_74);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_96, S_12);
        func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_21(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv22_STATE_VARIABLE_U_77_77);
        Indent1_93 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        Indent2_20 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        NlI2_21 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent2_20);
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_52_51_55_95_95_91_55_93_95_48_6_p_0(TypeClassInfo_for_pt_output_97, NlI2_21, (MR_String) "", TVarSet_10, TypeClassInfo_for_pt_output_97, Indent1_93, ArgTypes_18, S_12);
        func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_23(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv24_STATE_VARIABLE_U_84_84);
        {
          Var_85 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_85, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[10]));
          MR_hl_field(0, Var_85, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2));
          MR_hl_field(0, Var_85, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_85, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_85, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_85, 5) = ((MR_Box) (Indent2_20));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, Indent1_93, Var_85, NonConstantRepns_19, ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv25_STATE_VARIABLE_U_86_86);
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv27_STATE_VARIABLE_U_88_88);
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_92)), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv29_STATE_VARIABLE_U_89_89);
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv31_STATE_VARIABLE_U_23);
      }
      break;
    case (MR_Integer) 0:
      if (((MR_tag((MR_Word) FunctorRepn_11)) == (MR_Integer) 0))
      {
        MR_Word Var_30;
        MR_String FunctorName_128 = ((MR_String) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 0))));
        MR_Word ConstantRepns_129 = ((MR_Word) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 1))));
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv33_STATE_VARIABLE_U_25_25;
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv35_STATE_VARIABLE_U_28_28;
        MR_Box conv36_STATE_VARIABLE_U_31_31;
        void MR_CALL (* func_37)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv38_STATE_VARIABLE_U_23;

        func_32(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "constant_functor(")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv33_STATE_VARIABLE_U_25_25);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_128, S_12);
        func_34 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_34(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv35_STATE_VARIABLE_U_28_28);
        {
          Var_30 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[9]));
          MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3));
          MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_30, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_30, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, (MR_Integer) 0, Var_30, ConstantRepns_129, ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv36_STATE_VARIABLE_U_31_31);
        func_37 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_37(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv38_STATE_VARIABLE_U_23);
      }
      else
      {
        MR_Word Var_58;
        MR_Word Var_65;
        MR_Word ArgTypes_130 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 1))));
        MR_Word NonConstantRepns_131 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 2))));
        MR_String FunctorName_132 = ((MR_String) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 0))));
        void MR_CALL (* func_39)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv40_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_41)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv42_STATE_VARIABLE_U_57_57;
        MR_Box conv43_STATE_VARIABLE_U_60_60;
        void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv45_STATE_VARIABLE_U_63_63;
        MR_Box conv46_STATE_VARIABLE_U_66_66;
        void MR_CALL (* func_47)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv48_STATE_VARIABLE_U_23;

        func_39(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "nonconstant_functor(")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv40_STATE_VARIABLE_U_54_54);
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_132, S_12);
        func_41 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_41(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ", [")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv42_STATE_VARIABLE_U_57_57);
        {
          Var_58 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_58, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[11]));
          MR_hl_field(0, Var_58, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_4));
          MR_hl_field(0, Var_58, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_58, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_58, 4) = ((MR_Box) (TVarSet_10));
          MR_hl_field(0, Var_58, 5) = ((MR_Box) ((MR_Integer) 2));
        }
        parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0), TypeClassInfo_for_pt_output_97, Var_58, (MR_String) ", ", ArgTypes_130, ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv43_STATE_VARIABLE_U_60_60);
        func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_44(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "], ")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv45_STATE_VARIABLE_U_63_63);
        {
          Var_65 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_65, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[10]));
          MR_hl_field(0, Var_65, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_7_p_0_5));
          MR_hl_field(0, Var_65, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_65, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_65, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_65, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, (MR_Integer) 0, Var_65, NonConstantRepns_131, ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv46_STATE_VARIABLE_U_66_66);
        func_47 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_47(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) (S_12)), ((MR_Box) ((MR_Integer) 0)), &conv48_STATE_VARIABLE_U_23);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_52_51_55_95_95_91_55_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_String Var_29,
  MR_String Var_30,
  MR_Word Var_31,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word S_10)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_17_17);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv5_STATE_VARIABLE_U_20_20;
    void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv7_STATE_VARIABLE_U_22_22;
    void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv9_STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv11_STATE_VARIABLE_U_16;

    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_20_20);
    func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_6(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv7_STATE_VARIABLE_U_22_22);
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_55_95_95_91_54_93_95_48_6_p_0(Var_28, Var_29, Var_30, Var_31, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, S_10);
    func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_8(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv9_STATE_VARIABLE_U_24_24);
    func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_10(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv11_STATE_VARIABLE_U_16);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_55_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word S_10)
{
  while (MR_TRUE)
  {
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_16_25;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    func_0(((MR_Box) (Var_21)), ((MR_Box) (Var_22)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv1_STATE_VARIABLE_U_16_25);
    parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_6_p_0(Var_21, Var_24, (MR_Integer) 2, X_8, S_10);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (Var_21)), ((MR_Box) (Var_23)), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv3_STATE_VARIABLE_U_16_16);
    if (!((Xs_9 == (MR_Word) ((MR_Unsigned) 0U))))
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv5_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;

      func_4(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) (S_10)), ((MR_Box) ((MR_Integer) 0)), &conv5_STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_85_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_10,
  MR_String FunctorName_5,
  MR_Word S_6)
{
  MR_Word TypeClassInfo_for_writer_11;

  mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_10, (MR_Integer) 1, &TypeClassInfo_for_writer_11);
  mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_105_111_46_116_101_120_116_95_111_117_116_112_117_116_95_115_116_114_101_97_109_44_32_83_116_97_116_101_32_61_32_105_111_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_11, S_6, FunctorName_5);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_5(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv50_STATE_VARIABLE_U_29;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv50_STATE_VARIABLE_U_29);
  *wrapper_arg_4 = ((MR_Box) (conv50_STATE_VARIABLE_U_29));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv46_HeadVar__6_6;

  parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv46_HeadVar__6_6);
  *wrapper_arg_4 = ((MR_Box) (conv46_HeadVar__6_6));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv38_STATE_VARIABLE_U_18;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv38_STATE_VARIABLE_U_18);
  *wrapper_arg_4 = ((MR_Box) (conv38_STATE_VARIABLE_U_18));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv26_STATE_VARIABLE_U_29;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_109_111_114_101_95_110_111_110_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv26_STATE_VARIABLE_U_29);
  *wrapper_arg_4 = ((MR_Box) (conv26_STATE_VARIABLE_U_29));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;
  MR_Word conv8_STATE_VARIABLE_U_18;

  parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_111_110_115_116_97_110_116_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), ((MR_Word) (wrapper_arg_3)), &conv8_STATE_VARIABLE_U_18);
  *wrapper_arg_4 = ((MR_Box) (conv8_STATE_VARIABLE_U_18));
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_97,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word TVarSet_10,
  MR_Word FunctorRepn_11,
  MR_Word STATE_VARIABLE_U_0_22,
  MR_Word * STATE_VARIABLE_U_23)
{
  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      if (((MR_tag((MR_Word) FunctorRepn_11)) == (MR_Integer) 0))
      {
        MR_String FunctorName_14 = ((MR_String) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 0))));
        MR_Word ConstantRepns_15 = ((MR_Word) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 1))));
        MR_String I_16;
        MR_Integer Indent1_17;
        MR_Word STATE_VARIABLE_U_36_36;
        MR_Word STATE_VARIABLE_U_37_37;
        MR_Word STATE_VARIABLE_U_39_39;
        MR_Word STATE_VARIABLE_U_40_40;
        MR_Word STATE_VARIABLE_U_42_42;
        MR_Word Var_44;
        MR_Word STATE_VARIABLE_U_45_45;
        MR_Integer Var_46;
        MR_Word STATE_VARIABLE_U_49_49;
        MR_Word STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv1_STATE_VARIABLE_U_36_36;
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv3_STATE_VARIABLE_U_37_37;
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv5_STATE_VARIABLE_U_39_39;
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv7_STATE_VARIABLE_U_42_42;
        MR_Box conv9_STATE_VARIABLE_U_45_45;
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv11_STATE_VARIABLE_U_49_49;
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv13_STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv15_STATE_VARIABLE_U_23;

        I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_22)), &conv1_STATE_VARIABLE_U_36_36);
        STATE_VARIABLE_U_36_36 = ((MR_Word) (conv1_STATE_VARIABLE_U_36_36));
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_36_36)), &conv3_STATE_VARIABLE_U_37_37);
        STATE_VARIABLE_U_37_37 = ((MR_Word) (conv3_STATE_VARIABLE_U_37_37));
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "constant_functor(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_37_37)), &conv5_STATE_VARIABLE_U_39_39);
        STATE_VARIABLE_U_39_39 = ((MR_Word) (conv5_STATE_VARIABLE_U_39_39));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_14, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_40_40);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_40_40)), &conv7_STATE_VARIABLE_U_42_42);
        STATE_VARIABLE_U_42_42 = ((MR_Word) (conv7_STATE_VARIABLE_U_42_42));
        Indent1_17 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        Var_46 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        {
          Var_44 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_44, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[6]));
          MR_hl_field(0, Var_44, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_1));
          MR_hl_field(0, Var_44, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_44, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_44, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_44, 5) = ((MR_Box) (Var_46));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, Indent1_17, Var_44, ConstantRepns_15, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_42_42)), &conv9_STATE_VARIABLE_U_45_45);
        STATE_VARIABLE_U_45_45 = ((MR_Word) (conv9_STATE_VARIABLE_U_45_45));
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_45_45)), &conv11_STATE_VARIABLE_U_49_49);
        STATE_VARIABLE_U_49_49 = ((MR_Word) (conv11_STATE_VARIABLE_U_49_49));
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_16)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_49_49)), &conv13_STATE_VARIABLE_U_50_50);
        STATE_VARIABLE_U_50_50 = ((MR_Word) (conv13_STATE_VARIABLE_U_50_50));
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_50_50)), &conv15_STATE_VARIABLE_U_23);
        *STATE_VARIABLE_U_23 = ((MR_Word) (conv15_STATE_VARIABLE_U_23));
      }
      else
      {
        MR_Word ArgTypes_18 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 1))));
        MR_Word NonConstantRepns_19 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 2))));
        MR_Integer Indent2_20;
        MR_String NlI2_21;
        MR_Word STATE_VARIABLE_U_71_71;
        MR_Word STATE_VARIABLE_U_72_72;
        MR_Word STATE_VARIABLE_U_74_74;
        MR_Word STATE_VARIABLE_U_75_75;
        MR_Word STATE_VARIABLE_U_77_77;
        MR_Word STATE_VARIABLE_U_81_81;
        MR_Word STATE_VARIABLE_U_84_84;
        MR_Word Var_85;
        MR_Word STATE_VARIABLE_U_86_86;
        MR_Word STATE_VARIABLE_U_88_88;
        MR_Word STATE_VARIABLE_U_89_89;
        MR_String I_92;
        MR_Integer Indent1_93;
        MR_String FunctorName_96 = ((MR_String) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 0))));
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv17_STATE_VARIABLE_U_71_71;
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv19_STATE_VARIABLE_U_72_72;
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv21_STATE_VARIABLE_U_74_74;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv23_STATE_VARIABLE_U_77_77;
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv25_STATE_VARIABLE_U_84_84;
        MR_Box conv27_STATE_VARIABLE_U_86_86;
        void MR_CALL (* func_28)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv29_STATE_VARIABLE_U_88_88;
        void MR_CALL (* func_30)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv31_STATE_VARIABLE_U_89_89;
        void MR_CALL (* func_32)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv33_STATE_VARIABLE_U_23;

        I_92 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_22)), &conv17_STATE_VARIABLE_U_71_71);
        STATE_VARIABLE_U_71_71 = ((MR_Word) (conv17_STATE_VARIABLE_U_71_71));
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_92)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_71_71)), &conv19_STATE_VARIABLE_U_72_72);
        STATE_VARIABLE_U_72_72 = ((MR_Word) (conv19_STATE_VARIABLE_U_72_72));
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "nonconstant_functor(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_72_72)), &conv21_STATE_VARIABLE_U_74_74);
        STATE_VARIABLE_U_74_74 = ((MR_Word) (conv21_STATE_VARIABLE_U_74_74));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_96, STATE_VARIABLE_U_74_74, &STATE_VARIABLE_U_75_75);
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_75_75)), &conv23_STATE_VARIABLE_U_77_77);
        STATE_VARIABLE_U_77_77 = ((MR_Word) (conv23_STATE_VARIABLE_U_77_77));
        Indent1_93 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        Indent2_20 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        NlI2_21 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent2_20);
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_52_53_52_95_95_91_55_93_95_48_6_p_0(TypeClassInfo_for_pt_output_97, NlI2_21, (MR_String) "", TVarSet_10, TypeClassInfo_for_pt_output_97, Indent1_93, ArgTypes_18, STATE_VARIABLE_U_77_77, &STATE_VARIABLE_U_81_81);
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_24(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_81_81)), &conv25_STATE_VARIABLE_U_84_84);
        STATE_VARIABLE_U_84_84 = ((MR_Word) (conv25_STATE_VARIABLE_U_84_84));
        {
          Var_85 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_85, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[7]));
          MR_hl_field(0, Var_85, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_2));
          MR_hl_field(0, Var_85, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_85, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_85, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_85, 5) = ((MR_Box) (Indent2_20));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, Indent1_93, Var_85, NonConstantRepns_19, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_84_84)), &conv27_STATE_VARIABLE_U_86_86);
        STATE_VARIABLE_U_86_86 = ((MR_Word) (conv27_STATE_VARIABLE_U_86_86));
        func_28 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_28(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_86_86)), &conv29_STATE_VARIABLE_U_88_88);
        STATE_VARIABLE_U_88_88 = ((MR_Word) (conv29_STATE_VARIABLE_U_88_88));
        func_30 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_30(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_92)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_88_88)), &conv31_STATE_VARIABLE_U_89_89);
        STATE_VARIABLE_U_89_89 = ((MR_Word) (conv31_STATE_VARIABLE_U_89_89));
        func_32 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_32(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_89_89)), &conv33_STATE_VARIABLE_U_23);
        *STATE_VARIABLE_U_23 = ((MR_Word) (conv33_STATE_VARIABLE_U_23));
      }
      break;
    case (MR_Integer) 0:
      if (((MR_tag((MR_Word) FunctorRepn_11)) == (MR_Integer) 0))
      {
        MR_Word STATE_VARIABLE_U_25_25;
        MR_Word STATE_VARIABLE_U_26_26;
        MR_Word STATE_VARIABLE_U_28_28;
        MR_Word Var_30;
        MR_Word STATE_VARIABLE_U_31_31;
        MR_String FunctorName_128 = ((MR_String) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 0))));
        MR_Word ConstantRepns_129 = ((MR_Word) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 1))));
        void MR_CALL (* func_34)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv35_STATE_VARIABLE_U_25_25;
        void MR_CALL (* func_36)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv37_STATE_VARIABLE_U_28_28;
        MR_Box conv39_STATE_VARIABLE_U_31_31;
        void MR_CALL (* func_40)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv41_STATE_VARIABLE_U_23;

        func_34(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "constant_functor(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_22)), &conv35_STATE_VARIABLE_U_25_25);
        STATE_VARIABLE_U_25_25 = ((MR_Word) (conv35_STATE_VARIABLE_U_25_25));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_128, STATE_VARIABLE_U_25_25, &STATE_VARIABLE_U_26_26);
        func_36 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_36(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_26_26)), &conv37_STATE_VARIABLE_U_28_28);
        STATE_VARIABLE_U_28_28 = ((MR_Word) (conv37_STATE_VARIABLE_U_28_28));
        {
          Var_30 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[6]));
          MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_3));
          MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_30, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_30, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, (MR_Integer) 0, Var_30, ConstantRepns_129, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_28_28)), &conv39_STATE_VARIABLE_U_31_31);
        STATE_VARIABLE_U_31_31 = ((MR_Word) (conv39_STATE_VARIABLE_U_31_31));
        func_40 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_40(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_31_31)), &conv41_STATE_VARIABLE_U_23);
        *STATE_VARIABLE_U_23 = ((MR_Word) (conv41_STATE_VARIABLE_U_23));
      }
      else
      {
        MR_Word STATE_VARIABLE_U_54_54;
        MR_Word STATE_VARIABLE_U_55_55;
        MR_Word STATE_VARIABLE_U_57_57;
        MR_Word Var_58;
        MR_Word STATE_VARIABLE_U_60_60;
        MR_Word STATE_VARIABLE_U_63_63;
        MR_Word Var_65;
        MR_Word STATE_VARIABLE_U_66_66;
        MR_Word ArgTypes_130 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 1))));
        MR_Word NonConstantRepns_131 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 2))));
        MR_String FunctorName_132 = ((MR_String) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 0))));
        void MR_CALL (* func_42)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        MR_Box conv43_STATE_VARIABLE_U_54_54;
        void MR_CALL (* func_44)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv45_STATE_VARIABLE_U_57_57;
        MR_Box conv47_STATE_VARIABLE_U_60_60;
        void MR_CALL (* func_48)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv49_STATE_VARIABLE_U_63_63;
        MR_Box conv51_STATE_VARIABLE_U_66_66;
        void MR_CALL (* func_52)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        MR_Box conv53_STATE_VARIABLE_U_23;

        func_42(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "nonconstant_functor(")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_22)), &conv43_STATE_VARIABLE_U_54_54);
        STATE_VARIABLE_U_54_54 = ((MR_Word) (conv43_STATE_VARIABLE_U_54_54));
        parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_132, STATE_VARIABLE_U_54_54, &STATE_VARIABLE_U_55_55);
        func_44 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_44(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ", [")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_55_55)), &conv45_STATE_VARIABLE_U_57_57);
        STATE_VARIABLE_U_57_57 = ((MR_Word) (conv45_STATE_VARIABLE_U_57_57));
        {
          Var_58 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_58, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[8]));
          MR_hl_field(0, Var_58, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_4));
          MR_hl_field(0, Var_58, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_58, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_58, 4) = ((MR_Box) (TVarSet_10));
          MR_hl_field(0, Var_58, 5) = ((MR_Box) ((MR_Integer) 2));
        }
        parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0), TypeClassInfo_for_pt_output_97, Var_58, (MR_String) ", ", ArgTypes_130, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_57_57)), &conv47_STATE_VARIABLE_U_60_60);
        STATE_VARIABLE_U_60_60 = ((MR_Word) (conv47_STATE_VARIABLE_U_60_60));
        func_48 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_48(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "], ")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_60_60)), &conv49_STATE_VARIABLE_U_63_63);
        STATE_VARIABLE_U_63_63 = ((MR_Word) (conv49_STATE_VARIABLE_U_63_63));
        {
          Var_65 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_65, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[7]));
          MR_hl_field(0, Var_65, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_103_101_110_95_100_117_95_102_117_110_99_116_111_114_95_114_101_112_110_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_7_p_0_5));
          MR_hl_field(0, Var_65, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_65, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_65, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_65, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, (MR_Integer) 0, Var_65, NonConstantRepns_131, ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_63_63)), &conv51_STATE_VARIABLE_U_66_66);
        STATE_VARIABLE_U_66_66 = ((MR_Word) (conv51_STATE_VARIABLE_U_66_66));
        func_52 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_52(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_66_66)), &conv53_STATE_VARIABLE_U_23);
        *STATE_VARIABLE_U_23 = ((MR_Word) (conv53_STATE_VARIABLE_U_23));
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_52_53_52_95_95_91_55_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_String Var_29,
  MR_String Var_30,
  MR_Word Var_31,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_15,
  MR_Word * STATE_VARIABLE_U_16)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Word STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16;

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv1_STATE_VARIABLE_U_17_17);
    STATE_VARIABLE_U_17_17 = ((MR_Word) (conv1_STATE_VARIABLE_U_17_17));
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_17_17)), &conv3_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv3_STATE_VARIABLE_U_16));
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    MR_Word STATE_VARIABLE_U_20_20;
    MR_Word STATE_VARIABLE_U_22_22;
    MR_Word STATE_VARIABLE_U_23_23;
    MR_Word STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv5_STATE_VARIABLE_U_20_20;
    void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv7_STATE_VARIABLE_U_22_22;
    void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv9_STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv11_STATE_VARIABLE_U_16;

    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_15)), &conv5_STATE_VARIABLE_U_20_20);
    STATE_VARIABLE_U_20_20 = ((MR_Word) (conv5_STATE_VARIABLE_U_20_20));
    func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_6(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_20_20)), &conv7_STATE_VARIABLE_U_22_22);
    STATE_VARIABLE_U_22_22 = ((MR_Word) (conv7_STATE_VARIABLE_U_22_22));
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_48_95_95_91_54_93_95_48_6_p_0(Var_28, Var_29, Var_30, Var_31, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, STATE_VARIABLE_U_22_22, &STATE_VARIABLE_U_23_23);
    func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_8(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_23_23)), &conv9_STATE_VARIABLE_U_24_24);
    STATE_VARIABLE_U_24_24 = ((MR_Word) (conv9_STATE_VARIABLE_U_24_24));
    func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_10(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_24_24)), &conv11_STATE_VARIABLE_U_16);
    *STATE_VARIABLE_U_16 = ((MR_Word) (conv11_STATE_VARIABLE_U_16));
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_51_48_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Word STATE_VARIABLE_U_0_14,
  MR_Word * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Word STATE_VARIABLE_U_16_16;
    MR_Word STATE_VARIABLE_U_16_25;
    MR_Word STATE_VARIABLE_U_18_27;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    MR_Box conv1_STATE_VARIABLE_U_16_25;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    MR_Box conv3_STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    func_0(((MR_Box) (Var_21)), ((MR_Box) (Var_22)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_0_14)), &conv1_STATE_VARIABLE_U_16_25);
    STATE_VARIABLE_U_16_25 = ((MR_Word) (conv1_STATE_VARIABLE_U_16_25));
    parse_tree__parse_tree_out_type__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_116_121_112_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_6_p_0(Var_21, Var_24, (MR_Integer) 2, X_8, STATE_VARIABLE_U_16_25, &STATE_VARIABLE_U_18_27);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (Var_21)), ((MR_Box) (Var_23)), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_18_27)), &conv3_STATE_VARIABLE_U_16_16);
    STATE_VARIABLE_U_16_16 = ((MR_Word) (conv3_STATE_VARIABLE_U_16_16));
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Word STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Box conv5_STATE_VARIABLE_U_18_18;
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Word next_value_of_STATE_VARIABLE_U_0_14;

      func_4(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), ((MR_Box) ((MR_Integer) 0)), ((MR_Box) (STATE_VARIABLE_U_16_16)), &conv5_STATE_VARIABLE_U_18_18);
      STATE_VARIABLE_U_18_18 = ((MR_Word) (conv5_STATE_VARIABLE_U_18_18));
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_102_117_110_99_116_111_114_95_110_97_109_101_95_95_91_83_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_85_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_10,
  MR_String FunctorName_5,
  MR_Word STATE_VARIABLE_U_0_8,
  MR_Word * STATE_VARIABLE_U_9)
{
  MR_Word TypeClassInfo_for_writer_11;

  mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_10, (MR_Integer) 1, &TypeClassInfo_for_writer_11);
  mercury__term_io__f_84_121_112_101_83_112_101_99_79_102_95_95_112_114_101_100_95_95_102_111_114_109_97_116_95_113_117_111_116_101_100_95_115_116_114_105_110_103_95_95_91_83_116_114_101_97_109_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_104_97_110_100_108_101_44_32_83_116_97_116_101_32_61_32_115_116_114_105_110_103_46_98_117_105_108_100_101_114_46_115_116_97_116_101_93_95_48_95_49_4_p_0(TypeClassInfo_for_writer_11, FunctorName_5, STATE_VARIABLE_U_0_8, STATE_VARIABLE_U_9);
}

static MR_Word MR_CALL 
parse_tree__parse_tree_out_type_repn__IntroducedFrom__func__mercury_format_item_type_repn__87__1_2_f_0(
  MR_Word Context_14,
  MR_Word LambdaHeadVar__1_33)
{
  MR_Word LambdaHeadVar__2_34;

  {
    LambdaHeadVar__2_34 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
    MR_hl_field(1, LambdaHeadVar__2_34, 0) = ((MR_Box) (LambdaHeadVar__1_33));
    MR_hl_field(1, LambdaHeadVar__2_34, 1) = ((MR_Box) (Context_14));
  }
  return LambdaHeadVar__2_34;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_remote_arg_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_local_arg_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_121,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_28,
  MR_Box * STATE_VARIABLE_U_29)
{
  switch (MR_tag((MR_Word) NonConstantRepn_9)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word LocalRepn_12 = (MR_Word) ((MR_Word) (NonConstantRepn_9));
        MR_Word CellLocalSectag_13 = ((MR_Word) ((MR_hl_field(0, LocalRepn_12, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_14 = ((MR_Word) ((MR_hl_field(0, LocalRepn_12, (MR_Integer) 1))));

        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_String I_17;
              MR_Box STATE_VARIABLE_U_43_43;
              MR_Box STATE_VARIABLE_U_44_44;
              MR_Box STATE_VARIABLE_U_46_46;
              MR_Box STATE_VARIABLE_U_47_47;
              MR_Box STATE_VARIABLE_U_49_49;
              MR_Integer Var_50;
              MR_Word Var_52;
              MR_Box STATE_VARIABLE_U_53_53;
              MR_Integer Var_55;
              MR_Box STATE_VARIABLE_U_58_58;
              MR_Box STATE_VARIABLE_U_59_59;
              MR_Word HeadLocalArgRepn_111;
              MR_Word TailLocalArgRepns_112;

              I_17 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", S_10, STATE_VARIABLE_U_0_28, &STATE_VARIABLE_U_43_43);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_17, S_10, STATE_VARIABLE_U_43_43, &STATE_VARIABLE_U_44_44);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "local_cell(", S_10, STATE_VARIABLE_U_44_44, &STATE_VARIABLE_U_46_46);
              parse_tree__parse_tree_out_type_repn__mercury_format_cell_local_sectag_4_p_0(TypeClassInfo_for_pt_output_121, CellLocalSectag_13, S_10, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_47_47);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ",", S_10, STATE_VARIABLE_U_47_47, &STATE_VARIABLE_U_49_49);
              HeadLocalArgRepn_111 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 0))));
              TailLocalArgRepns_112 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 1))));
              Var_50 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
              Var_55 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
              {
                Var_52 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_52, 0) = ((MR_Box) (HeadLocalArgRepn_111));
                MR_hl_field(1, Var_52, 1) = ((MR_Box) (TailLocalArgRepns_112));
              }
              parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_49_48_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_121, TypeRepnFor_7, Var_55, TypeClassInfo_for_pt_output_121, Var_50, Var_52, S_10, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_53_53);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", S_10, STATE_VARIABLE_U_53_53, &STATE_VARIABLE_U_58_58);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_17, S_10, STATE_VARIABLE_U_58_58, &STATE_VARIABLE_U_59_59);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ")", S_10, STATE_VARIABLE_U_59_59, STATE_VARIABLE_U_29);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word HeadLocalArgRepn_15;
              MR_Word TailLocalArgRepns_16;
              MR_Box STATE_VARIABLE_U_31_31;
              MR_Box STATE_VARIABLE_U_32_32;
              MR_Box STATE_VARIABLE_U_34_34;
              MR_Word Var_35;
              MR_Word Var_37;
              MR_Box STATE_VARIABLE_U_38_38;

              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "local_cell(", S_10, STATE_VARIABLE_U_0_28, &STATE_VARIABLE_U_31_31);
              parse_tree__parse_tree_out_type_repn__mercury_format_cell_local_sectag_4_p_0(TypeClassInfo_for_pt_output_121, CellLocalSectag_13, S_10, STATE_VARIABLE_U_31_31, &STATE_VARIABLE_U_32_32);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", [", S_10, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_34_34);
              HeadLocalArgRepn_15 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 0))));
              TailLocalArgRepns_16 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_14, (MR_Integer) 1))));
              {
                Var_35 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_35, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[4]));
                MR_hl_field(0, Var_35, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0_1));
                MR_hl_field(0, Var_35, 2) = ((MR_Box) ((MR_Integer) 3));
                MR_hl_field(0, Var_35, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_121));
                MR_hl_field(0, Var_35, 4) = ((MR_Box) (TypeRepnFor_7));
                MR_hl_field(0, Var_35, 5) = ((MR_Box) ((MR_Integer) 0));
              }
              {
                Var_37 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_37, 0) = ((MR_Box) (HeadLocalArgRepn_15));
                MR_hl_field(1, Var_37, 1) = ((MR_Box) (TailLocalArgRepns_16));
              }
              parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0), TypeClassInfo_for_pt_output_121, Var_35, (MR_String) ", ", Var_37, S_10, STATE_VARIABLE_U_34_34, &STATE_VARIABLE_U_38_38);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "])", S_10, STATE_VARIABLE_U_38_38, STATE_VARIABLE_U_29);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word RemoteRepn_18 = (MR_Word) (MR_body((MR_Word) (NonConstantRepn_9), (MR_Integer) 1));
        MR_Word Ptag_19 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 0))));
        MR_Word CellRemoteSectag_20 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 1))));
        MR_Word OoMRemoteArgRepns_21 = ((MR_Word) ((MR_hl_field(0, RemoteRepn_18, (MR_Integer) 2))));
        uint8_t PtagUint8_22 = (uint8_t) (Ptag_19);
        MR_Unsigned PtagUint_23;

        PtagUint_23 = mercury__uint8__cast_to_uint_1_f_0(PtagUint8_22);
        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Box STATE_VARIABLE_U_78_78;
              MR_Box STATE_VARIABLE_U_79_79;
              MR_Box STATE_VARIABLE_U_81_81;
              MR_Box STATE_VARIABLE_U_82_82;
              MR_Box STATE_VARIABLE_U_84_84;
              MR_Box STATE_VARIABLE_U_85_85;
              MR_Box STATE_VARIABLE_U_87_87;
              MR_Integer Var_88;
              MR_Word Var_90;
              MR_Box STATE_VARIABLE_U_91_91;
              MR_Integer Var_93;
              MR_Box STATE_VARIABLE_U_96_96;
              MR_Box STATE_VARIABLE_U_97_97;
              MR_String I_113;
              MR_Word HeadRemoteArgRepn_114;
              MR_Word TailRemoteArgRepns_115;

              I_113 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", S_10, STATE_VARIABLE_U_0_28, &STATE_VARIABLE_U_78_78);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_113, S_10, STATE_VARIABLE_U_78_78, &STATE_VARIABLE_U_79_79);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "remote_cell(", S_10, STATE_VARIABLE_U_79_79, &STATE_VARIABLE_U_81_81);
              parse_tree__parse_tree_output__add_uint_4_p_0(TypeClassInfo_for_pt_output_121, PtagUint_23, S_10, STATE_VARIABLE_U_81_81, &STATE_VARIABLE_U_82_82);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", ", S_10, STATE_VARIABLE_U_82_82, &STATE_VARIABLE_U_84_84);
              parse_tree__parse_tree_out_type_repn__mercury_format_cell_remote_sectag_4_p_0(TypeClassInfo_for_pt_output_121, CellRemoteSectag_20, S_10, STATE_VARIABLE_U_84_84, &STATE_VARIABLE_U_85_85);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ",", S_10, STATE_VARIABLE_U_85_85, &STATE_VARIABLE_U_87_87);
              HeadRemoteArgRepn_114 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 0))));
              TailRemoteArgRepns_115 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 1))));
              Var_88 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
              Var_93 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
              {
                Var_90 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_90, 0) = ((MR_Box) (HeadRemoteArgRepn_114));
                MR_hl_field(1, Var_90, 1) = ((MR_Box) (TailRemoteArgRepns_115));
              }
              parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_48_57_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_121, TypeRepnFor_7, Var_93, TypeClassInfo_for_pt_output_121, Var_88, Var_90, S_10, STATE_VARIABLE_U_87_87, &STATE_VARIABLE_U_91_91);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "\n", S_10, STATE_VARIABLE_U_91_91, &STATE_VARIABLE_U_96_96);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, I_113, S_10, STATE_VARIABLE_U_96_96, &STATE_VARIABLE_U_97_97);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ")", S_10, STATE_VARIABLE_U_97_97, STATE_VARIABLE_U_29);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word HeadRemoteArgRepn_24;
              MR_Word TailRemoteArgRepns_25;
              MR_Box STATE_VARIABLE_U_63_63;
              MR_Box STATE_VARIABLE_U_64_64;
              MR_Box STATE_VARIABLE_U_66_66;
              MR_Box STATE_VARIABLE_U_67_67;
              MR_Box STATE_VARIABLE_U_69_69;
              MR_Word Var_70;
              MR_Word Var_72;
              MR_Box STATE_VARIABLE_U_73_73;

              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "remote_cell(", S_10, STATE_VARIABLE_U_0_28, &STATE_VARIABLE_U_63_63);
              parse_tree__parse_tree_output__add_uint_4_p_0(TypeClassInfo_for_pt_output_121, PtagUint_23, S_10, STATE_VARIABLE_U_63_63, &STATE_VARIABLE_U_64_64);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", ", S_10, STATE_VARIABLE_U_64_64, &STATE_VARIABLE_U_66_66);
              parse_tree__parse_tree_out_type_repn__mercury_format_cell_remote_sectag_4_p_0(TypeClassInfo_for_pt_output_121, CellRemoteSectag_20, S_10, STATE_VARIABLE_U_66_66, &STATE_VARIABLE_U_67_67);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) ", [", S_10, STATE_VARIABLE_U_67_67, &STATE_VARIABLE_U_69_69);
              HeadRemoteArgRepn_24 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 0))));
              TailRemoteArgRepns_25 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_21, (MR_Integer) 1))));
              {
                Var_70 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
                MR_hl_field(0, Var_70, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[5]));
                MR_hl_field(0, Var_70, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0_2));
                MR_hl_field(0, Var_70, 2) = ((MR_Box) ((MR_Integer) 3));
                MR_hl_field(0, Var_70, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_121));
                MR_hl_field(0, Var_70, 4) = ((MR_Box) (TypeRepnFor_7));
                MR_hl_field(0, Var_70, 5) = ((MR_Box) ((MR_Integer) 0));
              }
              {
                Var_72 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
                MR_hl_field(1, Var_72, 0) = ((MR_Box) (HeadRemoteArgRepn_24));
                MR_hl_field(1, Var_72, 1) = ((MR_Box) (TailRemoteArgRepns_25));
              }
              parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0), TypeClassInfo_for_pt_output_121, Var_70, (MR_String) ", ", Var_72, S_10, STATE_VARIABLE_U_69_69, &STATE_VARIABLE_U_73_73);
              parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, (MR_String) "])", S_10, STATE_VARIABLE_U_73_73, STATE_VARIABLE_U_29);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 2:
      {
        MR_String Str_26;
        MR_Word Ptag_118 = ((MR_Word) ((MR_hl_field(2, NonConstantRepn_9, (MR_Integer) 0))));
        uint8_t PtagUint8_119 = (uint8_t) (Ptag_118);
        MR_Unsigned PtagUint_120;

        PtagUint_120 = mercury__uint8__cast_to_uint_1_f_0(PtagUint8_119);
        switch (TypeRepnFor_7) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_String NlI_27;
              MR_String Var_155;
              MR_String Var_162;
              MR_String Var_164;

              NlI_27 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
              mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, PtagUint_120, &Var_155);
              Var_162 = mercury__string__f_43_43_2_f_0(Var_155, (MR_String) ")");
              Var_164 = mercury__string__f_43_43_2_f_0((MR_String) "direct_arg(", Var_162);
              Str_26 = mercury__string__f_43_43_2_f_0(NlI_27, Var_164);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_String Var_144;
              MR_String Var_151;

              mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, PtagUint_120, &Var_144);
              Var_151 = mercury__string__f_43_43_2_f_0(Var_144, (MR_String) ")");
              Str_26 = mercury__string__f_43_43_2_f_0((MR_String) "direct_arg(", Var_151);
            }
            break;
        }
        parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_121, Str_26, S_10, STATE_VARIABLE_U_0_28, STATE_VARIABLE_U_29);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_49_48_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Box STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_17_17);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), S_10, STATE_VARIABLE_U_17_17, STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    MR_Box STATE_VARIABLE_U_20_20;
    MR_Box STATE_VARIABLE_U_22_22;
    MR_Box STATE_VARIABLE_U_23_23;
    MR_Box STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_20_20);
    func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_3(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), S_10, STATE_VARIABLE_U_20_20, &STATE_VARIABLE_U_22_22);
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_49_95_95_91_53_93_95_48_6_p_0(Var_28, Var_29, Var_30, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, S_10, STATE_VARIABLE_U_22_22, &STATE_VARIABLE_U_23_23);
    func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_23_23, &STATE_VARIABLE_U_24_24);
    func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_5(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), S_10, STATE_VARIABLE_U_24_24, STATE_VARIABLE_U_16);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_cell_remote_sectag_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_20,
  MR_Word CellLocalSectag_5,
  MR_Box S_6,
  MR_Box STATE_VARIABLE_U_0_12,
  MR_Box * STATE_VARIABLE_U_13)
{
  MR_String Str_8;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

  if ((CellLocalSectag_5 == (MR_Word) ((MR_Unsigned) 0U)))
    Str_8 = (MR_String) "remote_no_sectag";
  else
  {
    MR_Unsigned Sectag_9 = ((MR_Unsigned) ((MR_hl_field(1, CellLocalSectag_5, (MR_Integer) 0))));
    MR_Word SectagWordOrSize_10 = ((MR_Word) ((MR_hl_field(1, CellLocalSectag_5, (MR_Integer) 1))));
    MR_String SectagWordOrSizeStr_11;
    MR_String Var_22;
    MR_String Var_24;
    MR_String Var_26;
    MR_String Var_33;

    if ((SectagWordOrSize_10 == (MR_Word) ((MR_Unsigned) 0U)))
      SectagWordOrSizeStr_11 = (MR_String) "rst_full";
    else
    {
      uint8_t NumBits_35 = ((uint8_t) (MR_Word) (MR_hl_field(1, SectagWordOrSize_10, (MR_Integer) 0)));
      MR_Unsigned Var_42;
      MR_String Var_43;
      MR_String Var_50;

      mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_35, &Var_42);
      mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_42, &Var_43);
      Var_50 = mercury__string__f_43_43_2_f_0(Var_43, (MR_String) ")");
      SectagWordOrSizeStr_11 = mercury__string__f_43_43_2_f_0((MR_String) "rst_part(", Var_50);
    }
    Var_22 = mercury__string__f_43_43_2_f_0(SectagWordOrSizeStr_11, (MR_String) ")");
    Var_24 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_22);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_9, &Var_26);
    Var_33 = mercury__string__f_43_43_2_f_0(Var_26, Var_24);
    Str_8 = mercury__string__f_43_43_2_f_0((MR_String) "remote_sectag(", Var_33);
  }
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_20, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_20)), ((MR_Box) (Str_8)), S_6, STATE_VARIABLE_U_0_12, STATE_VARIABLE_U_13);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_cell_local_sectag_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word CellLocalSectag_5,
  MR_Box S_6,
  MR_Box STATE_VARIABLE_U_0_11,
  MR_Box * STATE_VARIABLE_U_12)
{
  MR_Unsigned Sectag_8 = ((MR_Unsigned) ((MR_hl_field(0, CellLocalSectag_5, (MR_Integer) 0))));
  uint8_t SectagNumBits_9 = ((uint8_t) (MR_Word) (MR_hl_field(0, CellLocalSectag_5, (MR_Integer) 1)));
  MR_String Str_10;
  MR_Unsigned Var_22;
  MR_String Var_23;
  MR_String Var_30;
  MR_String Var_32;
  MR_String Var_34;
  MR_String Var_41;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

  mercury__string__format__format_cast_uint8_to_uint_2_p_0(SectagNumBits_9, &Var_22);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_22, &Var_23);
  Var_30 = mercury__string__f_43_43_2_f_0(Var_23, (MR_String) ")");
  Var_32 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_30);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_8, &Var_34);
  Var_41 = mercury__string__f_43_43_2_f_0(Var_34, Var_32);
  Str_10 = mercury__string__f_43_43_2_f_0((MR_String) "local_sectag(", Var_41);
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) (Str_10)), S_6, STATE_VARIABLE_U_0_11, STATE_VARIABLE_U_12);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_remote_arg_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_local_arg_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_80,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word NonConstantRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_21,
  MR_Box * STATE_VARIABLE_U_22)
{
  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      if (((MR_tag((MR_Word) NonConstantRepn_9)) == (MR_Integer) 0))
      {
        MR_Word LocalRepn_12 = ((MR_Word) ((MR_hl_field(0, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_13 = (MR_Word) (LocalRepn_12);
        MR_String I_16;
        MR_Box STATE_VARIABLE_U_33_33;
        MR_Box STATE_VARIABLE_U_34_34;
        MR_Box STATE_VARIABLE_U_36_36;
        MR_Integer Var_37;
        MR_Word Var_39;
        MR_Box STATE_VARIABLE_U_40_40;
        MR_Integer Var_42;
        MR_Box STATE_VARIABLE_U_45_45;
        MR_Box STATE_VARIABLE_U_46_46;
        MR_Word HeadLocalArgRepn_75;
        MR_Word TailLocalArgRepns_76;
        MR_String NlI_105;
        MR_Word HeadX_106;
        MR_Word TailXs_107;
        MR_Box STATE_VARIABLE_U_20_110;
        MR_Box STATE_VARIABLE_U_22_112;
        MR_Box STATE_VARIABLE_U_23_113;
        MR_Box STATE_VARIABLE_U_24_114;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), S_10, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_33_33);
        func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_1(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_16)), S_10, STATE_VARIABLE_U_33_33, &STATE_VARIABLE_U_34_34);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_local_cell([")), S_10, STATE_VARIABLE_U_34_34, &STATE_VARIABLE_U_36_36);
        HeadLocalArgRepn_75 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_13, (MR_Integer) 0))));
        TailLocalArgRepns_76 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_13, (MR_Integer) 1))));
        Var_37 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
        Var_42 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
        {
          Var_39 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_39, 0) = ((MR_Box) (HeadLocalArgRepn_75));
          MR_hl_field(1, Var_39, 1) = ((MR_Box) (TailLocalArgRepns_76));
        }
        NlI_105 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_37);
        HeadX_106 = ((MR_Word) ((MR_hl_field(1, Var_39, (MR_Integer) 0))));
        TailXs_107 = ((MR_Word) ((MR_hl_field(1, Var_39, (MR_Integer) 1))));
        func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_3(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (NlI_105)), S_10, STATE_VARIABLE_U_36_36, &STATE_VARIABLE_U_20_110);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "[")), S_10, STATE_VARIABLE_U_20_110, &STATE_VARIABLE_U_22_112);
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_49_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_80, TypeRepnFor_7, Var_42, TypeClassInfo_for_pt_output_80, HeadX_106, TailXs_107, S_10, STATE_VARIABLE_U_22_112, &STATE_VARIABLE_U_23_113);
        func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_5(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (NlI_105)), S_10, STATE_VARIABLE_U_23_113, &STATE_VARIABLE_U_24_114);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "]")), S_10, STATE_VARIABLE_U_24_114, &STATE_VARIABLE_U_40_40);
        func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_7(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), S_10, STATE_VARIABLE_U_40_40, &STATE_VARIABLE_U_45_45);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_16)), S_10, STATE_VARIABLE_U_45_45, &STATE_VARIABLE_U_46_46);
        func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_9(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) ")")), S_10, STATE_VARIABLE_U_46_46, STATE_VARIABLE_U_22);
      }
      else
      {
        MR_Word RemoteRepn_17 = ((MR_Word) ((MR_hl_field(1, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMRemoteArgRepns_18 = (MR_Word) (RemoteRepn_17);
        MR_Box STATE_VARIABLE_U_59_59;
        MR_Box STATE_VARIABLE_U_60_60;
        MR_Box STATE_VARIABLE_U_62_62;
        MR_Integer Var_63;
        MR_Word Var_65;
        MR_Box STATE_VARIABLE_U_66_66;
        MR_Integer Var_68;
        MR_Box STATE_VARIABLE_U_71_71;
        MR_Box STATE_VARIABLE_U_72_72;
        MR_String I_77;
        MR_Word HeadRemoteArgRepn_78;
        MR_Word TailRemoteArgRepns_79;
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_77 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_8);
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), S_10, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_59_59);
        func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_11(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_77)), S_10, STATE_VARIABLE_U_59_59, &STATE_VARIABLE_U_60_60);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_remote_cell([")), S_10, STATE_VARIABLE_U_60_60, &STATE_VARIABLE_U_62_62);
        HeadRemoteArgRepn_78 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_18, (MR_Integer) 0))));
        TailRemoteArgRepns_79 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_18, (MR_Integer) 1))));
        Var_63 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 1);
        Var_68 = (MR_Integer) ((MR_Unsigned) Indent_8 + (MR_Unsigned) 2);
        {
          Var_65 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_65, 0) = ((MR_Box) (HeadRemoteArgRepn_78));
          MR_hl_field(1, Var_65, 1) = ((MR_Box) (TailRemoteArgRepns_79));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_48_57_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_80, TypeRepnFor_7, Var_68, TypeClassInfo_for_pt_output_80, Var_63, Var_65, S_10, STATE_VARIABLE_U_62_62, &STATE_VARIABLE_U_66_66);
        func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_13(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "\n")), S_10, STATE_VARIABLE_U_66_66, &STATE_VARIABLE_U_71_71);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (I_77)), S_10, STATE_VARIABLE_U_71_71, &STATE_VARIABLE_U_72_72);
        func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_15(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) ")")), S_10, STATE_VARIABLE_U_72_72, STATE_VARIABLE_U_22);
      }
      break;
    case (MR_Integer) 0:
      if (((MR_tag((MR_Word) NonConstantRepn_9)) == (MR_Integer) 0))
      {
        MR_Word HeadLocalArgRepn_14;
        MR_Word TailLocalArgRepns_15;
        MR_Box STATE_VARIABLE_U_24_24;
        MR_Word Var_25;
        MR_Word Var_27;
        MR_Box STATE_VARIABLE_U_28_28;
        MR_Word LocalRepn_101 = ((MR_Word) ((MR_hl_field(0, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMLocalArgRepns_102 = (MR_Word) (LocalRepn_101);
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_16(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_local_cell([")), S_10, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_24_24);
        HeadLocalArgRepn_14 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_102, (MR_Integer) 0))));
        TailLocalArgRepns_15 = ((MR_Word) ((MR_hl_field(0, OoMLocalArgRepns_102, (MR_Integer) 1))));
        {
          Var_25 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_25, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[4]));
          MR_hl_field(0, Var_25, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0_1));
          MR_hl_field(0, Var_25, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_25, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_80));
          MR_hl_field(0, Var_25, 4) = ((MR_Box) (TypeRepnFor_7));
          MR_hl_field(0, Var_25, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        {
          Var_27 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_27, 0) = ((MR_Box) (HeadLocalArgRepn_14));
          MR_hl_field(1, Var_27, 1) = ((MR_Box) (TailLocalArgRepns_15));
        }
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 25))));
        func_17(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_local_arg_repn_0)), ((MR_Box) (Var_25)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_27)), S_10, STATE_VARIABLE_U_24_24, &STATE_VARIABLE_U_28_28);
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "])")), S_10, STATE_VARIABLE_U_28_28, STATE_VARIABLE_U_22);
      }
      else
      {
        MR_Word HeadRemoteArgRepn_19;
        MR_Word TailRemoteArgRepns_20;
        MR_Box STATE_VARIABLE_U_50_50;
        MR_Word Var_51;
        MR_Word Var_53;
        MR_Box STATE_VARIABLE_U_54_54;
        MR_Word RemoteRepn_103 = ((MR_Word) ((MR_hl_field(1, NonConstantRepn_9, (MR_Integer) 0))));
        MR_Word OoMRemoteArgRepns_104 = (MR_Word) (RemoteRepn_103);
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_19(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "only_remote_cell([")), S_10, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_50_50);
        HeadRemoteArgRepn_19 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_104, (MR_Integer) 0))));
        TailRemoteArgRepns_20 = ((MR_Word) ((MR_hl_field(0, OoMRemoteArgRepns_104, (MR_Integer) 1))));
        {
          Var_51 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_51, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[5]));
          MR_hl_field(0, Var_51, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0_2));
          MR_hl_field(0, Var_51, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_51, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_80));
          MR_hl_field(0, Var_51, 4) = ((MR_Box) (TypeRepnFor_7));
          MR_hl_field(0, Var_51, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        {
          Var_53 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
          MR_hl_field(1, Var_53, 0) = ((MR_Box) (HeadRemoteArgRepn_19));
          MR_hl_field(1, Var_53, 1) = ((MR_Box) (TailRemoteArgRepns_20));
        }
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 25))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_remote_arg_repn_0)), ((MR_Box) (Var_51)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_53)), S_10, STATE_VARIABLE_U_50_50, &STATE_VARIABLE_U_54_54);
        func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_80, (MR_Integer) 0)), (MR_Integer) 6))));
        func_21(((MR_Box) (TypeClassInfo_for_pt_output_80)), ((MR_Box) ((MR_String) "])")), S_10, STATE_VARIABLE_U_54_54, STATE_VARIABLE_U_22);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_49_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Box STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__mercury_format_local_arg_repn_6_p_0(Var_21, Var_22, Var_23, X_8, S_10, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Box STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Box next_value_of_STATE_VARIABLE_U_0_14;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), S_10, STATE_VARIABLE_U_16_16, &STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_local_arg_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_31,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word LocalArgRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_16,
  MR_Box * STATE_VARIABLE_U_17)
{
  MR_String NlI_12;
  MR_String Str_15;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
      break;
    case (MR_Integer) 0:
      NlI_12 = (MR_String) "";
      break;
  }
  if ((LocalArgRepn_9 == (MR_Word) ((MR_Unsigned) 0U)))
    Str_15 = mercury__string__f_43_43_2_f_0(NlI_12, (MR_String) "local_none");
  else
  {
    MR_Unsigned Shift_13 = ((MR_Unsigned) ((MR_hl_field(1, LocalArgRepn_9, (MR_Integer) 0))));
    MR_Word FillKindSize_14 = ((MR_Word) ((MR_hl_field(1, LocalArgRepn_9, (MR_Integer) 1))));
    MR_String Var_25;
    MR_String Var_33;
    MR_String Var_35;
    MR_String Var_37;
    MR_String Var_44;
    MR_String Var_46;

    Var_25 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_14);
    Var_33 = mercury__string__f_43_43_2_f_0(Var_25, (MR_String) ")");
    Var_35 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_33);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Shift_13, &Var_37);
    Var_44 = mercury__string__f_43_43_2_f_0(Var_37, Var_35);
    Var_46 = mercury__string__f_43_43_2_f_0((MR_String) "local_partial(", Var_44);
    Str_15 = mercury__string__f_43_43_2_f_0(NlI_12, Var_46);
  }
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_31, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_31)), ((MR_Box) (Str_15)), S_10, STATE_VARIABLE_U_0_16, STATE_VARIABLE_U_17);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_48_57_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_Word Var_29,
  MR_Integer Var_30,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Box STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_17_17);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), S_10, STATE_VARIABLE_U_17_17, STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    MR_Box STATE_VARIABLE_U_20_20;
    MR_Box STATE_VARIABLE_U_22_22;
    MR_Box STATE_VARIABLE_U_23_23;
    MR_Box STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_20_20);
    func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_3(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), S_10, STATE_VARIABLE_U_20_20, &STATE_VARIABLE_U_22_22);
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_50_95_95_91_53_93_95_48_6_p_0(Var_28, Var_29, Var_30, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, S_10, STATE_VARIABLE_U_22_22, &STATE_VARIABLE_U_23_23);
    func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_23_23, &STATE_VARIABLE_U_24_24);
    func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_5(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), S_10, STATE_VARIABLE_U_24_24, STATE_VARIABLE_U_16);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_50_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Box STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__mercury_format_remote_arg_repn_6_p_0(Var_21, Var_22, Var_23, X_8, S_10, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Box STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Box next_value_of_STATE_VARIABLE_U_0_14;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), S_10, STATE_VARIABLE_U_16_16, &STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_remote_arg_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_83,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word RemoteArgRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_23,
  MR_Box * STATE_VARIABLE_U_24)
{
  MR_String NlI_12;
  MR_String Str_17;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_for_humans_2_f_0(TypeRepnFor_7, Indent_8);
  switch (MR_tag((MR_Word) RemoteArgRepn_9)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, (MR_String) "none_nowhere");
      break;
    case (MR_Integer) 1:
      {
        MR_Word ArgOnlyOffset_13 = ((MR_Word) ((MR_hl_field(1, RemoteArgRepn_9, (MR_Integer) 0))));
        MR_Word CellOffset_14 = ((MR_Word) ((MR_hl_field(1, RemoteArgRepn_9, (MR_Integer) 1))));
        MR_Integer ArgOnlyOffsetInt_15 = (MR_Integer) (ArgOnlyOffset_13);
        MR_Integer CellOffsetInt_16 = (MR_Integer) (CellOffset_14);
        MR_String Var_207;
        MR_String Var_214;
        MR_String Var_216;
        MR_String Var_217;
        MR_String Var_224;
        MR_String Var_226;

        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_16, &Var_207);
        Var_214 = mercury__string__f_43_43_2_f_0(Var_207, (MR_String) ")");
        Var_216 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_214);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_15, &Var_217);
        Var_224 = mercury__string__f_43_43_2_f_0(Var_217, Var_216);
        Var_226 = mercury__string__f_43_43_2_f_0((MR_String) "full(", Var_224);
        Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_226);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word DoubleKind_18 = ((MR_Unsigned) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 2))) & (MR_Integer) 3);
        MR_String DKStr_19;
        MR_Word ArgOnlyOffset_71 = ((MR_Word) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 0))));
        MR_Word CellOffset_72 = ((MR_Word) ((MR_hl_field(2, RemoteArgRepn_9, (MR_Integer) 1))));
        MR_Integer ArgOnlyOffsetInt_73 = (MR_Integer) (ArgOnlyOffset_71);
        MR_Integer CellOffsetInt_74 = (MR_Integer) (CellOffset_72);
        MR_String Var_228;
        MR_String Var_230;
        MR_String Var_231;
        MR_String Var_238;
        MR_String Var_240;
        MR_String Var_241;
        MR_String Var_248;
        MR_String Var_250;

        parse_tree__prog_data__double_word_kind_string_2_p_0(DoubleKind_18, &DKStr_19);
        Var_228 = mercury__string__f_43_43_2_f_0(DKStr_19, (MR_String) ")");
        Var_230 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_228);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_74, &Var_231);
        Var_238 = mercury__string__f_43_43_2_f_0(Var_231, Var_230);
        Var_240 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_238);
        mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_73, &Var_241);
        Var_248 = mercury__string__f_43_43_2_f_0(Var_241, Var_240);
        Var_250 = mercury__string__f_43_43_2_f_0((MR_String) "double(", Var_248);
        Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_250);
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            uint8_t Shift_20 = ((uint8_t) (MR_Word) (MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 3)));
            MR_Word FillKindSize_21 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 4))));
            MR_String Var_56;
            MR_Word ArgOnlyOffset_75 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_76 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_77 = (MR_Integer) (ArgOnlyOffset_75);
            MR_Integer CellOffsetInt_78 = (MR_Integer) (CellOffset_76);
            MR_String Var_146;
            MR_String Var_148;
            MR_Unsigned Var_150;
            MR_String Var_151;
            MR_String Var_158;
            MR_String Var_160;
            MR_String Var_161;
            MR_String Var_168;
            MR_String Var_170;
            MR_String Var_171;
            MR_String Var_178;
            MR_String Var_180;
            MR_String Var_181;
            MR_String Var_183;

            Var_56 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_21);
            Var_146 = mercury__string__f_43_43_2_f_0(Var_56, (MR_String) ")");
            Var_148 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_146);
            mercury__string__format__format_cast_uint8_to_uint_2_p_0(Shift_20, &Var_150);
            mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_150, &Var_151);
            Var_158 = mercury__string__f_43_43_2_f_0(Var_151, Var_148);
            Var_160 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_158);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_78, &Var_161);
            Var_168 = mercury__string__f_43_43_2_f_0(Var_161, Var_160);
            Var_170 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_168);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_77, &Var_171);
            Var_178 = mercury__string__f_43_43_2_f_0(Var_171, Var_170);
            Var_180 = mercury__string__f_43_43_2_f_0((MR_String) "(", Var_178);
            Var_181 = mercury__string__f_43_43_2_f_0((MR_String) "first", Var_180);
            Var_183 = mercury__string__f_43_43_2_f_0((MR_String) "partial_", Var_181);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_183);
          }
          break;
        case (MR_Integer) 1:
          {
            uint8_t Shift_84 = ((uint8_t) (MR_Word) (MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 3)));
            MR_Word FillKindSize_85 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 4))));
            MR_String Var_100;
            MR_Word ArgOnlyOffset_102 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_103 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_104 = (MR_Integer) (ArgOnlyOffset_102);
            MR_Integer CellOffsetInt_105 = (MR_Integer) (CellOffset_103);
            MR_String Var_107;
            MR_String Var_109;
            MR_Unsigned Var_111;
            MR_String Var_112;
            MR_String Var_119;
            MR_String Var_121;
            MR_String Var_122;
            MR_String Var_129;
            MR_String Var_131;
            MR_String Var_132;
            MR_String Var_139;
            MR_String Var_141;
            MR_String Var_142;
            MR_String Var_144;

            Var_100 = parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(FillKindSize_85);
            Var_107 = mercury__string__f_43_43_2_f_0(Var_100, (MR_String) ")");
            Var_109 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_107);
            mercury__string__format__format_cast_uint8_to_uint_2_p_0(Shift_84, &Var_111);
            mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_111, &Var_112);
            Var_119 = mercury__string__f_43_43_2_f_0(Var_112, Var_109);
            Var_121 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_119);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_105, &Var_122);
            Var_129 = mercury__string__f_43_43_2_f_0(Var_122, Var_121);
            Var_131 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_129);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_104, &Var_132);
            Var_139 = mercury__string__f_43_43_2_f_0(Var_132, Var_131);
            Var_141 = mercury__string__f_43_43_2_f_0((MR_String) "(", Var_139);
            Var_142 = mercury__string__f_43_43_2_f_0((MR_String) "shifted", Var_141);
            Var_144 = mercury__string__f_43_43_2_f_0((MR_String) "partial_", Var_142);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_144);
          }
          break;
        case (MR_Integer) 2:
          {
            MR_Word ArgOnlyOffset_79 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 1))));
            MR_Word CellOffset_80 = ((MR_Word) ((MR_hl_field(3, RemoteArgRepn_9, (MR_Integer) 2))));
            MR_Integer ArgOnlyOffsetInt_81 = (MR_Integer) (ArgOnlyOffset_79);
            MR_Integer CellOffsetInt_82 = (MR_Integer) (CellOffset_80);
            MR_String Var_185;
            MR_String Var_192;
            MR_String Var_194;
            MR_String Var_195;
            MR_String Var_202;
            MR_String Var_204;

            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), CellOffsetInt_82, &Var_185);
            Var_192 = mercury__string__f_43_43_2_f_0(Var_185, (MR_String) ")");
            Var_194 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_192);
            mercury__string__format__format_signed_int_component_nowidth_noprec_3_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), ArgOnlyOffsetInt_81, &Var_195);
            Var_202 = mercury__string__f_43_43_2_f_0(Var_195, Var_194);
            Var_204 = mercury__string__f_43_43_2_f_0((MR_String) "none_shifted(", Var_202);
            Str_17 = mercury__string__f_43_43_2_f_0(NlI_12, Var_204);
          }
          break;
      }
      break;
  }
  parse_tree__parse_tree_output__add_string_4_p_0(TypeClassInfo_for_pt_output_83, Str_17, S_10, STATE_VARIABLE_U_0_23, STATE_VARIABLE_U_24);
}

static MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__nl_indent_for_humans_2_f_0(
  MR_Word TypeRepnFor_4,
  MR_Integer Indent_5)
{
  MR_String Str_6;

  switch (TypeRepnFor_4) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      Str_6 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_5);
      break;
    case (MR_Integer) 0:
      Str_6 = (MR_String) "";
      break;
  }
  return Str_6;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_constant_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_27,
  MR_Word TypeRepnFor_7,
  MR_Integer Indent_8,
  MR_Word ConstantRepn_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_17,
  MR_Box * STATE_VARIABLE_U_18)
{
  MR_String NlI_12;
  MR_Unsigned Sectag_13;
  MR_Word SectagWordOrSize_14;
  MR_String SectagWordOrSizeStr_15;
  MR_String Str_16;
  MR_String Var_29;
  MR_String Var_31;
  MR_String Var_33;
  MR_String Var_40;
  MR_String Var_42;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

  switch (TypeRepnFor_7) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_8);
      break;
    case (MR_Integer) 0:
      NlI_12 = (MR_String) " ";
      break;
  }
  Sectag_13 = ((MR_Unsigned) ((MR_hl_field(0, ConstantRepn_9, (MR_Integer) 0))));
  SectagWordOrSize_14 = ((MR_Word) ((MR_hl_field(0, ConstantRepn_9, (MR_Integer) 1))));
  if (((MR_tag((MR_Word) SectagWordOrSize_14)) == (MR_Integer) 1))
  {
    uint8_t NumBits_52 = ((uint8_t) (MR_Word) (MR_hl_field(1, SectagWordOrSize_14, (MR_Integer) 0)));
    MR_Unsigned Var_67;
    MR_String Var_68;
    MR_String Var_75;

    mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_52, &Var_67);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_67, &Var_68);
    Var_75 = mercury__string__f_43_43_2_f_0(Var_68, (MR_String) ")");
    SectagWordOrSizeStr_15 = mercury__string__f_43_43_2_f_0((MR_String) "lst_part(", Var_75);
  }
  else
  {
    uint8_t NumBits_43 = ((uint8_t) (MR_Word) (MR_hl_field(0, SectagWordOrSize_14, (MR_Integer) 0)));
    MR_Unsigned Var_55;
    MR_String Var_56;
    MR_String Var_63;

    mercury__string__format__format_cast_uint8_to_uint_2_p_0(NumBits_43, &Var_55);
    mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Var_55, &Var_56);
    Var_63 = mercury__string__f_43_43_2_f_0(Var_56, (MR_String) ")");
    SectagWordOrSizeStr_15 = mercury__string__f_43_43_2_f_0((MR_String) "lst_rest(", Var_63);
  }
  Var_29 = mercury__string__f_43_43_2_f_0(SectagWordOrSizeStr_15, (MR_String) ")");
  Var_31 = mercury__string__f_43_43_2_f_0((MR_String) ", ", Var_29);
  mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, Sectag_13, &Var_33);
  Var_40 = mercury__string__f_43_43_2_f_0(Var_33, Var_31);
  Var_42 = mercury__string__f_43_43_2_f_0((MR_String) "constant(", Var_40);
  Str_16 = mercury__string__f_43_43_2_f_0(NlI_12, Var_42);
  func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_27, (MR_Integer) 0)), (MR_Integer) 6))));
  func_0(((MR_Box) (TypeClassInfo_for_pt_output_27)), ((MR_Box) (Str_16)), S_10, STATE_VARIABLE_U_0_17, STATE_VARIABLE_U_18);
}

MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(
  MR_Word Assertion_3)
{
  MR_String Str_4;

  switch (Assertion_3) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      Str_4 = (MR_String) "can_pass_as_mercury_type";
      break;
    case (MR_Integer) 1:
      Str_4 = (MR_String) "stable";
      break;
    case (MR_Integer) 2:
      Str_4 = (MR_String) "word_aligned_pointer";
      break;
  }
  return Str_4;
}

MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__fill_kind_size_to_string_1_f_0(
  MR_Word FillKindSize_3)
{
  MR_String Str_4;

  switch (MR_tag((MR_Word) FillKindSize_3)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      switch (MR_unmkbody(FillKindSize_3)) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          Str_4 = (MR_String) "int8";
          break;
        case (MR_Integer) 1:
          Str_4 = (MR_String) "int16";
          break;
        case (MR_Integer) 2:
          Str_4 = (MR_String) "int32";
          break;
        case (MR_Integer) 3:
          Str_4 = (MR_String) "uint8";
          break;
        case (MR_Integer) 4:
          Str_4 = (MR_String) "uint16";
          break;
        case (MR_Integer) 5:
          Str_4 = (MR_String) "uint32";
          break;
        case (MR_Integer) 6:
          Str_4 = (MR_String) "char21";
          break;
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Unsigned NumBits_5 = ((MR_Unsigned) ((MR_hl_field(1, FillKindSize_3, (MR_Integer) 0))));
        MR_String Var_12;
        MR_String Var_19;

        mercury__string__format__format_uint_component_nowidth_noprec_4_p_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_2[0]), (MR_Integer) 1, NumBits_5, &Var_12);
        Var_19 = mercury__string__f_43_43_2_f_0(Var_12, (MR_String) ")");
        Str_4 = mercury__string__f_43_43_2_f_0((MR_String) "enum(", Var_19);
      }
      break;
  }
  return Str_4;
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_item_type_repn_5_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_Word conv1_LambdaHeadVar__2_34;

  conv1_LambdaHeadVar__2_34 = parse_tree__parse_tree_out_type_repn__IntroducedFrom__func__mercury_format_item_type_repn__87__1_2_f_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv1_LambdaHeadVar__2_34));
  return wrapper_arg_2;
}

void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_item_type_repn_5_p_0(
  MR_Word TypeClassInfo_for_pt_output_100,
  MR_Word Info_6,
  MR_Box S_7,
  MR_Word ItemTypeRepn_8,
  MR_Box STATE_VARIABLE_U_0_28,
  MR_Box * STATE_VARIABLE_U_29)
{
  MR_Word TypeCtorSymName0_10 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 0))));
  MR_Word TypeParams_11 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 1))));
  MR_Word RepnInfo_12 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 2))));
  MR_Word TVarSet_13 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 3))));
  MR_Word Context_14 = ((MR_Word) ((MR_hl_field(0, ItemTypeRepn_8, (MR_Integer) 4))));
  MR_Word TypeCtorSymName_16;
  MR_Word Args_17;
  MR_Word TypeTerm_19;
  MR_Box STATE_VARIABLE_U_31_31;
  MR_Word Var_32;
  MR_Box STATE_VARIABLE_U_37_37;
  MR_Box STATE_VARIABLE_U_39_39;
  MR_Box STATE_VARIABLE_U_45_45;
  void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
  void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

  func_0(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ":- type_representation(")), S_7, STATE_VARIABLE_U_0_28, &STATE_VARIABLE_U_31_31);
  parse_tree__parse_tree_out_info__maybe_unqualify_sym_name_3_p_0(Info_6, TypeCtorSymName0_10, &TypeCtorSymName_16);
  {
    Var_32 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
    MR_hl_field(0, Var_32, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_10[0]));
    MR_hl_field(0, Var_32, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_item_type_repn_5_p_0_1));
    MR_hl_field(0, Var_32, 2) = ((MR_Box) ((MR_Integer) 1));
    MR_hl_field(0, Var_32, 3) = ((MR_Box) (Context_14));
  }
  Args_17 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_1[0]), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_1[1]), Var_32, TypeParams_11);
  parse_tree__prog_util__construct_qualified_term_with_context_4_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0), TypeCtorSymName_16, Args_17, Context_14, &TypeTerm_19);
  parse_tree__parse_tree_out_term__mercury_format_term_nq_vs_7_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_tvar_type_0), TypeClassInfo_for_pt_output_100, TVarSet_13, (MR_Integer) 2, (MR_Integer) 0, TypeTerm_19, S_7, STATE_VARIABLE_U_31_31, &STATE_VARIABLE_U_37_37);
  func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  func_2(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ",")), S_7, STATE_VARIABLE_U_37_37, &STATE_VARIABLE_U_39_39);
  switch (MR_tag((MR_Word) RepnInfo_12)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));

        func_25(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_word_aligned_ptr")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_45_45);
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word EqvType_20 = ((MR_Word) ((MR_hl_field(1, RepnInfo_12, (MR_Integer) 0))));
        MR_Box STATE_VARIABLE_U_41_41;
        MR_Box STATE_VARIABLE_U_43_43;
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_19(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_eqv_to(")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_41_41);
        parse_tree__parse_tree_out_type__mercury_format_type_6_p_0(TypeClassInfo_for_pt_output_100, TVarSet_13, (MR_Integer) 2, EqvType_20, S_7, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_43_43);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_43_43, &STATE_VARIABLE_U_45_45);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word SuperTypeCtor_21 = ((MR_Word) ((MR_hl_field(2, RepnInfo_12, (MR_Integer) 0))));
        MR_Word SuperTypeCtorSymName_22;
        MR_Integer SuperTypeArity_23;
        MR_Box STATE_VARIABLE_U_47_47;
        MR_Box STATE_VARIABLE_U_48_48;
        MR_Box STATE_VARIABLE_U_50_50;
        MR_Box STATE_VARIABLE_U_51_51;
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_21(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " is_subtype_of(")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_47_47);
        SuperTypeCtorSymName_22 = ((MR_Word) ((MR_hl_field(0, SuperTypeCtor_21, (MR_Integer) 0))));
        SuperTypeArity_23 = ((MR_Integer) ((MR_hl_field(0, SuperTypeCtor_21, (MR_Integer) 1))));
        parse_tree__parse_tree_out_sym_name__mercury_format_sym_name_4_p_0(TypeClassInfo_for_pt_output_100, SuperTypeCtorSymName_22, S_7, STATE_VARIABLE_U_47_47, &STATE_VARIABLE_U_48_48);
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "/")), S_7, STATE_VARIABLE_U_48_48, &STATE_VARIABLE_U_50_50);
        func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 10))));
        func_23(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (SuperTypeArity_23)), S_7, STATE_VARIABLE_U_50_50, &STATE_VARIABLE_U_51_51);
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
        func_24(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_51_51, &STATE_VARIABLE_U_45_45);
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word DuRepn_24 = ((MR_Word) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 1))));
            MR_Word TypeRepnFor_25;

            TypeRepnFor_25 = parse_tree__parse_tree_out_info__get_type_repn_for_1_f_0(Info_6);
            switch (TypeRepnFor_25) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 1:
                {
                  MR_String I_26;
                  MR_Box STATE_VARIABLE_U_64_64;
                  MR_Box STATE_VARIABLE_U_65_65;
                  MR_Box STATE_VARIABLE_U_67_67;
                  MR_Box STATE_VARIABLE_U_69_69;
                  MR_Box STATE_VARIABLE_U_71_71;
                  MR_Box STATE_VARIABLE_U_72_72;
                  void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

                  I_26 = parse_tree__parse_tree_out_type_repn__indent_1_f_0((MR_Integer) 1);
                  func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_3(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_64_64);
                  func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_4(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_26)), S_7, STATE_VARIABLE_U_64_64, &STATE_VARIABLE_U_65_65);
                  func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_5(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "du_repn(")), S_7, STATE_VARIABLE_U_65_65, &STATE_VARIABLE_U_67_67);
                  parse_tree__parse_tree_out_type_repn__mercury_format_du_type_repn_7_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_25, (MR_Integer) 2, TVarSet_13, DuRepn_24, STATE_VARIABLE_U_67_67, &STATE_VARIABLE_U_69_69);
                  func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_6(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_69_69, &STATE_VARIABLE_U_71_71);
                  func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_7(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_26)), S_7, STATE_VARIABLE_U_71_71, &STATE_VARIABLE_U_72_72);
                  func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_8(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_72_72, &STATE_VARIABLE_U_45_45);
                }
                break;
              case (MR_Integer) 0:
                {
                  MR_Box STATE_VARIABLE_U_57_57;
                  MR_Box STATE_VARIABLE_U_59_59;
                  void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

                  func_9(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " du_repn(")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_57_57);
                  parse_tree__parse_tree_out_type_repn__mercury_format_du_type_repn_7_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_25, (MR_Integer) 2, TVarSet_13, DuRepn_24, STATE_VARIABLE_U_57_57, &STATE_VARIABLE_U_59_59);
                  func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_10(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_59_59, &STATE_VARIABLE_U_45_45);
                }
                break;
            }
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word MaybeCJCsRepn_27 = ((MR_Word) ((MR_hl_field(3, RepnInfo_12, (MR_Integer) 1))));
            MR_Word TypeRepnFor_99;

            TypeRepnFor_99 = parse_tree__parse_tree_out_info__get_type_repn_for_1_f_0(Info_6);
            switch (TypeRepnFor_99) {
              default: /*NOTREACHED*/ MR_assert(0);
              case (MR_Integer) 1:
                {
                  MR_Box STATE_VARIABLE_U_83_83;
                  MR_Box STATE_VARIABLE_U_84_84;
                  MR_Box STATE_VARIABLE_U_86_86;
                  MR_Box STATE_VARIABLE_U_88_88;
                  MR_Box STATE_VARIABLE_U_90_90;
                  MR_Box STATE_VARIABLE_U_91_91;
                  MR_String I_97;
                  void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
                  void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

                  I_97 = parse_tree__parse_tree_out_type_repn__indent_1_f_0((MR_Integer) 1);
                  func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_11(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_83_83);
                  func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_12(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_97)), S_7, STATE_VARIABLE_U_83_83, &STATE_VARIABLE_U_84_84);
                  func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_13(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "foreign_type_repn(\n")), S_7, STATE_VARIABLE_U_84_84, &STATE_VARIABLE_U_86_86);
                  parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_99, (MR_Integer) 2, MaybeCJCsRepn_27, STATE_VARIABLE_U_86_86, &STATE_VARIABLE_U_88_88);
                  func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_14(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_88_88, &STATE_VARIABLE_U_90_90);
                  func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_15(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) (I_97)), S_7, STATE_VARIABLE_U_90_90, &STATE_VARIABLE_U_91_91);
                  func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_16(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_91_91, &STATE_VARIABLE_U_45_45);
                }
                break;
              case (MR_Integer) 0:
                {
                  MR_Box STATE_VARIABLE_U_76_76;
                  MR_Box STATE_VARIABLE_U_78_78;
                  void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

                  func_17(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) " foreign_type_repn(")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_76_76);
                  parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_100, S_7, TypeRepnFor_99, (MR_Integer) 2, MaybeCJCsRepn_27, STATE_VARIABLE_U_76_76, &STATE_VARIABLE_U_78_78);
                  func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
                  func_18(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_78_78, &STATE_VARIABLE_U_45_45);
                }
                break;
            }
          }
          break;
      }
      break;
  }
  func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_100, (MR_Integer) 0)), (MR_Integer) 6))));
  func_26(((MR_Box) (TypeClassInfo_for_pt_output_100)), ((MR_Box) ((MR_String) ").\n")), S_7, STATE_VARIABLE_U_45_45, STATE_VARIABLE_U_29);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_type_repn_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_21,
  MR_Box S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word DuRepn_12,
  MR_Box STATE_VARIABLE_U_0_19,
  MR_Box * STATE_VARIABLE_U_20)
{
  switch (MR_tag((MR_Word) DuRepn_12)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Word DummyRepn_14 = (MR_Word) ((MR_Word) (DuRepn_12));
        MR_String FunctorName_22 = ((MR_String) ((MR_hl_field(0, DummyRepn_14, (MR_Integer) 0))));
        MR_Word MaybeCJCsRepnOrEnum_23 = ((MR_Word) ((MR_hl_field(0, DummyRepn_14, (MR_Integer) 1))));

        switch (TypeRepnFor_9) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word TypeClassInfo_for_writer_49;
              MR_String I_24;
              MR_Box STATE_VARIABLE_U_28_35;
              MR_Box STATE_VARIABLE_U_29_36;
              MR_Box STATE_VARIABLE_U_31_38;
              MR_Box STATE_VARIABLE_U_32_39;
              MR_Box STATE_VARIABLE_U_34_41;
              MR_Integer Var_42;
              MR_Box STATE_VARIABLE_U_36_43;
              MR_Box STATE_VARIABLE_U_39_46;
              MR_Box STATE_VARIABLE_U_40_47;
              void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

              I_24 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
              func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_0(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_0_19, &STATE_VARIABLE_U_28_35);
              func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_1(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_24)), S_8, STATE_VARIABLE_U_28_35, &STATE_VARIABLE_U_29_36);
              func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_2(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "direct_dummy(")), S_8, STATE_VARIABLE_U_29_36, &STATE_VARIABLE_U_31_38);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_49);
              mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_49, S_8, FunctorName_22, STATE_VARIABLE_U_31_38, &STATE_VARIABLE_U_32_39);
              func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_3(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), S_8, STATE_VARIABLE_U_32_39, &STATE_VARIABLE_U_34_41);
              Var_42 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_or_enum_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Var_42, MaybeCJCsRepnOrEnum_23, STATE_VARIABLE_U_34_41, &STATE_VARIABLE_U_36_43);
              func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_4(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_36_43, &STATE_VARIABLE_U_39_46);
              func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_5(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_24)), S_8, STATE_VARIABLE_U_39_46, &STATE_VARIABLE_U_40_47);
              func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_6(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_40_47, STATE_VARIABLE_U_20);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word TypeClassInfo_for_writer_51;
              MR_Box STATE_VARIABLE_U_18_26;
              MR_Box STATE_VARIABLE_U_19_27;
              MR_Box STATE_VARIABLE_U_21_29;
              MR_Integer Var_30;
              MR_Box STATE_VARIABLE_U_23_31;
              void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

              func_7(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "direct_dummy(")), S_8, STATE_VARIABLE_U_0_19, &STATE_VARIABLE_U_18_26);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_51);
              mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_51, S_8, FunctorName_22, STATE_VARIABLE_U_18_26, &STATE_VARIABLE_U_19_27);
              func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_8(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_19_27, &STATE_VARIABLE_U_21_29);
              Var_30 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_or_enum_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Var_30, MaybeCJCsRepnOrEnum_23, STATE_VARIABLE_U_21_29, &STATE_VARIABLE_U_23_31);
              func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_9(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_23_31, STATE_VARIABLE_U_20);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Word EnumRepn_15 = (MR_Word) (MR_body((MR_Word) (DuRepn_12), (MR_Integer) 1));

        parse_tree__parse_tree_out_type_repn__mercury_format_du_enum_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Indent_10, EnumRepn_15, STATE_VARIABLE_U_0_19, STATE_VARIABLE_U_20);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Word NotagRepn_16 = (MR_Word) (MR_body((MR_Word) (DuRepn_12), (MR_Integer) 2));
        MR_String FunctorName_53 = ((MR_String) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 0))));
        MR_Word ArgType_54 = ((MR_Word) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 1))));
        MR_Word MaybeCJCsRepn_55 = ((MR_Word) ((MR_hl_field(0, NotagRepn_16, (MR_Integer) 2))));

        switch (TypeRepnFor_9) {
          default: /*NOTREACHED*/ MR_assert(0);
          case (MR_Integer) 1:
            {
              MR_Word TypeClassInfo_for_writer_93;
              MR_String I_56;
              MR_String I1_57;
              MR_Integer Var_70;
              MR_Box STATE_VARIABLE_U_37_73;
              MR_Box STATE_VARIABLE_U_38_74;
              MR_Box STATE_VARIABLE_U_40_76;
              MR_Box STATE_VARIABLE_U_41_77;
              MR_Box STATE_VARIABLE_U_42_78;
              MR_Box STATE_VARIABLE_U_44_80;
              MR_Box STATE_VARIABLE_U_45_81;
              MR_Box STATE_VARIABLE_U_47_83;
              MR_Box STATE_VARIABLE_U_49_85;
              MR_Integer Var_86;
              MR_Box STATE_VARIABLE_U_51_87;
              MR_Box STATE_VARIABLE_U_54_90;
              MR_Box STATE_VARIABLE_U_55_91;
              void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

              I_56 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
              Var_70 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              I1_57 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_70);
              func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_10(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_0_19, &STATE_VARIABLE_U_37_73);
              func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_11(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_56)), S_8, STATE_VARIABLE_U_37_73, &STATE_VARIABLE_U_38_74);
              func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_12(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "notag(\n")), S_8, STATE_VARIABLE_U_38_74, &STATE_VARIABLE_U_40_76);
              func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_13(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I1_57)), S_8, STATE_VARIABLE_U_40_76, &STATE_VARIABLE_U_41_77);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_93);
              mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_93, S_8, FunctorName_53, STATE_VARIABLE_U_41_77, &STATE_VARIABLE_U_42_78);
              func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_14(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), S_8, STATE_VARIABLE_U_42_78, &STATE_VARIABLE_U_44_80);
              func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_15(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I1_57)), S_8, STATE_VARIABLE_U_44_80, &STATE_VARIABLE_U_45_81);
              parse_tree__parse_tree_out_type__mercury_format_type_6_p_0(TypeClassInfo_for_pt_output_21, TVarSet_11, (MR_Integer) 2, ArgType_54, S_8, STATE_VARIABLE_U_45_81, &STATE_VARIABLE_U_47_83);
              func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_16(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ",\n")), S_8, STATE_VARIABLE_U_47_83, &STATE_VARIABLE_U_49_85);
              Var_86 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
              parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Var_86, MaybeCJCsRepn_55, STATE_VARIABLE_U_49_85, &STATE_VARIABLE_U_51_87);
              func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_17(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_51_87, &STATE_VARIABLE_U_54_90);
              func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_18(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) (I_56)), S_8, STATE_VARIABLE_U_54_90, &STATE_VARIABLE_U_55_91);
              func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_19(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_55_91, STATE_VARIABLE_U_20);
            }
            break;
          case (MR_Integer) 0:
            {
              MR_Word TypeClassInfo_for_writer_95;
              MR_Box STATE_VARIABLE_U_22_59;
              MR_Box STATE_VARIABLE_U_23_60;
              MR_Box STATE_VARIABLE_U_25_62;
              MR_Box STATE_VARIABLE_U_27_64;
              MR_Box STATE_VARIABLE_U_29_66;
              MR_Box STATE_VARIABLE_U_31_68;
              void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
              void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

              func_20(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) "notag(")), S_8, STATE_VARIABLE_U_0_19, &STATE_VARIABLE_U_22_59);
              mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_21, (MR_Integer) 1, &TypeClassInfo_for_writer_95);
              mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_95, S_8, FunctorName_53, STATE_VARIABLE_U_22_59, &STATE_VARIABLE_U_23_60);
              func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_21(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_23_60, &STATE_VARIABLE_U_25_62);
              parse_tree__parse_tree_out_type__mercury_format_type_6_p_0(TypeClassInfo_for_pt_output_21, TVarSet_11, (MR_Integer) 2, ArgType_54, S_8, STATE_VARIABLE_U_25_62, &STATE_VARIABLE_U_27_64);
              func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_22(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_27_64, &STATE_VARIABLE_U_29_66);
              parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_55, STATE_VARIABLE_U_29_66, &STATE_VARIABLE_U_31_68);
              func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_21, (MR_Integer) 0)), (MR_Integer) 6))));
              func_23(((MR_Box) (TypeClassInfo_for_pt_output_21)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_31_68, STATE_VARIABLE_U_20);
            }
            break;
        }
      }
      break;
    case (MR_Integer) 3:
      switch (((MR_Integer) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 0))))) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 0:
          {
            MR_Word OnlyFunctorRepn_17 = ((MR_Word) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 1))));

            parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Indent_10, TVarSet_11, OnlyFunctorRepn_17, STATE_VARIABLE_U_0_19, STATE_VARIABLE_U_20);
          }
          break;
        case (MR_Integer) 1:
          {
            MR_Word MoreFunctorsRepn_18 = ((MR_Word) ((MR_hl_field(3, DuRepn_12, (MR_Integer) 1))));

            parse_tree__parse_tree_out_type_repn__mercury_format_du_more_functors_7_p_0(TypeClassInfo_for_pt_output_21, S_8, TypeRepnFor_9, Indent_10, TVarSet_11, MoreFunctorsRepn_18, STATE_VARIABLE_U_0_19, STATE_VARIABLE_U_20);
          }
          break;
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_more_functors_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 6)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_more_functors_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Box S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word MoreFunctorsRepn_12,
  MR_Box STATE_VARIABLE_U_0_22,
  MR_Box * STATE_VARIABLE_U_23)
{
  MR_Word Functor1_14 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 0))));
  MR_Word Functor2_15 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 1))));
  MR_Word OtherFunctors_16 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepn_17 = ((MR_Word) ((MR_hl_field(0, MoreFunctorsRepn_12, (MR_Integer) 3))));

  switch (TypeRepnFor_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Integer Indent1_20 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
        MR_String I_21;
        MR_Box STATE_VARIABLE_U_53_53;
        MR_Box STATE_VARIABLE_U_54_54;
        MR_Box STATE_VARIABLE_U_56_56;
        MR_Box STATE_VARIABLE_U_57_57;
        MR_Box STATE_VARIABLE_U_59_59;
        MR_Box STATE_VARIABLE_U_60_60;
        MR_Box STATE_VARIABLE_U_62_62;
        MR_Box STATE_VARIABLE_U_64_64;
        MR_Integer Var_65;
        MR_Box STATE_VARIABLE_U_68_68;
        MR_Box STATE_VARIABLE_U_69_69;
        MR_Box STATE_VARIABLE_U_71_71;
        MR_Box STATE_VARIABLE_U_72_72;
        MR_String NlI_85;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_0_22, &STATE_VARIABLE_U_53_53);
        func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_1(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_21)), S_8, STATE_VARIABLE_U_53_53, &STATE_VARIABLE_U_54_54);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "gen_du_more_functors(")), S_8, STATE_VARIABLE_U_54_54, &STATE_VARIABLE_U_56_56);
        parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, TVarSet_11, Functor1_14, S_8, STATE_VARIABLE_U_56_56, &STATE_VARIABLE_U_57_57);
        func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_3(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), S_8, STATE_VARIABLE_U_57_57, &STATE_VARIABLE_U_59_59);
        parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Indent1_20, TVarSet_11, Functor2_15, S_8, STATE_VARIABLE_U_59_59, &STATE_VARIABLE_U_60_60);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), S_8, STATE_VARIABLE_U_60_60, &STATE_VARIABLE_U_62_62);
        Var_65 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 2);
        NlI_85 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_20);
        if ((OtherFunctors_16 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          MR_Box STATE_VARIABLE_U_17_88;
          void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_5(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), S_8, STATE_VARIABLE_U_62_62, &STATE_VARIABLE_U_17_88);
          func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_6(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), S_8, STATE_VARIABLE_U_17_88, &STATE_VARIABLE_U_64_64);
        }
        else
        {
          MR_Word HeadX_86 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_16, (MR_Integer) 0))));
          MR_Word TailXs_87 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_16, (MR_Integer) 1))));
          MR_Box STATE_VARIABLE_U_20_90;
          MR_Box STATE_VARIABLE_U_22_92;
          MR_Box STATE_VARIABLE_U_23_93;
          MR_Box STATE_VARIABLE_U_24_94;
          void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_7(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), S_8, STATE_VARIABLE_U_62_62, &STATE_VARIABLE_U_20_90);
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), S_8, STATE_VARIABLE_U_20_90, &STATE_VARIABLE_U_22_92);
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_49_57_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, Var_65, TVarSet_11, TypeClassInfo_for_pt_output_74, HeadX_86, TailXs_87, S_8, STATE_VARIABLE_U_22_92, &STATE_VARIABLE_U_23_93);
          func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_9(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_85)), S_8, STATE_VARIABLE_U_23_93, &STATE_VARIABLE_U_24_94);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), S_8, STATE_VARIABLE_U_24_94, &STATE_VARIABLE_U_64_64);
        }
        func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_11(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",\n")), S_8, STATE_VARIABLE_U_64_64, &STATE_VARIABLE_U_68_68);
        parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_74, S_8, TypeRepnFor_9, Indent1_20, MaybeCJCsRepn_17, STATE_VARIABLE_U_68_68, &STATE_VARIABLE_U_69_69);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_69_69, &STATE_VARIABLE_U_71_71);
        func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_13(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_21)), S_8, STATE_VARIABLE_U_71_71, &STATE_VARIABLE_U_72_72);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_72_72, STATE_VARIABLE_U_23);
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Box STATE_VARIABLE_U_25_25;
        MR_Box STATE_VARIABLE_U_27_27;
        MR_Box STATE_VARIABLE_U_29_29;
        MR_Box STATE_VARIABLE_U_31_31;
        MR_Box STATE_VARIABLE_U_33_33;
        MR_Box STATE_VARIABLE_U_35_35;
        MR_Box STATE_VARIABLE_U_46_46;
        MR_Box STATE_VARIABLE_U_48_48;
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_15(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "gen_du_more_functors(")), S_8, STATE_VARIABLE_U_0_22, &STATE_VARIABLE_U_25_25);
        parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, TVarSet_11, Functor1_14, S_8, STATE_VARIABLE_U_25_25, &STATE_VARIABLE_U_27_27);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_27_27, &STATE_VARIABLE_U_29_29);
        parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(TypeClassInfo_for_pt_output_74, TypeRepnFor_9, (MR_Integer) 0, TVarSet_11, Functor2_15, S_8, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_31_31);
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_17(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_31_31, &STATE_VARIABLE_U_33_33);
        if ((OtherFunctors_16 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));

          func_18(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), S_8, STATE_VARIABLE_U_33_33, &STATE_VARIABLE_U_35_35);
        }
        else
        {
          MR_Box STATE_VARIABLE_U_37_37;
          MR_Word Var_38;
          MR_Box STATE_VARIABLE_U_41_41;
          void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_19(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), S_8, STATE_VARIABLE_U_33_33, &STATE_VARIABLE_U_37_37);
          {
            Var_38 = (MR_Word) MR_new_object(MR_Word, (7 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Var_38, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_9[0]));
            MR_hl_field(0, Var_38, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_du_more_functors_7_p_0_1));
            MR_hl_field(0, Var_38, 2) = ((MR_Box) ((MR_Integer) 4));
            MR_hl_field(0, Var_38, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_74));
            MR_hl_field(0, Var_38, 4) = ((MR_Box) (TypeRepnFor_9));
            MR_hl_field(0, Var_38, 5) = ((MR_Box) ((MR_Integer) 0));
            MR_hl_field(0, Var_38, 6) = ((MR_Box) (TVarSet_11));
          }
          func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 25))));
          func_20(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (&parse_tree__prog_item__parse_tree__prog_item__type_ctor_info_gen_du_functor_repn_0)), ((MR_Box) (Var_38)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (OtherFunctors_16)), S_8, STATE_VARIABLE_U_37_37, &STATE_VARIABLE_U_41_41);
          func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_21(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), S_8, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_35_35);
        }
        func_22 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_22(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_35_35, &STATE_VARIABLE_U_46_46);
        parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_74, S_8, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_17, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_48_48);
        func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_23(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_48_48, STATE_VARIABLE_U_23);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_49_57_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_Word Var_22,
  MR_Integer Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Box STATE_VARIABLE_U_16_16;

    // setup for model_det tailcalls optimized into a loop
    ;
    parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(Var_21, Var_22, Var_23, Var_24, X_8, S_10, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Box STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Box next_value_of_STATE_VARIABLE_U_0_14;

      func_0(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), S_10, STATE_VARIABLE_U_16_16, &STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_5(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_4(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type__mercury_format_type_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_constant_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_more_nonconstant_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_constant_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_97,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word TVarSet_10,
  MR_Word FunctorRepn_11,
  MR_Box S_12,
  MR_Box STATE_VARIABLE_U_0_22,
  MR_Box * STATE_VARIABLE_U_23)
{
  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      if (((MR_tag((MR_Word) FunctorRepn_11)) == (MR_Integer) 0))
      {
        MR_String FunctorName_14 = ((MR_String) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 0))));
        MR_Word ConstantRepns_15 = ((MR_Word) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 1))));
        MR_String I_16;
        MR_Integer Indent1_17;
        MR_Box STATE_VARIABLE_U_36_36;
        MR_Box STATE_VARIABLE_U_37_37;
        MR_Box STATE_VARIABLE_U_39_39;
        MR_Box STATE_VARIABLE_U_40_40;
        MR_Box STATE_VARIABLE_U_42_42;
        MR_Word Var_44;
        MR_Box STATE_VARIABLE_U_45_45;
        MR_Integer Var_46;
        MR_Box STATE_VARIABLE_U_49_49;
        MR_Box STATE_VARIABLE_U_50_50;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), S_12, STATE_VARIABLE_U_0_22, &STATE_VARIABLE_U_36_36);
        func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_1(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_16)), S_12, STATE_VARIABLE_U_36_36, &STATE_VARIABLE_U_37_37);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "constant_functor(")), S_12, STATE_VARIABLE_U_37_37, &STATE_VARIABLE_U_39_39);
        parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_14, S_12, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_40_40);
        func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_3(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), S_12, STATE_VARIABLE_U_40_40, &STATE_VARIABLE_U_42_42);
        Indent1_17 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        Var_46 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        {
          Var_44 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_44, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[2]));
          MR_hl_field(0, Var_44, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_1));
          MR_hl_field(0, Var_44, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_44, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_44, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_44, 5) = ((MR_Box) (Var_46));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, Indent1_17, Var_44, ConstantRepns_15, S_12, STATE_VARIABLE_U_42_42, &STATE_VARIABLE_U_45_45);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), S_12, STATE_VARIABLE_U_45_45, &STATE_VARIABLE_U_49_49);
        func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_5(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_16)), S_12, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_50_50);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_50_50, STATE_VARIABLE_U_23);
      }
      else
      {
        MR_Word ArgTypes_18 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 1))));
        MR_Word NonConstantRepns_19 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 2))));
        MR_Integer Indent2_20;
        MR_String NlI2_21;
        MR_Box STATE_VARIABLE_U_71_71;
        MR_Box STATE_VARIABLE_U_72_72;
        MR_Box STATE_VARIABLE_U_74_74;
        MR_Box STATE_VARIABLE_U_75_75;
        MR_Box STATE_VARIABLE_U_77_77;
        MR_Box STATE_VARIABLE_U_81_81;
        MR_Box STATE_VARIABLE_U_84_84;
        MR_Word Var_85;
        MR_Box STATE_VARIABLE_U_86_86;
        MR_Box STATE_VARIABLE_U_88_88;
        MR_Box STATE_VARIABLE_U_89_89;
        MR_String I_92;
        MR_Integer Indent1_93;
        MR_String FunctorName_96 = ((MR_String) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 0))));
        void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_92 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_7(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), S_12, STATE_VARIABLE_U_0_22, &STATE_VARIABLE_U_71_71);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_92)), S_12, STATE_VARIABLE_U_71_71, &STATE_VARIABLE_U_72_72);
        func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_9(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "nonconstant_functor(")), S_12, STATE_VARIABLE_U_72_72, &STATE_VARIABLE_U_74_74);
        parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_96, S_12, STATE_VARIABLE_U_74_74, &STATE_VARIABLE_U_75_75);
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), S_12, STATE_VARIABLE_U_75_75, &STATE_VARIABLE_U_77_77);
        Indent1_93 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        Indent2_20 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        NlI2_21 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent2_20);
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_49_52_95_95_91_55_93_95_48_6_p_0(TypeClassInfo_for_pt_output_97, NlI2_21, (MR_String) "", TVarSet_10, TypeClassInfo_for_pt_output_97, Indent1_93, ArgTypes_18, S_12, STATE_VARIABLE_U_77_77, &STATE_VARIABLE_U_81_81);
        func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_11(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ",")), S_12, STATE_VARIABLE_U_81_81, &STATE_VARIABLE_U_84_84);
        {
          Var_85 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_85, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[3]));
          MR_hl_field(0, Var_85, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_2));
          MR_hl_field(0, Var_85, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_85, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_85, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_85, 5) = ((MR_Box) (Indent2_20));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, Indent1_93, Var_85, NonConstantRepns_19, S_12, STATE_VARIABLE_U_84_84, &STATE_VARIABLE_U_86_86);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "\n")), S_12, STATE_VARIABLE_U_86_86, &STATE_VARIABLE_U_88_88);
        func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_13(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) (I_92)), S_12, STATE_VARIABLE_U_88_88, &STATE_VARIABLE_U_89_89);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_89_89, STATE_VARIABLE_U_23);
      }
      break;
    case (MR_Integer) 0:
      if (((MR_tag((MR_Word) FunctorRepn_11)) == (MR_Integer) 0))
      {
        MR_Box STATE_VARIABLE_U_25_25;
        MR_Box STATE_VARIABLE_U_26_26;
        MR_Box STATE_VARIABLE_U_28_28;
        MR_Word Var_30;
        MR_Box STATE_VARIABLE_U_31_31;
        MR_String FunctorName_128 = ((MR_String) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 0))));
        MR_Word ConstantRepns_129 = ((MR_Word) ((MR_hl_field(0, FunctorRepn_11, (MR_Integer) 1))));
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_15(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "constant_functor(")), S_12, STATE_VARIABLE_U_0_22, &STATE_VARIABLE_U_25_25);
        parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_128, S_12, STATE_VARIABLE_U_25_25, &STATE_VARIABLE_U_26_26);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_28_28);
        {
          Var_30 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[2]));
          MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_3));
          MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_30, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_30, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, (MR_Integer) 0, Var_30, ConstantRepns_129, S_12, STATE_VARIABLE_U_28_28, &STATE_VARIABLE_U_31_31);
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_17(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_31_31, STATE_VARIABLE_U_23);
      }
      else
      {
        MR_Box STATE_VARIABLE_U_54_54;
        MR_Box STATE_VARIABLE_U_55_55;
        MR_Box STATE_VARIABLE_U_57_57;
        MR_Word Var_58;
        MR_Box STATE_VARIABLE_U_60_60;
        MR_Box STATE_VARIABLE_U_63_63;
        MR_Word Var_65;
        MR_Box STATE_VARIABLE_U_66_66;
        MR_Word ArgTypes_130 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 1))));
        MR_Word NonConstantRepns_131 = ((MR_Word) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 2))));
        MR_String FunctorName_132 = ((MR_String) ((MR_hl_field(1, FunctorRepn_11, (MR_Integer) 0))));
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_18(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "nonconstant_functor(")), S_12, STATE_VARIABLE_U_0_22, &STATE_VARIABLE_U_54_54);
        parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(TypeClassInfo_for_pt_output_97, FunctorName_132, S_12, STATE_VARIABLE_U_54_54, &STATE_VARIABLE_U_55_55);
        func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_19(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ", [")), S_12, STATE_VARIABLE_U_55_55, &STATE_VARIABLE_U_57_57);
        {
          Var_58 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_58, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[1]));
          MR_hl_field(0, Var_58, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_4));
          MR_hl_field(0, Var_58, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_58, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_58, 4) = ((MR_Box) (TVarSet_10));
          MR_hl_field(0, Var_58, 5) = ((MR_Box) ((MR_Integer) 2));
        }
        parse_tree__parse_tree_output__add_list_6_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0), TypeClassInfo_for_pt_output_97, Var_58, (MR_String) ", ", ArgTypes_130, S_12, STATE_VARIABLE_U_57_57, &STATE_VARIABLE_U_60_60);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) "], ")), S_12, STATE_VARIABLE_U_60_60, &STATE_VARIABLE_U_63_63);
        {
          Var_65 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_65, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[3]));
          MR_hl_field(0, Var_65, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_gen_du_functor_repn_7_p_0_5));
          MR_hl_field(0, Var_65, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_65, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_97));
          MR_hl_field(0, Var_65, 4) = ((MR_Box) (TypeRepnFor_8));
          MR_hl_field(0, Var_65, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_97, TypeRepnFor_8, (MR_Integer) 0, Var_65, NonConstantRepns_131, S_12, STATE_VARIABLE_U_63_63, &STATE_VARIABLE_U_66_66);
        func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_97, (MR_Integer) 0)), (MR_Integer) 6))));
        func_21(((MR_Box) (TypeClassInfo_for_pt_output_97)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_66_66, STATE_VARIABLE_U_23);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_95_104_111_53_49_52_95_95_91_55_93_95_48_6_p_0(
  MR_Word Var_28,
  MR_String Var_29,
  MR_String Var_30,
  MR_Word Var_31,
  MR_Word TypeClassInfo_for_pt_output_26,
  MR_Integer Indent_7,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16)
{
  MR_String NlI_12;

  NlI_12 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_7);
  if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_Box STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    func_0(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_17_17);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[]")), S_10, STATE_VARIABLE_U_17_17, STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word HeadX_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
    MR_Word TailXs_14 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
    MR_Box STATE_VARIABLE_U_20_20;
    MR_Box STATE_VARIABLE_U_22_22;
    MR_Box STATE_VARIABLE_U_23_23;
    MR_Box STATE_VARIABLE_U_24_24;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    func_2(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_20_20);
    func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_3(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "[")), S_10, STATE_VARIABLE_U_20_20, &STATE_VARIABLE_U_22_22);
    parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_48_95_95_91_54_93_95_48_6_p_0(Var_28, Var_29, Var_30, Var_31, TypeClassInfo_for_pt_output_26, HeadX_13, TailXs_14, S_10, STATE_VARIABLE_U_22_22, &STATE_VARIABLE_U_23_23);
    func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_4(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) (NlI_12)), S_10, STATE_VARIABLE_U_23_23, &STATE_VARIABLE_U_24_24);
    func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_26, (MR_Integer) 0)), (MR_Integer) 6))));
    func_5(((MR_Box) (TypeClassInfo_for_pt_output_26)), ((MR_Box) ((MR_String) "]")), S_10, STATE_VARIABLE_U_24_24, STATE_VARIABLE_U_16);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(
  MR_Word TypeClassInfo_for_pt_output_10,
  MR_String FunctorName_5,
  MR_Box S_6,
  MR_Box STATE_VARIABLE_U_0_8,
  MR_Box * STATE_VARIABLE_U_9)
{
  MR_Word TypeClassInfo_for_writer_11;

  mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_10, (MR_Integer) 1, &TypeClassInfo_for_writer_11);
  mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_11, S_6, FunctorName_5, STATE_VARIABLE_U_0_8, STATE_VARIABLE_U_9);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0_3(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type__mercury_format_type_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_only_nonconstant_repn_6_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 4)))), ((MR_Integer) ((MR_hl_field(0, closure, (MR_Integer) 5)))), ((MR_Word) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_71,
  MR_Box S_8,
  MR_Word TypeRepnFor_9,
  MR_Integer Indent_10,
  MR_Word TVarSet_11,
  MR_Word OnlyFunctorRepn_12,
  MR_Box STATE_VARIABLE_U_0_23,
  MR_Box * STATE_VARIABLE_U_24)
{
  MR_String FunctorName_14 = ((MR_String) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 0))));
  MR_Word ArgTypes_15 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 1))));
  MR_Word CRepns_16 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepn_17 = ((MR_Word) ((MR_hl_field(0, OnlyFunctorRepn_12, (MR_Integer) 3))));

  switch (TypeRepnFor_9) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Word TypeClassInfo_for_writer_92;
        MR_Integer Indent1_18 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 1);
        MR_Integer Indent2_19 = (MR_Integer) ((MR_Unsigned) Indent_10 + (MR_Unsigned) 2);
        MR_String I_20;
        MR_String I1_21;
        MR_String NlI2_22;
        MR_Box STATE_VARIABLE_U_49_49;
        MR_Box STATE_VARIABLE_U_50_50;
        MR_Box STATE_VARIABLE_U_52_52;
        MR_Box STATE_VARIABLE_U_53_53;
        MR_Box STATE_VARIABLE_U_54_54;
        MR_Box STATE_VARIABLE_U_56_56;
        MR_Box STATE_VARIABLE_U_58_58;
        MR_Box STATE_VARIABLE_U_61_61;
        MR_Word Var_62;
        MR_Box STATE_VARIABLE_U_63_63;
        MR_Box STATE_VARIABLE_U_65_65;
        MR_Box STATE_VARIABLE_U_66_66;
        MR_Box STATE_VARIABLE_U_68_68;
        MR_Box STATE_VARIABLE_U_69_69;
        MR_String NlI_94;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_20 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_10);
        I1_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent1_18);
        NlI2_22 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent2_19);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_0_23, &STATE_VARIABLE_U_49_49);
        func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_1(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I_20)), S_8, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_50_50);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "gen_du_only_functor(\n")), S_8, STATE_VARIABLE_U_50_50, &STATE_VARIABLE_U_52_52);
        func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_3(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I1_21)), S_8, STATE_VARIABLE_U_52_52, &STATE_VARIABLE_U_53_53);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_71, (MR_Integer) 1, &TypeClassInfo_for_writer_92);
        mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_92, S_8, FunctorName_14, STATE_VARIABLE_U_53_53, &STATE_VARIABLE_U_54_54);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",")), S_8, STATE_VARIABLE_U_54_54, &STATE_VARIABLE_U_56_56);
        NlI_94 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        if ((ArgTypes_15 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          MR_Box STATE_VARIABLE_U_17_97;
          void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_5(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), S_8, STATE_VARIABLE_U_56_56, &STATE_VARIABLE_U_17_97);
          func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_6(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "[]")), S_8, STATE_VARIABLE_U_17_97, &STATE_VARIABLE_U_58_58);
        }
        else
        {
          MR_Word HeadX_95 = ((MR_Word) ((MR_hl_field(1, ArgTypes_15, (MR_Integer) 0))));
          MR_Word TailXs_96 = ((MR_Word) ((MR_hl_field(1, ArgTypes_15, (MR_Integer) 1))));
          MR_Box STATE_VARIABLE_U_20_99;
          MR_Box STATE_VARIABLE_U_22_101;
          MR_Box STATE_VARIABLE_U_23_102;
          MR_Box STATE_VARIABLE_U_24_103;
          void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_7(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), S_8, STATE_VARIABLE_U_56_56, &STATE_VARIABLE_U_20_99);
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "[")), S_8, STATE_VARIABLE_U_20_99, &STATE_VARIABLE_U_22_101);
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_48_95_95_91_54_93_95_48_6_p_0(TypeClassInfo_for_pt_output_71, NlI2_22, (MR_String) "", TVarSet_11, TypeClassInfo_for_pt_output_71, HeadX_95, TailXs_96, S_8, STATE_VARIABLE_U_22_101, &STATE_VARIABLE_U_23_102);
          func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_9(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (NlI_94)), S_8, STATE_VARIABLE_U_23_102, &STATE_VARIABLE_U_24_103);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "]")), S_8, STATE_VARIABLE_U_24_103, &STATE_VARIABLE_U_58_58);
        }
        func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_11(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",")), S_8, STATE_VARIABLE_U_58_58, &STATE_VARIABLE_U_61_61);
        {
          Var_62 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_62, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[0]));
          MR_hl_field(0, Var_62, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0_1));
          MR_hl_field(0, Var_62, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_62, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_62, 4) = ((MR_Box) (TypeRepnFor_9));
          MR_hl_field(0, Var_62, 5) = ((MR_Box) (Indent2_19));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, Indent1_18, Var_62, CRepns_16, S_8, STATE_VARIABLE_U_61_61, &STATE_VARIABLE_U_63_63);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ",\n")), S_8, STATE_VARIABLE_U_63_63, &STATE_VARIABLE_U_65_65);
        parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_71, S_8, TypeRepnFor_9, Indent1_18, MaybeCJCsRepn_17, STATE_VARIABLE_U_65_65, &STATE_VARIABLE_U_66_66);
        func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_13(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "\n")), S_8, STATE_VARIABLE_U_66_66, &STATE_VARIABLE_U_68_68);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (I_20)), S_8, STATE_VARIABLE_U_68_68, &STATE_VARIABLE_U_69_69);
        func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_15(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_69_69, STATE_VARIABLE_U_24);
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word TypeClassInfo_for_writer_106;
        MR_Box STATE_VARIABLE_U_26_26;
        MR_Box STATE_VARIABLE_U_27_27;
        MR_Box STATE_VARIABLE_U_29_29;
        MR_Word Var_30;
        MR_Box STATE_VARIABLE_U_32_32;
        MR_Box STATE_VARIABLE_U_35_35;
        MR_Word Var_37;
        MR_Box STATE_VARIABLE_U_38_38;
        MR_Box STATE_VARIABLE_U_41_41;
        MR_Box STATE_VARIABLE_U_43_43;
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_16(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "gen_du_only_functor(")), S_8, STATE_VARIABLE_U_0_23, &STATE_VARIABLE_U_26_26);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_71, (MR_Integer) 1, &TypeClassInfo_for_writer_106);
        mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_106, S_8, FunctorName_14, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_17(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ", [")), S_8, STATE_VARIABLE_U_27_27, &STATE_VARIABLE_U_29_29);
        {
          Var_30 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[1]));
          MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0_2));
          MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_30, 4) = ((MR_Box) (TVarSet_11));
          MR_hl_field(0, Var_30, 5) = ((MR_Box) ((MR_Integer) 2));
        }
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 25))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_mer_type_0)), ((MR_Box) (Var_30)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (ArgTypes_15)), S_8, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_32_32);
        func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_19(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) "],")), S_8, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_35_35);
        {
          Var_37 = (MR_Word) MR_new_object(MR_Word, (6 * sizeof(MR_Word)), NULL, NULL);
          MR_hl_field(0, Var_37, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_8[0]));
          MR_hl_field(0, Var_37, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_du_only_functor_7_p_0_3));
          MR_hl_field(0, Var_37, 2) = ((MR_Box) ((MR_Integer) 3));
          MR_hl_field(0, Var_37, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_71));
          MR_hl_field(0, Var_37, 4) = ((MR_Box) (TypeRepnFor_9));
          MR_hl_field(0, Var_37, 5) = ((MR_Box) ((MR_Integer) 0));
        }
        parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(TypeClassInfo_for_pt_output_71, TypeRepnFor_9, (MR_Integer) 0, Var_37, CRepns_16, S_8, STATE_VARIABLE_U_35_35, &STATE_VARIABLE_U_38_38);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ", ")), S_8, STATE_VARIABLE_U_38_38, &STATE_VARIABLE_U_41_41);
        parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(TypeClassInfo_for_pt_output_71, S_8, TypeRepnFor_9, (MR_Integer) 0, MaybeCJCsRepn_17, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_43_43);
        func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_71, (MR_Integer) 0)), (MR_Integer) 6))));
        func_21(((MR_Box) (TypeClassInfo_for_pt_output_71)), ((MR_Box) ((MR_String) ")")), S_8, STATE_VARIABLE_U_43_43, STATE_VARIABLE_U_24);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_48_95_95_91_54_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word Var_24,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_Word X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Box STATE_VARIABLE_U_16_16;
    MR_Box STATE_VARIABLE_U_16_25;
    MR_Box STATE_VARIABLE_U_18_27;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    // setup for model_det tailcalls optimized into a loop
    ;
    func_0(((MR_Box) (Var_21)), ((MR_Box) (Var_22)), S_10, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_25);
    parse_tree__parse_tree_out_type__mercury_format_type_6_p_0(Var_21, Var_24, (MR_Integer) 2, X_8, S_10, STATE_VARIABLE_U_16_25, &STATE_VARIABLE_U_18_27);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (Var_21)), ((MR_Box) (Var_23)), S_10, STATE_VARIABLE_U_18_27, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_Word HeadX_12 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Box STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_Word next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Box next_value_of_STATE_VARIABLE_U_0_14;

      func_2(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), S_10, STATE_VARIABLE_U_16_16, &STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_99_95_114_101_112_110_115_95_95_91_49_93_95_48_7_p_0(
  MR_Word TypeClassInfo_for_pt_output_65,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word WriteX_10,
  MR_Word CRepns_11,
  MR_Box S_12,
  MR_Box STATE_VARIABLE_U_0_21,
  MR_Box * STATE_VARIABLE_U_22)
{
  MR_String NlI_14;

  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      NlI_14 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent_9);
      break;
    case (MR_Integer) 0:
      NlI_14 = (MR_String) " ";
      break;
  }
  switch (MR_tag((MR_Word) CRepns_11)) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 0:
      {
        MR_Box X1_15 = (MR_hl_field(0, CRepns_11, (MR_Integer) 0));
        MR_Box STATE_VARIABLE_U_23_23;
        MR_Box STATE_VARIABLE_U_25_25;
        MR_Box STATE_VARIABLE_U_26_26;
        MR_Box STATE_VARIABLE_U_27_27;
        void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_22(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) (NlI_14)), S_12, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_23_23);
        func_23 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_23(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) "c_repns_same(")), S_12, STATE_VARIABLE_U_23_23, &STATE_VARIABLE_U_25_25);
        func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_24(((MR_Box) (WriteX_10)), X1_15, S_12, STATE_VARIABLE_U_25_25, &STATE_VARIABLE_U_26_26);
        func_25 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_25(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) (NlI_14)), S_12, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_27_27, STATE_VARIABLE_U_22);
      }
      break;
    case (MR_Integer) 1:
      {
        MR_Box X2_16 = (MR_hl_field(1, CRepns_11, (MR_Integer) 1));
        MR_Box STATE_VARIABLE_U_30_30;
        MR_Box STATE_VARIABLE_U_32_32;
        MR_Box STATE_VARIABLE_U_33_33;
        MR_Box STATE_VARIABLE_U_35_35;
        MR_Box STATE_VARIABLE_U_36_36;
        MR_Box STATE_VARIABLE_U_37_37;
        MR_Box X1_62 = (MR_hl_field(1, CRepns_11, (MR_Integer) 0));
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_0(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) (NlI_14)), S_12, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_30_30);
        func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_1(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) "c_repns_64_32(")), S_12, STATE_VARIABLE_U_30_30, &STATE_VARIABLE_U_32_32);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_2(((MR_Box) (WriteX_10)), X1_62, S_12, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_33_33);
        func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_3(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_33_33, &STATE_VARIABLE_U_35_35);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_4(((MR_Box) (WriteX_10)), X2_16, S_12, STATE_VARIABLE_U_35_35, &STATE_VARIABLE_U_36_36);
        func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_5(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) (NlI_14)), S_12, STATE_VARIABLE_U_36_36, &STATE_VARIABLE_U_37_37);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_37_37, STATE_VARIABLE_U_22);
      }
      break;
    case (MR_Integer) 2:
      {
        MR_Box X3_17 = (MR_hl_field(2, CRepns_11, (MR_Integer) 2));
        MR_Box X4_18 = (MR_hl_field(2, CRepns_11, (MR_Integer) 3));
        MR_Box X5_19 = (MR_hl_field(2, CRepns_11, (MR_Integer) 4));
        MR_Box X6_20 = (MR_hl_field(2, CRepns_11, (MR_Integer) 5));
        MR_Box STATE_VARIABLE_U_40_40;
        MR_Box STATE_VARIABLE_U_42_42;
        MR_Box STATE_VARIABLE_U_43_43;
        MR_Box STATE_VARIABLE_U_45_45;
        MR_Box STATE_VARIABLE_U_46_46;
        MR_Box STATE_VARIABLE_U_48_48;
        MR_Box STATE_VARIABLE_U_49_49;
        MR_Box STATE_VARIABLE_U_51_51;
        MR_Box STATE_VARIABLE_U_52_52;
        MR_Box STATE_VARIABLE_U_54_54;
        MR_Box STATE_VARIABLE_U_55_55;
        MR_Box STATE_VARIABLE_U_57_57;
        MR_Box STATE_VARIABLE_U_58_58;
        MR_Box STATE_VARIABLE_U_59_59;
        MR_Box X1_63 = (MR_hl_field(2, CRepns_11, (MR_Integer) 0));
        MR_Box X2_64 = (MR_hl_field(2, CRepns_11, (MR_Integer) 1));
        void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_7(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) (NlI_14)), S_12, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_40_40);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) "c_repns_all(")), S_12, STATE_VARIABLE_U_40_40, &STATE_VARIABLE_U_42_42);
        func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_9(((MR_Box) (WriteX_10)), X1_63, S_12, STATE_VARIABLE_U_42_42, &STATE_VARIABLE_U_43_43);
        func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_10(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_43_43, &STATE_VARIABLE_U_45_45);
        func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_11(((MR_Box) (WriteX_10)), X2_64, S_12, STATE_VARIABLE_U_45_45, &STATE_VARIABLE_U_46_46);
        func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_12(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_48_48);
        func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_13(((MR_Box) (WriteX_10)), X3_17, S_12, STATE_VARIABLE_U_48_48, &STATE_VARIABLE_U_49_49);
        func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_14(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_51_51);
        func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_15(((MR_Box) (WriteX_10)), X4_18, S_12, STATE_VARIABLE_U_51_51, &STATE_VARIABLE_U_52_52);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_52_52, &STATE_VARIABLE_U_54_54);
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_17(((MR_Box) (WriteX_10)), X5_19, S_12, STATE_VARIABLE_U_54_54, &STATE_VARIABLE_U_55_55);
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ", ")), S_12, STATE_VARIABLE_U_55_55, &STATE_VARIABLE_U_57_57);
        func_19 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, WriteX_10, (MR_Integer) 1))));
        func_19(((MR_Box) (WriteX_10)), X6_20, S_12, STATE_VARIABLE_U_57_57, &STATE_VARIABLE_U_58_58);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) (NlI_14)), S_12, STATE_VARIABLE_U_58_58, &STATE_VARIABLE_U_59_59);
        func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_65, (MR_Integer) 0)), (MR_Integer) 6))));
        func_21(((MR_Box) (TypeClassInfo_for_pt_output_65)), ((MR_Box) ((MR_String) ")")), S_12, STATE_VARIABLE_U_59_59, STATE_VARIABLE_U_22);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepn_10,
  MR_Box STATE_VARIABLE_U_0_17,
  MR_Box * STATE_VARIABLE_U_18)
{
  MR_bool succeeded;
  MR_Word MaybeRepnC_12 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 0))));
  MR_Word MaybeRepnJava_13 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 1))));
  MR_Word MaybeRepnCsharp_14 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepn_10, (MR_Integer) 2))));

  succeeded = (MaybeRepnC_12 == (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = (MaybeRepnJava_13 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
      succeeded = (MaybeRepnCsharp_14 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I_15;
          MR_Box STATE_VARIABLE_U_21_21;
          void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          I_15 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_0(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_15)), S_7, STATE_VARIABLE_U_0_17, &STATE_VARIABLE_U_21_21);
          func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_1(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "no_c_j_cs")), S_7, STATE_VARIABLE_U_21_21, STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));

          func_2(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " no_c_j_cs")), S_7, STATE_VARIABLE_U_0_17, STATE_VARIABLE_U_18);
        }
        break;
    }
  else
  {
    MR_Integer Indent1_16 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_Box STATE_VARIABLE_U_36_36;
          MR_Box STATE_VARIABLE_U_38_38;
          MR_Box STATE_VARIABLE_U_39_39;
          MR_Box STATE_VARIABLE_U_41_41;
          MR_Box STATE_VARIABLE_U_42_42;
          MR_Box STATE_VARIABLE_U_44_44;
          MR_Box STATE_VARIABLE_U_45_45;
          MR_Box STATE_VARIABLE_U_47_47;
          MR_Box STATE_VARIABLE_U_48_48;
          MR_String I_51;
          void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          I_51 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_3(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_51)), S_7, STATE_VARIABLE_U_0_17, &STATE_VARIABLE_U_36_36);
          func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_4(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "c_j_cs(\n")), S_7, STATE_VARIABLE_U_36_36, &STATE_VARIABLE_U_38_38);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnC_12, STATE_VARIABLE_U_38_38, &STATE_VARIABLE_U_39_39);
          func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_5(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), S_7, STATE_VARIABLE_U_39_39, &STATE_VARIABLE_U_41_41);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnJava_13, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_42_42);
          func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_6(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), S_7, STATE_VARIABLE_U_42_42, &STATE_VARIABLE_U_44_44);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnCsharp_14, STATE_VARIABLE_U_44_44, &STATE_VARIABLE_U_45_45);
          func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_7(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_45_45, &STATE_VARIABLE_U_47_47);
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_51)), S_7, STATE_VARIABLE_U_47_47, &STATE_VARIABLE_U_48_48);
          func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_9(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_48_48, STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          MR_Box STATE_VARIABLE_U_26_26;
          MR_Box STATE_VARIABLE_U_27_27;
          MR_Box STATE_VARIABLE_U_29_29;
          MR_Box STATE_VARIABLE_U_30_30;
          MR_Box STATE_VARIABLE_U_32_32;
          MR_Box STATE_VARIABLE_U_33_33;
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_10(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " c_j_cs(")), S_7, STATE_VARIABLE_U_0_17, &STATE_VARIABLE_U_26_26);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnC_12, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
          func_11 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_11(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_27_27, &STATE_VARIABLE_U_29_29);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnJava_13, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_30_30);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_30_30, &STATE_VARIABLE_U_32_32);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_16, MaybeRepnCsharp_14, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_33_33);
          func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_13(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_33_33, STATE_VARIABLE_U_18);
        }
        break;
    }
  }
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv3_Str_4;

  conv3_Str_4 = parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv3_Str_4));
  return wrapper_arg_2;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_foreign_type_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_18,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepn_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15)
{
  if ((MaybeTypeRepn_10 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_String I_12;
    MR_Box STATE_VARIABLE_U_16_16;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_12 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_12 = (MR_String) "";
        break;
    }
    func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_0(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (I_12)), S_7, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_16_16);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) ((MR_String) "no_foreign")), S_7, STATE_VARIABLE_U_16_16, STATE_VARIABLE_U_15);
  }
  else
  {
    MR_Word TypeRepn_13 = ((MR_Word) ((MR_hl_field(1, MaybeTypeRepn_10, (MR_Integer) 0))));
    MR_String ForeignTypeName_19 = ((MR_String) ((MR_hl_field(0, TypeRepn_13, (MR_Integer) 0))));
    MR_Word ForeignTypeAssertions_20 = ((MR_Word) ((MR_hl_field(0, TypeRepn_13, (MR_Integer) 1))));
    MR_String I_21;
    MR_Word Assertions_22;
    MR_Word AssertionsList_23;
    MR_String InitStr_24;
    MR_Word AssertionStrs_25;
    MR_String AssertionsStr_26;
    MR_String FinalStr_27;
    MR_Box STATE_VARIABLE_U_30_29;
    MR_String Var_37;
    MR_String Var_39;
    void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_21 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_21 = (MR_String) "";
        break;
    }
    Assertions_22 = (MR_Word) (ForeignTypeAssertions_20);
    mercury__set__to_sorted_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), Assertions_22, &AssertionsList_23);
    Var_37 = mercury__string__f_43_43_2_f_0(ForeignTypeName_19, (MR_String) "\",");
    Var_39 = mercury__string__f_43_43_2_f_0((MR_String) "foreign_type(\"", Var_37);
    InitStr_24 = mercury__string__f_43_43_2_f_0(I_21, Var_39);
    func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_2(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (InitStr_24)), S_7, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_30_29);
    AssertionStrs_25 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_7[1]), AssertionsList_23);
    AssertionsStr_26 = mercury__string__join_list_2_f_0((MR_String) ", ", AssertionStrs_25);
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_String I1_28;
          MR_Integer Var_32 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
          MR_String Var_44;
          MR_String Var_46;
          MR_String Var_47;
          MR_String Var_49;
          MR_String Var_50;

          I1_28 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_32);
          Var_44 = mercury__string__f_43_43_2_f_0(I_21, (MR_String) ")");
          Var_46 = mercury__string__f_43_43_2_f_0((MR_String) "]\n", Var_44);
          Var_47 = mercury__string__f_43_43_2_f_0(AssertionsStr_26, Var_46);
          Var_49 = mercury__string__f_43_43_2_f_0((MR_String) "[", Var_47);
          Var_50 = mercury__string__f_43_43_2_f_0(I1_28, Var_49);
          FinalStr_27 = mercury__string__f_43_43_2_f_0((MR_String) "\n", Var_50);
        }
        break;
      case (MR_Integer) 0:
        {
          MR_String Var_41;

          Var_41 = mercury__string__f_43_43_2_f_0(AssertionsStr_26, (MR_String) "])");
          FinalStr_27 = mercury__string__f_43_43_2_f_0((MR_String) " [", Var_41);
        }
        break;
    }
    func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_18, (MR_Integer) 0)), (MR_Integer) 6))));
    func_4(((MR_Box) (TypeClassInfo_for_pt_output_18)), ((MR_Box) (FinalStr_27)), S_7, STATE_VARIABLE_U_30_29, STATE_VARIABLE_U_15);
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_enum_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_String) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_du_enum_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_74,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word EnumRepn_10,
  MR_Box STATE_VARIABLE_U_0_21,
  MR_Box * STATE_VARIABLE_U_22)
{
  MR_String Functor1_12 = ((MR_String) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 0))));
  MR_String Functor2_13 = ((MR_String) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 1))));
  MR_Word OtherFunctors_14 = ((MR_Word) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 2))));
  MR_Word MaybeCJCsRepnOrEnum_15 = ((MR_Word) ((MR_hl_field(0, EnumRepn_10, (MR_Integer) 3))));

  switch (TypeRepnFor_8) {
    default: /*NOTREACHED*/ MR_assert(0);
    case (MR_Integer) 1:
      {
        MR_Word TypeClassInfo_for_writer_87;
        MR_Word TypeClassInfo_for_writer_91;
        MR_Integer Indent1_18 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
        MR_String I_19;
        MR_String NlI1_20;
        MR_Box STATE_VARIABLE_U_49_49;
        MR_Box STATE_VARIABLE_U_50_50;
        MR_Box STATE_VARIABLE_U_52_52;
        MR_Box STATE_VARIABLE_U_54_54;
        MR_Box STATE_VARIABLE_U_56_56;
        MR_Box STATE_VARIABLE_U_58_58;
        MR_Box STATE_VARIABLE_U_60_60;
        MR_Box STATE_VARIABLE_U_62_62;
        MR_String Var_63;
        MR_Integer Var_64;
        MR_Box STATE_VARIABLE_U_68_68;
        MR_Box STATE_VARIABLE_U_69_69;
        MR_Box STATE_VARIABLE_U_71_71;
        MR_Box STATE_VARIABLE_U_72_72;
        MR_Box STATE_VARIABLE_U_14_85;
        MR_Box STATE_VARIABLE_U_15_86;
        MR_Box STATE_VARIABLE_U_14_89;
        MR_Box STATE_VARIABLE_U_15_90;
        MR_String NlI_93;
        void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_15)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_17)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_18)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        I_19 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        NlI1_20 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_0(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_49_49);
        func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_1(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_19)), S_7, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_50_50);
        func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_2(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "enum(")), S_7, STATE_VARIABLE_U_50_50, &STATE_VARIABLE_U_52_52);
        func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_3(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI1_20)), S_7, STATE_VARIABLE_U_52_52, &STATE_VARIABLE_U_14_85);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_87);
        mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_87, S_7, Functor1_12, STATE_VARIABLE_U_14_85, &STATE_VARIABLE_U_15_86);
        func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_4(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "")), S_7, STATE_VARIABLE_U_15_86, &STATE_VARIABLE_U_54_54);
        func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_5(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), S_7, STATE_VARIABLE_U_54_54, &STATE_VARIABLE_U_56_56);
        func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_6(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI1_20)), S_7, STATE_VARIABLE_U_56_56, &STATE_VARIABLE_U_14_89);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_91);
        mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_91, S_7, Functor2_13, STATE_VARIABLE_U_14_89, &STATE_VARIABLE_U_15_90);
        func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_7(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "")), S_7, STATE_VARIABLE_U_15_90, &STATE_VARIABLE_U_58_58);
        func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_8(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",")), S_7, STATE_VARIABLE_U_58_58, &STATE_VARIABLE_U_60_60);
        Var_64 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
        Var_63 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_64);
        NlI_93 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Indent1_18);
        if ((OtherFunctors_14 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          MR_Box STATE_VARIABLE_U_17_96;
          void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_9(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), S_7, STATE_VARIABLE_U_60_60, &STATE_VARIABLE_U_17_96);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), S_7, STATE_VARIABLE_U_17_96, &STATE_VARIABLE_U_62_62);
        }
        else
        {
          MR_String HeadX_94 = ((MR_String) ((MR_hl_field(1, OtherFunctors_14, (MR_Integer) 0))));
          MR_Word TailXs_95 = ((MR_Word) ((MR_hl_field(1, OtherFunctors_14, (MR_Integer) 1))));
          MR_Box STATE_VARIABLE_U_20_98;
          MR_Box STATE_VARIABLE_U_22_100;
          MR_Box STATE_VARIABLE_U_23_101;
          MR_Box STATE_VARIABLE_U_24_102;
          void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_11(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), S_7, STATE_VARIABLE_U_60_60, &STATE_VARIABLE_U_20_98);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), S_7, STATE_VARIABLE_U_20_98, &STATE_VARIABLE_U_22_100);
          parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_51_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_74, Var_63, (MR_String) "", TypeClassInfo_for_pt_output_74, HeadX_94, TailXs_95, S_7, STATE_VARIABLE_U_22_100, &STATE_VARIABLE_U_23_101);
          func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_13(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (NlI_93)), S_7, STATE_VARIABLE_U_23_101, &STATE_VARIABLE_U_24_102);
          func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_14(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), S_7, STATE_VARIABLE_U_24_102, &STATE_VARIABLE_U_62_62);
        }
        func_15 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_15(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ",\n")), S_7, STATE_VARIABLE_U_62_62, &STATE_VARIABLE_U_68_68);
        parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_or_enum_6_p_0(TypeClassInfo_for_pt_output_74, S_7, TypeRepnFor_8, Indent1_18, MaybeCJCsRepnOrEnum_15, STATE_VARIABLE_U_68_68, &STATE_VARIABLE_U_69_69);
        func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_16(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_69_69, &STATE_VARIABLE_U_71_71);
        func_17 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_17(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (I_19)), S_7, STATE_VARIABLE_U_71_71, &STATE_VARIABLE_U_72_72);
        func_18 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_18(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_72_72, STATE_VARIABLE_U_22);
      }
      break;
    case (MR_Integer) 0:
      {
        MR_Word TypeClassInfo_for_writer_105;
        MR_Word TypeClassInfo_for_writer_107;
        MR_Box STATE_VARIABLE_U_24_24;
        MR_Box STATE_VARIABLE_U_25_25;
        MR_Box STATE_VARIABLE_U_27_27;
        MR_Box STATE_VARIABLE_U_28_28;
        MR_Box STATE_VARIABLE_U_30_30;
        MR_Box STATE_VARIABLE_U_32_32;
        MR_Box STATE_VARIABLE_U_42_42;
        MR_Box STATE_VARIABLE_U_44_44;
        void MR_CALL (* func_19)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        void MR_CALL (* func_20)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_21)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_26)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
        void MR_CALL (* func_27)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

        func_19(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "enum(")), S_7, STATE_VARIABLE_U_0_21, &STATE_VARIABLE_U_24_24);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_105);
        mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_105, S_7, Functor1_12, STATE_VARIABLE_U_24_24, &STATE_VARIABLE_U_25_25);
        func_20 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_20(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_25_25, &STATE_VARIABLE_U_27_27);
        mercury__private_builtin__superclass_from_typeclass_info_3_p_0(TypeClassInfo_for_pt_output_74, (MR_Integer) 1, &TypeClassInfo_for_writer_107);
        mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_107, S_7, Functor2_13, STATE_VARIABLE_U_27_27, &STATE_VARIABLE_U_28_28);
        func_21 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_21(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_28_28, &STATE_VARIABLE_U_30_30);
        if ((OtherFunctors_14 == (MR_Word) ((MR_Unsigned) 0U)))
        {
          void MR_CALL (* func_22)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));

          func_22(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[]")), S_7, STATE_VARIABLE_U_30_30, &STATE_VARIABLE_U_32_32);
        }
        else
        {
          MR_Box STATE_VARIABLE_U_34_34;
          MR_Word Var_35;
          MR_Box STATE_VARIABLE_U_38_38;
          void MR_CALL (* func_23)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_24)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_25)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_23(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "[")), S_7, STATE_VARIABLE_U_30_30, &STATE_VARIABLE_U_34_34);
          {
            Var_35 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
            MR_hl_field(0, Var_35, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_5[0]));
            MR_hl_field(0, Var_35, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_du_enum_6_p_0_1));
            MR_hl_field(0, Var_35, 2) = ((MR_Box) ((MR_Integer) 1));
            MR_hl_field(0, Var_35, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_74));
          }
          func_24 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 25))));
          func_24(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)), ((MR_Box) (Var_35)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (OtherFunctors_14)), S_7, STATE_VARIABLE_U_34_34, &STATE_VARIABLE_U_38_38);
          func_25 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
          func_25(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) "]")), S_7, STATE_VARIABLE_U_38_38, &STATE_VARIABLE_U_32_32);
        }
        func_26 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_26(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_42_42);
        parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_or_enum_6_p_0(TypeClassInfo_for_pt_output_74, S_7, TypeRepnFor_8, (MR_Integer) 0, MaybeCJCsRepnOrEnum_15, STATE_VARIABLE_U_42_42, &STATE_VARIABLE_U_44_44);
        func_27 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_74, (MR_Integer) 0)), (MR_Integer) 6))));
        func_27(((MR_Box) (TypeClassInfo_for_pt_output_74)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_44_44, STATE_VARIABLE_U_22);
      }
      break;
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_c_j_cs_repn_or_enum_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_52,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeCJCsRepnOrEnum_10,
  MR_Box STATE_VARIABLE_U_0_17,
  MR_Box * STATE_VARIABLE_U_18)
{
  MR_bool succeeded;
  MR_Word MaybeRepnOrEnumC_12 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 0))));
  MR_Word MaybeRepnOrEnumJava_13 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 1))));
  MR_Word MaybeRepnOrEnumCsharp_14 = ((MR_Word) ((MR_hl_field(0, MaybeCJCsRepnOrEnum_10, (MR_Integer) 2))));
  MR_Integer Indent1_15 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
  MR_String I_16;

  I_16 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
  succeeded = (MaybeRepnOrEnumC_12 == (MR_Word) ((MR_Unsigned) 0U));
  if (succeeded)
  {
    succeeded = (MaybeRepnOrEnumJava_13 == (MR_Word) ((MR_Unsigned) 0U));
    if (succeeded)
      succeeded = (MaybeRepnOrEnumCsharp_14 == (MR_Word) ((MR_Unsigned) 0U));
  }
  if (succeeded)
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_Box STATE_VARIABLE_U_22_22;
          void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_0(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), S_7, STATE_VARIABLE_U_0_17, &STATE_VARIABLE_U_22_22);
          func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_1(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "no_c_j_cs")), S_7, STATE_VARIABLE_U_22_22, STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));

          func_2(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " no_c_j_cs")), S_7, STATE_VARIABLE_U_0_17, STATE_VARIABLE_U_18);
        }
        break;
    }
  else
    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        {
          MR_Box STATE_VARIABLE_U_37_37;
          MR_Box STATE_VARIABLE_U_38_38;
          MR_Box STATE_VARIABLE_U_40_40;
          MR_Box STATE_VARIABLE_U_41_41;
          MR_Box STATE_VARIABLE_U_43_43;
          MR_Box STATE_VARIABLE_U_44_44;
          MR_Box STATE_VARIABLE_U_46_46;
          MR_Box STATE_VARIABLE_U_47_47;
          MR_Box STATE_VARIABLE_U_49_49;
          MR_Box STATE_VARIABLE_U_50_50;
          void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_3(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_0_17, &STATE_VARIABLE_U_37_37);
          func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_4(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), S_7, STATE_VARIABLE_U_37_37, &STATE_VARIABLE_U_38_38);
          func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_5(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "c_j_cs(\n")), S_7, STATE_VARIABLE_U_38_38, &STATE_VARIABLE_U_40_40);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumC_12, STATE_VARIABLE_U_40_40, &STATE_VARIABLE_U_41_41);
          func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_6(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), S_7, STATE_VARIABLE_U_41_41, &STATE_VARIABLE_U_43_43);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumJava_13, STATE_VARIABLE_U_43_43, &STATE_VARIABLE_U_44_44);
          func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_7(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ",\n")), S_7, STATE_VARIABLE_U_44_44, &STATE_VARIABLE_U_46_46);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumCsharp_14, STATE_VARIABLE_U_46_46, &STATE_VARIABLE_U_47_47);
          func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_8(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_47_47, &STATE_VARIABLE_U_49_49);
          func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_9(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) (I_16)), S_7, STATE_VARIABLE_U_49_49, &STATE_VARIABLE_U_50_50);
          func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_10(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_50_50, STATE_VARIABLE_U_18);
        }
        break;
      case (MR_Integer) 0:
        {
          MR_Box STATE_VARIABLE_U_26_26;
          MR_Box STATE_VARIABLE_U_27_27;
          MR_Box STATE_VARIABLE_U_29_29;
          MR_Box STATE_VARIABLE_U_30_30;
          MR_Box STATE_VARIABLE_U_32_32;
          MR_Box STATE_VARIABLE_U_33_33;
          void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
          void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

          func_11(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) " c_j_cs(")), S_7, STATE_VARIABLE_U_0_17, &STATE_VARIABLE_U_26_26);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumC_12, STATE_VARIABLE_U_26_26, &STATE_VARIABLE_U_27_27);
          func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_12(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_27_27, &STATE_VARIABLE_U_29_29);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumJava_13, STATE_VARIABLE_U_29_29, &STATE_VARIABLE_U_30_30);
          func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_13(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ", ")), S_7, STATE_VARIABLE_U_30_30, &STATE_VARIABLE_U_32_32);
          parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(TypeClassInfo_for_pt_output_52, S_7, TypeRepnFor_8, Indent1_15, MaybeRepnOrEnumCsharp_14, STATE_VARIABLE_U_32_32, &STATE_VARIABLE_U_33_33);
          func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_52, (MR_Integer) 0)), (MR_Integer) 6))));
          func_14(((MR_Box) (TypeClassInfo_for_pt_output_52)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_33_33, STATE_VARIABLE_U_18);
        }
        break;
    }
}

static MR_Box MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0_2(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1)
{
  MR_Box wrapper_arg_2;
  MR_Box closure = closure_arg;
  MR_String conv15_Str_4;

  conv15_Str_4 = parse_tree__parse_tree_out_type_repn__foreign_type_assertion_to_string_1_f_0(((MR_Word) (wrapper_arg_1)));
  wrapper_arg_2 = ((MR_Box) (conv15_Str_4));
  return wrapper_arg_2;
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0_1(
  MR_Box closure_arg,
  MR_Box wrapper_arg_1,
  MR_Box wrapper_arg_2,
  MR_Box wrapper_arg_3,
  MR_Box * wrapper_arg_4)
{
  MR_Box closure = closure_arg;

  parse_tree__parse_tree_out_type_repn__mercury_format_functor_name_4_p_0(((MR_Word) ((MR_hl_field(0, closure, (MR_Integer) 3)))), ((MR_String) (wrapper_arg_1)), wrapper_arg_2, wrapper_arg_3, wrapper_arg_4);
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0(
  MR_Word TypeClassInfo_for_pt_output_23,
  MR_Box S_7,
  MR_Word TypeRepnFor_8,
  MR_Integer Indent_9,
  MR_Word MaybeTypeRepnOrEnum_10,
  MR_Box STATE_VARIABLE_U_0_15,
  MR_Box * STATE_VARIABLE_U_16)
{
  if ((MaybeTypeRepnOrEnum_10 == (MR_Word) ((MR_Unsigned) 0U)))
  {
    MR_String I_12;
    MR_Box STATE_VARIABLE_U_17_17;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    switch (TypeRepnFor_8) {
      default: /*NOTREACHED*/ MR_assert(0);
      case (MR_Integer) 1:
        I_12 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
        break;
      case (MR_Integer) 0:
        I_12 = (MR_String) "";
        break;
    }
    func_0 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
    func_0(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_12)), S_7, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_17_17);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "no_foreign")), S_7, STATE_VARIABLE_U_17_17, STATE_VARIABLE_U_16);
  }
  else
  {
    MR_Word Var_24 = ((MR_Word) ((MR_hl_field(1, MaybeTypeRepnOrEnum_10, (MR_Integer) 0))));

    if (((MR_tag((MR_Word) Var_24)) == (MR_Integer) 1))
    {
      MR_Word EnumRepn_13 = ((MR_Word) ((MR_hl_field(1, Var_24, (MR_Integer) 0))));
      MR_String HeadEnum_25 = ((MR_String) ((MR_hl_field(0, EnumRepn_13, (MR_Integer) 0))));
      MR_Word TailEnums_26 = ((MR_Word) ((MR_hl_field(0, EnumRepn_13, (MR_Integer) 1))));

      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          {
            MR_String I_27;
            MR_Box STATE_VARIABLE_U_25_35;
            MR_Box STATE_VARIABLE_U_27_37;
            MR_Integer Var_38;
            MR_Word Var_40;
            MR_Box STATE_VARIABLE_U_31_41;
            MR_String Var_43;
            MR_Integer Var_44;
            MR_Box STATE_VARIABLE_U_38_48;
            MR_Box STATE_VARIABLE_U_39_49;
            MR_String NlI_53;
            MR_String HeadX_54;
            MR_Word TailXs_55;
            MR_Box STATE_VARIABLE_U_20_58;
            MR_Box STATE_VARIABLE_U_22_60;
            MR_Box STATE_VARIABLE_U_23_61;
            MR_Box STATE_VARIABLE_U_24_62;
            void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_3)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_4)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_5)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_6)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_7)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_8)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_9)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_10)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

            I_27 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
            func_2 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_2(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_27)), S_7, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_25_35);
            func_3 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_3(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "foreign_enum(")), S_7, STATE_VARIABLE_U_25_35, &STATE_VARIABLE_U_27_37);
            Var_38 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
            Var_44 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 2);
            Var_43 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_44);
            {
              Var_40 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, Var_40, 0) = ((MR_Box) (HeadEnum_25));
              MR_hl_field(1, Var_40, 1) = ((MR_Box) (TailEnums_26));
            }
            NlI_53 = parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(Var_38);
            HeadX_54 = ((MR_String) ((MR_hl_field(1, Var_40, (MR_Integer) 0))));
            TailXs_55 = ((MR_Word) ((MR_hl_field(1, Var_40, (MR_Integer) 1))));
            func_4 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_4(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (NlI_53)), S_7, STATE_VARIABLE_U_27_37, &STATE_VARIABLE_U_20_58);
            func_5 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_5(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "[")), S_7, STATE_VARIABLE_U_20_58, &STATE_VARIABLE_U_22_60);
            parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_51_95_95_91_53_93_95_48_6_p_0(TypeClassInfo_for_pt_output_23, Var_43, (MR_String) "", TypeClassInfo_for_pt_output_23, HeadX_54, TailXs_55, S_7, STATE_VARIABLE_U_22_60, &STATE_VARIABLE_U_23_61);
            func_6 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_6(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (NlI_53)), S_7, STATE_VARIABLE_U_23_61, &STATE_VARIABLE_U_24_62);
            func_7 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_7(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "]")), S_7, STATE_VARIABLE_U_24_62, &STATE_VARIABLE_U_31_41);
            func_8 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_8(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "\n")), S_7, STATE_VARIABLE_U_31_41, &STATE_VARIABLE_U_38_48);
            func_9 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_9(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (I_27)), S_7, STATE_VARIABLE_U_38_48, &STATE_VARIABLE_U_39_49);
            func_10 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_10(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) ")")), S_7, STATE_VARIABLE_U_39_49, STATE_VARIABLE_U_16);
          }
          break;
        case (MR_Integer) 0:
          {
            MR_Box STATE_VARIABLE_U_18_29;
            MR_Word Var_30;
            MR_Word Var_32;
            MR_Box STATE_VARIABLE_U_22_33;
            void MR_CALL (* func_11)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            void MR_CALL (* func_12)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
            void MR_CALL (* func_13)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

            func_11(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "foreign_enum([")), S_7, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_18_29);
            {
              Var_30 = (MR_Word) MR_new_object(MR_Word, (4 * sizeof(MR_Word)), NULL, NULL);
              MR_hl_field(0, Var_30, 0) = ((MR_Box) (&parse_tree__parse_tree_out_type_repn_scalar_common_5[0]));
              MR_hl_field(0, Var_30, 1) = ((MR_Box) (parse_tree__parse_tree_out_type_repn__mercury_format_maybe_enum_foreign_repn_6_p_0_1));
              MR_hl_field(0, Var_30, 2) = ((MR_Box) ((MR_Integer) 1));
              MR_hl_field(0, Var_30, 3) = ((MR_Box) (TypeClassInfo_for_pt_output_23));
            }
            {
              Var_32 = (MR_Word) MR_mkword(1, MR_new_object(MR_Word, (2 * sizeof(MR_Word)), NULL, NULL));
              MR_hl_field(1, Var_32, 0) = ((MR_Box) (HeadEnum_25));
              MR_hl_field(1, Var_32, 1) = ((MR_Box) (TailEnums_26));
            }
            func_12 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 25))));
            func_12(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (&mercury__builtin__builtin__type_ctor_info_string_0)), ((MR_Box) (Var_30)), ((MR_Box) ((MR_String) ", ")), ((MR_Box) (Var_32)), S_7, STATE_VARIABLE_U_18_29, &STATE_VARIABLE_U_22_33);
            func_13 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
            func_13(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) ((MR_String) "])")), S_7, STATE_VARIABLE_U_22_33, STATE_VARIABLE_U_16);
          }
          break;
      }
    }
    else
    {
      MR_Word TypeRepn_14 = (MR_Word) ((MR_Word) (Var_24));
      MR_String ForeignTypeName_65 = ((MR_String) ((MR_hl_field(0, TypeRepn_14, (MR_Integer) 0))));
      MR_Word ForeignTypeAssertions_66 = ((MR_Word) ((MR_hl_field(0, TypeRepn_14, (MR_Integer) 1))));
      MR_String I_67;
      MR_Word Assertions_68;
      MR_Word AssertionsList_69;
      MR_String InitStr_70;
      MR_Word AssertionStrs_71;
      MR_String AssertionsStr_72;
      MR_String FinalStr_73;
      MR_Box STATE_VARIABLE_U_30_75;
      MR_String Var_83;
      MR_String Var_85;
      void MR_CALL (* func_14)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);
      void MR_CALL (* func_16)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          I_67 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Indent_9);
          break;
        case (MR_Integer) 0:
          I_67 = (MR_String) "";
          break;
      }
      Assertions_68 = (MR_Word) (ForeignTypeAssertions_66);
      mercury__set__to_sorted_list_2_p_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), Assertions_68, &AssertionsList_69);
      Var_83 = mercury__string__f_43_43_2_f_0(ForeignTypeName_65, (MR_String) "\",");
      Var_85 = mercury__string__f_43_43_2_f_0((MR_String) "foreign_type(\"", Var_83);
      InitStr_70 = mercury__string__f_43_43_2_f_0(I_67, Var_85);
      func_14 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
      func_14(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (InitStr_70)), S_7, STATE_VARIABLE_U_0_15, &STATE_VARIABLE_U_30_75);
      AssertionStrs_71 = mercury__list__map_2_f_0((MR_Word) (&parse_tree__prog_data__parse_tree__prog_data__type_ctor_info_foreign_type_assertion_0), (MR_Word) (&mercury__builtin__builtin__type_ctor_info_string_0), (MR_Word) (&parse_tree__parse_tree_out_type_repn_scalar_common_7[0]), AssertionsList_69);
      AssertionsStr_72 = mercury__string__join_list_2_f_0((MR_String) ", ", AssertionStrs_71);
      switch (TypeRepnFor_8) {
        default: /*NOTREACHED*/ MR_assert(0);
        case (MR_Integer) 1:
          {
            MR_String I1_74;
            MR_Integer Var_78 = (MR_Integer) ((MR_Unsigned) Indent_9 + (MR_Unsigned) 1);
            MR_String Var_90;
            MR_String Var_92;
            MR_String Var_93;
            MR_String Var_95;
            MR_String Var_96;

            I1_74 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_78);
            Var_90 = mercury__string__f_43_43_2_f_0(I_67, (MR_String) ")");
            Var_92 = mercury__string__f_43_43_2_f_0((MR_String) "]\n", Var_90);
            Var_93 = mercury__string__f_43_43_2_f_0(AssertionsStr_72, Var_92);
            Var_95 = mercury__string__f_43_43_2_f_0((MR_String) "[", Var_93);
            Var_96 = mercury__string__f_43_43_2_f_0(I1_74, Var_95);
            FinalStr_73 = mercury__string__f_43_43_2_f_0((MR_String) "\n", Var_96);
          }
          break;
        case (MR_Integer) 0:
          {
            MR_String Var_87;

            Var_87 = mercury__string__f_43_43_2_f_0(AssertionsStr_72, (MR_String) "])");
            FinalStr_73 = mercury__string__f_43_43_2_f_0((MR_String) " [", Var_87);
          }
          break;
      }
      func_16 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_23, (MR_Integer) 0)), (MR_Integer) 6))));
      func_16(((MR_Box) (TypeClassInfo_for_pt_output_23)), ((MR_Box) (FinalStr_73)), S_7, STATE_VARIABLE_U_30_75, STATE_VARIABLE_U_16);
    }
  }
}

static void MR_CALL 
parse_tree__parse_tree_out_type_repn__f_85_110_117_115_101_100_65_114_103_115_95_95_112_114_101_100_95_95_109_101_114_99_117_114_121_95_102_111_114_109_97_116_95_108_105_115_116_95_102_111_114_95_104_117_109_97_110_115_95_108_111_111_112_95_95_104_111_53_50_51_95_95_91_53_93_95_48_6_p_0(
  MR_Word Var_21,
  MR_String Var_22,
  MR_String Var_23,
  MR_Word TypeClassInfo_for_pt_output_19,
  MR_String X_8,
  MR_Word Xs_9,
  MR_Box S_10,
  MR_Box STATE_VARIABLE_U_0_14,
  MR_Box * STATE_VARIABLE_U_15)
{
  while (MR_TRUE)
  {
    MR_Word TypeClassInfo_for_writer_26;
    MR_Box STATE_VARIABLE_U_16_16;
    MR_Box STATE_VARIABLE_U_14_24;
    MR_Box STATE_VARIABLE_U_15_25;
    void MR_CALL (* func_0)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    void MR_CALL (* func_1)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *);

    // setup for model_det tailcalls optimized into a loop
    ;
    func_0(((MR_Box) (Var_21)), ((MR_Box) (Var_22)), S_10, STATE_VARIABLE_U_0_14, &STATE_VARIABLE_U_14_24);
    mercury__private_builtin__superclass_from_typeclass_info_3_p_0(Var_21, (MR_Integer) 1, &TypeClassInfo_for_writer_26);
    mercury__term_io__format_quoted_string_4_p_0(TypeClassInfo_for_writer_26, S_10, X_8, STATE_VARIABLE_U_14_24, &STATE_VARIABLE_U_15_25);
    func_1 = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, Var_21, (MR_Integer) 0)), (MR_Integer) 6))));
    func_1(((MR_Box) (Var_21)), ((MR_Box) (Var_23)), S_10, STATE_VARIABLE_U_15_25, &STATE_VARIABLE_U_16_16);
    if ((Xs_9 == (MR_Word) ((MR_Unsigned) 0U)))
      *STATE_VARIABLE_U_15 = STATE_VARIABLE_U_16_16;
    else
    {
      MR_String HeadX_12 = ((MR_String) ((MR_hl_field(1, Xs_9, (MR_Integer) 0))));
      MR_Word TailXs_13 = ((MR_Word) ((MR_hl_field(1, Xs_9, (MR_Integer) 1))));
      MR_Box STATE_VARIABLE_U_18_18;
      void MR_CALL (* func_2)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *) = ((void MR_CALL (*)(MR_Box, MR_Box, MR_Box, MR_Box, MR_Box *)) ((MR_hl_field(0, (MR_hl_field(0, TypeClassInfo_for_pt_output_19, (MR_Integer) 0)), (MR_Integer) 6))));
      MR_String next_value_of_X_8;
      MR_Word next_value_of_Xs_9;
      MR_Box next_value_of_STATE_VARIABLE_U_0_14;

      func_2(((MR_Box) (TypeClassInfo_for_pt_output_19)), ((MR_Box) ((MR_String) ",")), S_10, STATE_VARIABLE_U_16_16, &STATE_VARIABLE_U_18_18);
      // direct tailcall eliminated
      ;
      next_value_of_X_8 = HeadX_12;
      next_value_of_Xs_9 = TailXs_13;
      next_value_of_STATE_VARIABLE_U_0_14 = STATE_VARIABLE_U_18_18;
      X_8 = next_value_of_X_8;
      Xs_9 = next_value_of_Xs_9;
      STATE_VARIABLE_U_0_14 = next_value_of_STATE_VARIABLE_U_0_14;
      continue;
    }
    break;
  }
}

static MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__nl_indent_1_f_0(
  MR_Integer N_3)
{
  MR_bool succeeded;
  MR_String Str_4;
  MR_String StrPrime_5;

  if ((((MR_Unsigned) N_3) <= ((MR_Unsigned) 6)))
  {
    StrPrime_5 = ((&parse_tree__parse_tree_out_type_repn_vector_common_3[7 + N_3]))->parse_tree__parse_tree_out_type_repn__vector_common_type_3_0__vct_3_f_0;
    succeeded = MR_TRUE;
  }
  else
    succeeded = MR_FALSE;
  if (succeeded)
    Str_4 = StrPrime_5;
  else
  {
    MR_String Var_7;
    MR_Integer Var_8 = (MR_Integer) ((MR_Unsigned) N_3 - (MR_Unsigned) 6);

    Var_7 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_8);
    Str_4 = mercury__string__f_43_43_2_f_0((MR_String) "\n                        ", Var_7);
  }
  return Str_4;
}

static MR_String MR_CALL 
parse_tree__parse_tree_out_type_repn__indent_1_f_0(
  MR_Integer N_3)
{
  MR_bool succeeded;
  MR_String Str_4;
  MR_String StrPrime_5;

  if ((((MR_Unsigned) N_3) <= ((MR_Unsigned) 6)))
  {
    StrPrime_5 = ((&parse_tree__parse_tree_out_type_repn_vector_common_3[0 + N_3]))->parse_tree__parse_tree_out_type_repn__vector_common_type_3_0__vct_3_f_0;
    succeeded = MR_TRUE;
  }
  else
    succeeded = MR_FALSE;
  if (succeeded)
    Str_4 = StrPrime_5;
  else
  {
    MR_String Var_7;
    MR_Integer Var_8 = (MR_Integer) ((MR_Unsigned) N_3 - (MR_Unsigned) 6);

    Var_7 = parse_tree__parse_tree_out_type_repn__indent_1_f_0(Var_8);
    Str_4 = mercury__string__f_43_43_2_f_0((MR_String) "                        ", Var_7);
  }
  return Str_4;
}

void mercury__parse_tree__parse_tree_out_type_repn__init(void)
{
}

void mercury__parse_tree__parse_tree_out_type_repn__init_type_tables(void)
{
}

void mercury__parse_tree__parse_tree_out_type_repn__init_debugger(void)
{
	MR_fatal_error("debugger initialization in MLDS grade");
}

// Ensure everything is compiled with the same grade.
const char *mercury__parse_tree__parse_tree_out_type_repn__grade_check(void)
{
    return &MR_GRADE_VAR;
}

// :- end_module parse_tree.parse_tree_out_type_repn.
