/*
**
** The C code is generated by ATS/Anairiats
** The compilation time is: 2020-11-6:  1h:10m
**
*/

/* include some .h files */
#ifndef _ATS_HEADER_NONE
#include "ats_config.h"
#include "ats_basics.h"
#include "ats_types.h"
#include "ats_exception.h"
#include "ats_memory.h"
#endif /* _ATS_HEADER_NONE */

/* include some .cats files */
#ifndef _ATS_PRELUDE_NONE
#include "prelude/CATS/basics.cats"
#include "prelude/CATS/bool.cats"
#include "prelude/CATS/char.cats"
#include "prelude/CATS/byte.cats"
#include "prelude/CATS/float.cats"
#include "prelude/CATS/integer.cats"
#include "prelude/CATS/integer_ptr.cats"
#include "prelude/CATS/integer_fixed.cats"
#include "prelude/CATS/sizetype.cats"
#include "prelude/CATS/pointer.cats"
#include "prelude/CATS/reference.cats"
#include "prelude/CATS/string.cats"
#include "prelude/CATS/lazy.cats"
#include "prelude/CATS/lazy_vt.cats"
#include "prelude/CATS/printf.cats"
#include "prelude/CATS/list.cats"
#include "prelude/CATS/option.cats"
#include "prelude/CATS/array.cats"
#include "prelude/CATS/matrix.cats"
#endif /* _ATS_PRELUDE_NONE */
/* prologues from statically loaded files */

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"
/* external codes at top */
/* type definitions */
typedef
struct {
ats_ptr_type atslab_d2ecl_loc ;
ats_ptr_type atslab_d2ecl_node ;
} anairiats_rec_0 ;

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_1 ;

typedef struct {
int tag ;
ats_ptr_type atslab_0 ;
} anairiats_sum_2 ;

typedef struct {
ats_ptr_type atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_3 ;

/* external typedefs */
/* external dynamic constructor declarations */
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_cons_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_nil_1) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__Some_1) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__None_vt_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__Some_vt_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2ITMcst_0) ;

/* external dynamic constant declarations */
ATSextern_fun(ats_void_type, atspre_fprint_newline) (ats_ptr_type) ;
ATSextern_fun(ats_int_type, atspre_add_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_lt_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_lte_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_gt_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_eq_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_neq_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_void_type, atspre_fprint_int) (ats_ptr_type, ats_int_type) ;
ATSextern_fun(ats_void_type, atspre_fprint_string) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, atspre_tostringf) (ats_ptr_type, ...) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__symbol_get_name) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__symbol_make_string) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__fprint_location) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_sym) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_dconlst) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_name) (ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_arity_real) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_name) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__the_d2expenv_find) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_datype) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_d2cst) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec) (ats_ptr_type, ats_ptr_type) ;

/* external dynamic terminating constant declarations */
#ifdef _ATS_PROOFCHECK
#endif /* _ATS_PROOFCHECK */

/* assuming abstract types */
/* sum constructor declarations */
/* exn constructor declarations */
/* global dynamic (non-functional) constant declarations */
/* internal function declarations */
static
ats_void_type auxerr_nil_0 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type auxerr_s2cst_1 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type auxerr_d2cst_2 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_ptr_type auxfun1_7 (ats_ptr_type arg0) ;
static
ats_ptr_type auxfun2_8 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type aux_datype_3 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) ;
static
ats_void_type auxd2c_dec_9 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) ;
static
ats_clo_ptr_type auxd2c_dec_9_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) ;
static
ats_void_type auxd2c_dec_9_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type auxd2cs_dec_10 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) ;
static
ats_clo_ptr_type auxd2cs_dec_10_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) ;
static
ats_void_type auxd2cs_dec_10_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type auxd2c_cla_11 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) ;
static
ats_clo_ptr_type auxd2c_cla_11_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) ;
static
ats_void_type auxd2c_cla_11_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type auxd2cs_cla_12 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) ;
static
ats_clo_ptr_type auxd2cs_cla_12_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) ;
static
ats_void_type auxd2cs_cla_12_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type auxsep_13 (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_clo_ptr_type auxsep_13_closure_make (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_void_type auxsep_13_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxcarg_14 (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_clo_ptr_type auxcarg_14_closure_make (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_void_type auxcarg_14_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxlpar_15 (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_clo_ptr_type auxlpar_15_closure_make (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_void_type auxlpar_15_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxrpar_16 (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_clo_ptr_type auxrpar_16_closure_make (ats_ptr_type env0, ats_ptr_type env1) ;
static
ats_void_type auxrpar_16_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type aux_datype_d2cf_4 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) ;
static
ats_void_type auxcon1_17 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxcon1_17_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxcon1_17_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxlpar1_18 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxlpar1_18_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxlpar1_18_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxrpar1_19 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxrpar1_19_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxrpar1_19_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxsep1_n_20 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) ;
static
ats_clo_ptr_type auxsep1_n_20_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxsep1_n_20_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type auxarg1_n_21 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) ;
static
ats_clo_ptr_type auxarg1_n_21_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxarg1_n_21_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type auxcon2_22 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxcon2_22_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxcon2_22_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxlpar2_23 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxlpar2_23_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxlpar2_23_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxrpar2_24 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxrpar2_24_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxrpar2_24_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxsep2_n_25 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) ;
static
ats_clo_ptr_type auxsep2_n_25_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxsep2_n_25_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type auxarg2_n_26 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) ;
static
ats_clo_ptr_type auxarg2_n_26_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxarg2_n_26_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type auxbody2_27 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0, ats_int_type arg1) ;
static
ats_clo_ptr_type auxbody2_27_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) ;
static
ats_void_type auxbody2_27_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0, ats_int_type arg1) ;
static
ats_void_type auxcon3_28 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxcon3_28_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxcon3_28_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxlpar3_29 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxlpar3_29_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxlpar3_29_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxrpar3_30 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_clo_ptr_type auxrpar3_30_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxrpar3_30_clofun (ats_clo_ptr_type cloptr) ;
static
ats_void_type auxsep3_n_31 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) ;
static
ats_clo_ptr_type auxsep3_n_31_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) ;
static
ats_void_type auxsep3_n_31_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type aux_33 (ats_ptr_type env0, ats_int_type env1, ats_int_type env2, ats_int_type arg0) ;
static
ats_clo_ptr_type aux_33_closure_make (ats_ptr_type env0, ats_int_type env1, ats_int_type env2) ;
static
ats_void_type aux_33_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type auxpat3_n_32 (ats_ptr_type env0, ats_ptr_type env1, ats_int_type env2, ats_int_type arg0) ;
static
ats_clo_ptr_type auxpat3_n_32_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_int_type env2) ;
static
ats_void_type auxpat3_n_32_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type auxarg3_n_34 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) ;
static
ats_clo_ptr_type auxarg3_n_34_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) ;
static
ats_void_type auxarg3_n_34_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type loop_35 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) ;
static
ats_clo_ptr_type loop_35_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) ;
static
ats_void_type loop_35_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type loop_36 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) ;
static
ats_clo_ptr_type loop_36_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) ;
static
ats_void_type loop_36_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type loop_37 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) ;
static
ats_clo_ptr_type loop_37_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) ;
static
ats_void_type loop_37_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type loop_38 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) ;
static
ats_clo_ptr_type loop_38_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) ;
static
ats_void_type loop_38_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) ;
static
ats_void_type aux_datype_d2cf_con_5 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) ;
static
ats_void_type aux_datype_d2cf_conlst_6 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) ;

/* partial value template declarations */
/* static temporary variable declarations */
/* external value variable declarations */

/* function implementations */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 1911(line=75, offs=1) -- 2176(line=92, offs=2)
*/
ATSstaticdec()
ats_void_type
auxerr_nil_0 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp0) ;
ATSlocal (ats_ptr_type, tmp1) ;
// ATSlocal_void (tmp2) ;
// ATSlocal_void (tmp3) ;
// ATSlocal_void (tmp4) ;
// ATSlocal_void (tmp5) ;

__ats_lab_auxerr_nil_0:
tmp1 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg1), atslab_d2ecl_loc) ;
/* tmp2 = */ atspre_fprint_string (arg0, ATSstrcst("(*\n")) ;
/* tmp3 = */ _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__fprint_location (arg0, tmp1) ;
/* tmp4 = */ atspre_fprint_string (arg0, ATSstrcst(": error(codegen2): no spec on datatype is given\n")) ;
/* tmp5 = */ atspre_fprint_string (arg0, ATSstrcst("*)")) ;
/* tmp0 = */ atspre_fprint_newline (arg0) ;
return /* (tmp0) */ ;
} /* end of [auxerr_nil_0] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 2208(line=95, offs=1) -- 2475(line=112, offs=2)
*/
ATSstaticdec()
ats_void_type
auxerr_s2cst_1 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp6) ;
ATSlocal (ats_ptr_type, tmp7) ;
// ATSlocal_void (tmp8) ;
// ATSlocal_void (tmp9) ;
// ATSlocal_void (tmp10) ;
// ATSlocal_void (tmp11) ;

__ats_lab_auxerr_s2cst_1:
tmp7 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg1), atslab_d2ecl_loc) ;
/* tmp8 = */ atspre_fprint_string (arg0, ATSstrcst("(*\n")) ;
/* tmp9 = */ _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__fprint_location (arg0, tmp7) ;
/* tmp10 = */ atspre_fprint_string (arg0, ATSstrcst(": error(codegen2): no datatype of the given spec\n")) ;
/* tmp11 = */ atspre_fprint_string (arg0, ATSstrcst("*)")) ;
/* tmp6 = */ atspre_fprint_newline (arg0) ;
return /* (tmp6) */ ;
} /* end of [auxerr_s2cst_1] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 2509(line=115, offs=1) -- 2797(line=132, offs=2)
*/
ATSstaticdec()
ats_void_type
auxerr_d2cst_2 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp12) ;
ATSlocal (ats_ptr_type, tmp13) ;
// ATSlocal_void (tmp14) ;
// ATSlocal_void (tmp15) ;
// ATSlocal_void (tmp16) ;
// ATSlocal_void (tmp17) ;

__ats_lab_auxerr_d2cst_2:
tmp13 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg1), atslab_d2ecl_loc) ;
/* tmp14 = */ atspre_fprint_string (arg0, ATSstrcst("(*\n")) ;
/* tmp15 = */ _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__fprint_location (arg0, tmp13) ;
/* tmp16 = */ atspre_fprint_string (arg0, ATSstrcst(": error(codegen2): no fprint-function of the given spec\n")) ;
/* tmp17 = */ atspre_fprint_string (arg0, ATSstrcst("*)")) ;
/* tmp12 = */ atspre_fprint_newline (arg0) ;
return /* (tmp12) */ ;
} /* end of [auxerr_d2cst_2] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 2922(line=142, offs=1) -- 3360(line=165, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxfun1_7 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp19) ;
ATSlocal (ats_ptr_type, tmp20) ;
ATSlocal (ats_ptr_type, tmp21) ;
ATSlocal (ats_ptr_type, tmp22) ;
ATSlocal (ats_ptr_type, tmp23) ;
ATSlocal (ats_ptr_type, tmp24) ;
ATSlocal (ats_ptr_type, tmp25) ;
ATSlocal (ats_ptr_type, tmp26) ;

__ats_lab_auxfun1_7:
tmp20 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_sym (arg0) ;
tmp21 = _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__symbol_get_name (tmp20) ;
tmp22 = atspre_tostringf (ATSstrcst("fprint_%s_"), tmp21) ;
tmp23 = _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__symbol_make_string (ats_castfn_mac(ats_ptr_type, tmp22)) ;
tmp24 = _2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__the_d2expenv_find (tmp23) ;
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (tmp24 != (ats_sum_ptr_type)0) { goto __ats_lab_1_0 ; }
__ats_lab_0_1:
tmp19 = (ats_sum_ptr_type)0 ;
break ;

/* branch: __ats_lab_1 */
__ats_lab_1_0:
// if (tmp24 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_1_1:
tmp25 = ats_caselptrlab_mac(anairiats_sum_1, tmp24, atslab_0) ;
ATS_FREE(tmp24) ;
do {
/* branch: __ats_lab_2 */
__ats_lab_2_0:
if (((ats_sum_ptr_type)tmp25)->tag != 0) { goto __ats_lab_3_0 ; }
__ats_lab_2_1:
tmp26 = ats_caselptrlab_mac(anairiats_sum_2, tmp25, atslab_0) ;
tmp19 = ATS_MALLOC(sizeof(anairiats_sum_1)) ;
ats_selptrset_mac(anairiats_sum_1, tmp19, atslab_0, tmp26) ;
break ;

/* branch: __ats_lab_3 */
__ats_lab_3_0:
__ats_lab_3_1:
tmp19 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp19) ;
} /* end of [auxfun1_7] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 3388(line=168, offs=1) -- 3538(line=176, offs=2)
*/
ATSstaticdec()
ats_ptr_type
auxfun2_8 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp27) ;
ATSlocal (ats_ptr_type, tmp28) ;

__ats_lab_auxfun2_8:
do {
/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_5_0 ; }
__ats_lab_4_1:
tmp27 = auxfun1_7 (arg0) ;
break ;

/* branch: __ats_lab_5 */
__ats_lab_5_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_5_1:
tmp28 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_0) ;
tmp27 = _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_d2cst (tmp28) ;
break ;
} while (0) ;
return (tmp27) ;
} /* end of [auxfun2_8] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 2831(line=135, offs=1) -- 3866(line=196, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_datype_3 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) {
/* local vardec */
// ATSlocal_void (tmp18) ;
ATSlocal (ats_ptr_type, tmp29) ;
ATSlocal (ats_ptr_type, tmp30) ;
ATSlocal (ats_ptr_type, tmp31) ;
ATSlocal (ats_ptr_type, tmp32) ;

__ats_lab_aux_datype_3:
tmp29 = auxfun2_8 (arg2, arg3) ;
do {
/* branch: __ats_lab_6 */
__ats_lab_6_0:
if (arg3 != (ats_sum_ptr_type)0) { goto __ats_lab_7_0 ; }
__ats_lab_6_1:
tmp30 = arg3 ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
// if (arg3 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_7_1:
tmp31 = ats_caselptrlab_mac(anairiats_sum_3, arg3, atslab_1) ;
tmp30 = tmp31 ;
break ;
} while (0) ;
do {
/* branch: __ats_lab_8 */
__ats_lab_8_0:
if (tmp29 != (ats_sum_ptr_type)0) { goto __ats_lab_9_0 ; }
__ats_lab_8_1:
/* tmp18 = */ auxerr_d2cst_2 (arg0, arg1, arg2) ;
break ;

/* branch: __ats_lab_9 */
__ats_lab_9_0:
// if (tmp29 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_9_1:
tmp32 = ats_caselptrlab_mac(anairiats_sum_1, tmp29, atslab_0) ;
ATS_FREE(tmp29) ;
/* tmp18 = */ aux_datype_d2cf_4 (arg0, arg1, arg2, tmp32, tmp30) ;
break ;
} while (0) ;
return /* (tmp18) */ ;
} /* end of [aux_datype_3] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 4082(line=213, offs=1) -- 4471(line=234, offs=4)
*/
ATSstaticdec()
ats_void_type
auxd2c_dec_9 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp35) ;
ATSlocal (ats_ptr_type, tmp36) ;
// ATSlocal_void (tmp37) ;
// ATSlocal_void (tmp38) ;
// ATSlocal_void (tmp39) ;
// ATSlocal_void (tmp40) ;
// ATSlocal_void (tmp41) ;
// ATSlocal_void (tmp42) ;
// ATSlocal_void (tmp43) ;
// ATSlocal_void (tmp44) ;
// ATSlocal_void (tmp45) ;
// ATSlocal_void (tmp46) ;

__ats_lab_auxd2c_dec_9:
tmp36 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_name (arg0) ;
/* tmp37 = */ atspre_fprint_string (env0, ATSstrcst("extern\nfun")) ;
/* tmp38 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (env0, env1) ;
/* tmp39 = */ atspre_fprint_string (env0, ATSstrcst("\n")) ;
/* tmp40 = */ atspre_fprint_string (env0, env2) ;
/* tmp41 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp42 = */ atspre_fprint_string (env0, tmp36) ;
/* tmp43 = */ atspre_fprint_string (env0, ATSstrcst(": $d2ctype(")) ;
/* tmp44 = */ atspre_fprint_string (env0, env2) ;
/* tmp45 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp46 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
/* tmp35 = */ atspre_fprint_newline (env0) ;
return /* (tmp35) */ ;
} /* end of [auxd2c_dec_9] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
} auxd2c_dec_9_closure_type ;

ats_void_type
auxd2c_dec_9_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
auxd2c_dec_9 (((auxd2c_dec_9_closure_type*)cloptr)->closure_env_0, ((auxd2c_dec_9_closure_type*)cloptr)->closure_env_1, ((auxd2c_dec_9_closure_type*)cloptr)->closure_env_2, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxd2c_dec_9_closure_init (auxd2c_dec_9_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxd2c_dec_9_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxd2c_dec_9_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
auxd2c_dec_9_closure_type *p_clo = ATS_MALLOC(sizeof(auxd2c_dec_9_closure_type)) ;
auxd2c_dec_9_closure_init (p_clo, env0, env1, env2) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 4502(line=237, offs=1) -- 4671(line=246, offs=2)
*/
ATSstaticdec()
ats_void_type
auxd2cs_dec_10 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp47) ;
ATSlocal (ats_ptr_type, tmp48) ;
ATSlocal (ats_ptr_type, tmp49) ;
// ATSlocal_void (tmp50) ;

__ats_lab_auxd2cs_dec_10:
do {
/* branch: __ats_lab_10 */
__ats_lab_10_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_11_0 ; }
__ats_lab_10_1:
break ;

/* branch: __ats_lab_11 */
__ats_lab_11_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_11_1:
tmp48 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_0) ;
tmp49 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_1) ;
/* tmp50 = */ auxd2c_dec_9 (env0, env1, env2, tmp48) ;
arg0 = tmp49 ;
goto __ats_lab_auxd2cs_dec_10 ; // tail call
break ;
} while (0) ;
return /* (tmp47) */ ;
} /* end of [auxd2cs_dec_10] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
} auxd2cs_dec_10_closure_type ;

ats_void_type
auxd2cs_dec_10_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
auxd2cs_dec_10 (((auxd2cs_dec_10_closure_type*)cloptr)->closure_env_0, ((auxd2cs_dec_10_closure_type*)cloptr)->closure_env_1, ((auxd2cs_dec_10_closure_type*)cloptr)->closure_env_2, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxd2cs_dec_10_closure_init (auxd2cs_dec_10_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxd2cs_dec_10_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxd2cs_dec_10_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
auxd2cs_dec_10_closure_type *p_clo = ATS_MALLOC(sizeof(auxd2cs_dec_10_closure_type)) ;
auxd2cs_dec_10_closure_init (p_clo, env0, env1, env2) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 4679(line=249, offs=1) -- 4964(line=265, offs=4)
*/
ATSstaticdec()
ats_void_type
auxd2c_cla_11 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp51) ;
ATSlocal (ats_ptr_type, tmp52) ;
// ATSlocal_void (tmp53) ;
// ATSlocal_void (tmp54) ;
// ATSlocal_void (tmp55) ;
// ATSlocal_void (tmp56) ;
// ATSlocal_void (tmp57) ;
// ATSlocal_void (tmp58) ;
// ATSlocal_void (tmp59) ;
// ATSlocal_void (tmp60) ;

__ats_lab_auxd2c_cla_11:
tmp52 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_name (arg0) ;
/* tmp53 = */ atspre_fprint_string (env0, ATSstrcst("| ")) ;
/* tmp54 = */ atspre_fprint_string (env0, tmp52) ;
/* tmp55 = */ atspre_fprint_string (env0, ATSstrcst(" _ => ")) ;
/* tmp56 = */ atspre_fprint_string (env0, env2) ;
/* tmp57 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp58 = */ atspre_fprint_string (env0, tmp52) ;
/* tmp59 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp60 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0)")) ;
/* tmp51 = */ atspre_fprint_newline (env0) ;
return /* (tmp51) */ ;
} /* end of [auxd2c_cla_11] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
} auxd2c_cla_11_closure_type ;

ats_void_type
auxd2c_cla_11_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
auxd2c_cla_11 (((auxd2c_cla_11_closure_type*)cloptr)->closure_env_0, ((auxd2c_cla_11_closure_type*)cloptr)->closure_env_1, ((auxd2c_cla_11_closure_type*)cloptr)->closure_env_2, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxd2c_cla_11_closure_init (auxd2c_cla_11_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxd2c_cla_11_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxd2c_cla_11_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
auxd2c_cla_11_closure_type *p_clo = ATS_MALLOC(sizeof(auxd2c_cla_11_closure_type)) ;
auxd2c_cla_11_closure_init (p_clo, env0, env1, env2) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 4995(line=268, offs=1) -- 5164(line=277, offs=2)
*/
ATSstaticdec()
ats_void_type
auxd2cs_cla_12 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp61) ;
ATSlocal (ats_ptr_type, tmp62) ;
ATSlocal (ats_ptr_type, tmp63) ;
// ATSlocal_void (tmp64) ;

__ats_lab_auxd2cs_cla_12:
do {
/* branch: __ats_lab_12 */
__ats_lab_12_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_13_0 ; }
__ats_lab_12_1:
break ;

/* branch: __ats_lab_13 */
__ats_lab_13_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_13_1:
tmp62 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_0) ;
tmp63 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_1) ;
/* tmp64 = */ auxd2c_cla_11 (env0, env1, env2, tmp62) ;
arg0 = tmp63 ;
goto __ats_lab_auxd2cs_cla_12 ; // tail call
break ;
} while (0) ;
return /* (tmp61) */ ;
} /* end of [auxd2cs_cla_12] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
} auxd2cs_cla_12_closure_type ;

ats_void_type
auxd2cs_cla_12_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
auxd2cs_cla_12 (((auxd2cs_cla_12_closure_type*)cloptr)->closure_env_0, ((auxd2cs_cla_12_closure_type*)cloptr)->closure_env_1, ((auxd2cs_cla_12_closure_type*)cloptr)->closure_env_2, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxd2cs_cla_12_closure_init (auxd2cs_cla_12_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxd2cs_cla_12_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxd2cs_cla_12_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2) {
auxd2cs_cla_12_closure_type *p_clo = ATS_MALLOC(sizeof(auxd2cs_cla_12_closure_type)) ;
auxd2cs_cla_12_closure_init (p_clo, env0, env1, env2) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 5172(line=280, offs=1) -- 5454(line=298, offs=2)
*/
ATSstaticdec()
ats_void_type
auxsep_13 (ats_ptr_type env0, ats_ptr_type env1) {
/* local vardec */
// ATSlocal_void (tmp65) ;
// ATSlocal_void (tmp66) ;
// ATSlocal_void (tmp67) ;
// ATSlocal_void (tmp68) ;
// ATSlocal_void (tmp69) ;
// ATSlocal_void (tmp70) ;
// ATSlocal_void (tmp71) ;
// ATSlocal_void (tmp72) ;

__ats_lab_auxsep_13:
/* tmp66 = */ atspre_fprint_string (env0, ATSstrcst("//\nextern\nfun{}\n")) ;
/* tmp67 = */ atspre_fprint_string (env0, env1) ;
/* tmp68 = */ atspre_fprint_string (env0, ATSstrcst("$sep: (FILEref) -> void")) ;
/* tmp69 = */ atspre_fprint_newline (env0) ;
/* tmp70 = */ atspre_fprint_string (env0, ATSstrcst("implement{}\n")) ;
/* tmp71 = */ atspre_fprint_string (env0, env1) ;
/* tmp72 = */ atspre_fprint_string (env0, ATSstrcst("$sep(out) = fprint(out, \",\")")) ;
/* tmp65 = */ atspre_fprint_newline (env0) ;
return /* (tmp65) */ ;
} /* end of [auxsep_13] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
} auxsep_13_closure_type ;

ats_void_type
auxsep_13_clofun (ats_clo_ptr_type cloptr) {
auxsep_13 (((auxsep_13_closure_type*)cloptr)->closure_env_0, ((auxsep_13_closure_type*)cloptr)->closure_env_1) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxsep_13_closure_init (auxsep_13_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxsep_13_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxsep_13_closure_make (ats_ptr_type env0, ats_ptr_type env1) {
auxsep_13_closure_type *p_clo = ATS_MALLOC(sizeof(auxsep_13_closure_type)) ;
auxsep_13_closure_init (p_clo, env0, env1) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 5484(line=301, offs=1) -- 5792(line=319, offs=2)
*/
ATSstaticdec()
ats_void_type
auxcarg_14 (ats_ptr_type env0, ats_ptr_type env1) {
/* local vardec */
// ATSlocal_void (tmp73) ;
// ATSlocal_void (tmp74) ;
// ATSlocal_void (tmp75) ;
// ATSlocal_void (tmp76) ;
// ATSlocal_void (tmp77) ;
// ATSlocal_void (tmp78) ;
// ATSlocal_void (tmp79) ;
// ATSlocal_void (tmp80) ;

__ats_lab_auxcarg_14:
/* tmp74 = */ atspre_fprint_string (env0, ATSstrcst("//\nextern\nfun{a:t0p}\n")) ;
/* tmp75 = */ atspre_fprint_string (env0, env1) ;
/* tmp76 = */ atspre_fprint_string (env0, ATSstrcst("$carg: (FILEref, INV(a)) -> void")) ;
/* tmp77 = */ atspre_fprint_newline (env0) ;
/* tmp78 = */ atspre_fprint_string (env0, ATSstrcst("implement{a}\n")) ;
/* tmp79 = */ atspre_fprint_string (env0, env1) ;
/* tmp80 = */ atspre_fprint_string (env0, ATSstrcst("$carg(out, arg) = fprint_val<a>(out, arg)")) ;
/* tmp73 = */ atspre_fprint_newline (env0) ;
return /* (tmp73) */ ;
} /* end of [auxcarg_14] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
} auxcarg_14_closure_type ;

ats_void_type
auxcarg_14_clofun (ats_clo_ptr_type cloptr) {
auxcarg_14 (((auxcarg_14_closure_type*)cloptr)->closure_env_0, ((auxcarg_14_closure_type*)cloptr)->closure_env_1) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxcarg_14_closure_init (auxcarg_14_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxcarg_14_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxcarg_14_closure_make (ats_ptr_type env0, ats_ptr_type env1) {
auxcarg_14_closure_type *p_clo = ATS_MALLOC(sizeof(auxcarg_14_closure_type)) ;
auxcarg_14_closure_init (p_clo, env0, env1) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 5823(line=322, offs=1) -- 6108(line=340, offs=2)
*/
ATSstaticdec()
ats_void_type
auxlpar_15 (ats_ptr_type env0, ats_ptr_type env1) {
/* local vardec */
// ATSlocal_void (tmp81) ;
// ATSlocal_void (tmp82) ;
// ATSlocal_void (tmp83) ;
// ATSlocal_void (tmp84) ;
// ATSlocal_void (tmp85) ;
// ATSlocal_void (tmp86) ;
// ATSlocal_void (tmp87) ;
// ATSlocal_void (tmp88) ;

__ats_lab_auxlpar_15:
/* tmp82 = */ atspre_fprint_string (env0, ATSstrcst("//\nextern\nfun{}\n")) ;
/* tmp83 = */ atspre_fprint_string (env0, env1) ;
/* tmp84 = */ atspre_fprint_string (env0, ATSstrcst("$lpar: (FILEref) -> void")) ;
/* tmp85 = */ atspre_fprint_newline (env0) ;
/* tmp86 = */ atspre_fprint_string (env0, ATSstrcst("implement{}\n")) ;
/* tmp87 = */ atspre_fprint_string (env0, env1) ;
/* tmp88 = */ atspre_fprint_string (env0, ATSstrcst("$lpar(out) = fprint(out, \"(\")")) ;
/* tmp81 = */ atspre_fprint_newline (env0) ;
return /* (tmp81) */ ;
} /* end of [auxlpar_15] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
} auxlpar_15_closure_type ;

ats_void_type
auxlpar_15_clofun (ats_clo_ptr_type cloptr) {
auxlpar_15 (((auxlpar_15_closure_type*)cloptr)->closure_env_0, ((auxlpar_15_closure_type*)cloptr)->closure_env_1) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxlpar_15_closure_init (auxlpar_15_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxlpar_15_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxlpar_15_closure_make (ats_ptr_type env0, ats_ptr_type env1) {
auxlpar_15_closure_type *p_clo = ATS_MALLOC(sizeof(auxlpar_15_closure_type)) ;
auxlpar_15_closure_init (p_clo, env0, env1) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 6136(line=342, offs=1) -- 6421(line=360, offs=2)
*/
ATSstaticdec()
ats_void_type
auxrpar_16 (ats_ptr_type env0, ats_ptr_type env1) {
/* local vardec */
// ATSlocal_void (tmp89) ;
// ATSlocal_void (tmp90) ;
// ATSlocal_void (tmp91) ;
// ATSlocal_void (tmp92) ;
// ATSlocal_void (tmp93) ;
// ATSlocal_void (tmp94) ;
// ATSlocal_void (tmp95) ;
// ATSlocal_void (tmp96) ;

__ats_lab_auxrpar_16:
/* tmp90 = */ atspre_fprint_string (env0, ATSstrcst("//\nextern\nfun{}\n")) ;
/* tmp91 = */ atspre_fprint_string (env0, env1) ;
/* tmp92 = */ atspre_fprint_string (env0, ATSstrcst("$rpar: (FILEref) -> void")) ;
/* tmp93 = */ atspre_fprint_newline (env0) ;
/* tmp94 = */ atspre_fprint_string (env0, ATSstrcst("implement{}\n")) ;
/* tmp95 = */ atspre_fprint_string (env0, env1) ;
/* tmp96 = */ atspre_fprint_string (env0, ATSstrcst("$rpar(out) = fprint(out, \")\")")) ;
/* tmp89 = */ atspre_fprint_newline (env0) ;
return /* (tmp89) */ ;
} /* end of [auxrpar_16] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
} auxrpar_16_closure_type ;

ats_void_type
auxrpar_16_clofun (ats_clo_ptr_type cloptr) {
auxrpar_16 (((auxrpar_16_closure_type*)cloptr)->closure_env_0, ((auxrpar_16_closure_type*)cloptr)->closure_env_1) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxrpar_16_closure_init (auxrpar_16_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxrpar_16_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxrpar_16_closure_make (ats_ptr_type env0, ats_ptr_type env1) {
auxrpar_16_closure_type *p_clo = ATS_MALLOC(sizeof(auxrpar_16_closure_type)) ;
auxrpar_16_closure_init (p_clo, env0, env1) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 3898(line=199, offs=1) -- 7294(line=414, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_datype_d2cf_4 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) {
/* local vardec */
// ATSlocal_void (tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;
ATSlocal (ats_ptr_type, tmp97) ;
ATSlocal (ats_ptr_type, tmp98) ;
// ATSlocal_void (tmp99) ;
// ATSlocal_void (tmp100) ;
// ATSlocal_void (tmp101) ;
// ATSlocal_void (tmp102) ;
// ATSlocal_void (tmp103) ;
// ATSlocal_void (tmp104) ;
// ATSlocal_void (tmp105) ;
// ATSlocal_void (tmp106) ;
// ATSlocal_void (tmp107) ;
// ATSlocal_void (tmp108) ;
// ATSlocal_void (tmp109) ;
// ATSlocal_void (tmp110) ;
// ATSlocal_void (tmp111) ;
// ATSlocal_void (tmp112) ;
// ATSlocal_void (tmp113) ;
// ATSlocal_void (tmp114) ;
// ATSlocal_void (tmp115) ;
// ATSlocal_void (tmp116) ;
// ATSlocal_void (tmp117) ;
// ATSlocal_void (tmp118) ;
// ATSlocal_void (tmp119) ;
// ATSlocal_void (tmp120) ;
// ATSlocal_void (tmp121) ;
// ATSlocal_void (tmp122) ;
// ATSlocal_void (tmp123) ;
// ATSlocal_void (tmp124) ;
// ATSlocal_void (tmp125) ;
// ATSlocal_void (tmp126) ;
// ATSlocal_void (tmp127) ;
// ATSlocal_void (tmp128) ;
// ATSlocal_void (tmp129) ;

__ats_lab_aux_datype_d2cf_4:
tmp34 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_name (arg3) ;
tmp97 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_dconlst (arg2) ;
if (tmp97 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 6453(line=363, offs=1) -- 6490(line=364, offs=25)") ; }
tmp98 = ats_caselptrlab_mac(anairiats_sum_1, tmp97, atslab_0) ;
/* tmp99 = */ atspre_fprint_string (arg0, ATSstrcst("(* ****** ****** *)")) ;
/* tmp100 = */ atspre_fprint_string (arg0, ATSstrcst("\n//\n")) ;
/* tmp101 = */ auxd2cs_dec_10 (arg0, arg3, tmp34, tmp98) ;
/* tmp102 = */ atspre_fprint_string (arg0, ATSstrcst("//\n")) ;
/* tmp103 = */ atspre_fprint_string (arg0, ATSstrcst("(* ****** ****** *)")) ;
/* tmp104 = */ atspre_fprint_string (arg0, ATSstrcst("\n//\n")) ;
/* tmp105 = */ atspre_fprint_string (arg0, ATSstrcst("implement")) ;
/* tmp106 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (arg0, arg3) ;
/* tmp107 = */ atspre_fprint_newline (arg0) ;
/* tmp108 = */ atspre_fprint_string (arg0, tmp34) ;
/* tmp109 = */ atspre_fprint_string (arg0, ATSstrcst("\n  ")) ;
/* tmp110 = */ atspre_fprint_string (arg0, ATSstrcst("(out, arg0) =")) ;
/* tmp111 = */ atspre_fprint_newline (arg0) ;
/* tmp112 = */ atspre_fprint_string (arg0, ATSstrcst("(\n")) ;
/* tmp113 = */ atspre_fprint_string (arg0, ATSstrcst("case+ arg0 of")) ;
/* tmp114 = */ atspre_fprint_newline (arg0) ;
/* tmp115 = */ auxd2cs_cla_12 (arg0, arg3, tmp34, tmp98) ;
/* tmp116 = */ atspre_fprint_string (arg0, ATSstrcst(")\n")) ;
/* tmp117 = */ atspre_fprint_string (arg0, ATSstrcst("//\n")) ;
/* tmp118 = */ atspre_fprint_string (arg0, ATSstrcst("(* ****** ****** *)")) ;
/* tmp119 = */ atspre_fprint_newline (arg0) ;
/* tmp120 = */ auxsep_13 (arg0, tmp34) ;
/* tmp121 = */ auxlpar_15 (arg0, tmp34) ;
/* tmp122 = */ auxrpar_16 (arg0, tmp34) ;
/* tmp123 = */ auxcarg_14 (arg0, tmp34) ;
/* tmp124 = */ atspre_fprint_string (arg0, ATSstrcst("//\n")) ;
/* tmp125 = */ atspre_fprint_string (arg0, ATSstrcst("(* ****** ****** *)")) ;
/* tmp126 = */ atspre_fprint_newline (arg0) ;
/* tmp127 = */ aux_datype_d2cf_conlst_6 (arg0, arg1, arg2, arg3, tmp98) ;
/* tmp128 = */ atspre_fprint_string (arg0, ATSstrcst("//\n")) ;
/* tmp129 = */ atspre_fprint_string (arg0, ATSstrcst("(* ****** ****** *)")) ;
/* tmp33 = */ atspre_fprint_newline (arg0) ;
return /* (tmp33) */ ;
} /* end of [aux_datype_d2cf_4] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 7590(line=435, offs=1) -- 7927(line=453, offs=2)
*/
ATSstaticdec()
ats_void_type
auxcon1_17 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp135) ;
// ATSlocal_void (tmp136) ;
// ATSlocal_void (tmp137) ;
// ATSlocal_void (tmp138) ;
// ATSlocal_void (tmp139) ;
// ATSlocal_void (tmp140) ;
// ATSlocal_void (tmp141) ;
// ATSlocal_void (tmp142) ;
// ATSlocal_void (tmp143) ;
// ATSlocal_void (tmp144) ;
// ATSlocal_void (tmp145) ;
// ATSlocal_void (tmp146) ;

__ats_lab_auxcon1_17:
/* tmp136 = */ atspre_fprint_string (env0, ATSstrcst("extern\nfun")) ;
/* tmp137 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (env0, env1) ;
/* tmp138 = */ atspre_fprint_string (env0, ATSstrcst("\n")) ;
/* tmp139 = */ atspre_fprint_string (env0, env2) ;
/* tmp140 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp141 = */ atspre_fprint_string (env0, env3) ;
/* tmp142 = */ atspre_fprint_string (env0, ATSstrcst("$con")) ;
/* tmp143 = */ atspre_fprint_string (env0, ATSstrcst(": $d2ctype(")) ;
/* tmp144 = */ atspre_fprint_string (env0, env2) ;
/* tmp145 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp146 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
/* tmp135 = */ atspre_fprint_newline (env0) ;
return /* (tmp135) */ ;
} /* end of [auxcon1_17] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxcon1_17_closure_type ;

ats_void_type
auxcon1_17_clofun (ats_clo_ptr_type cloptr) {
auxcon1_17 (((auxcon1_17_closure_type*)cloptr)->closure_env_0, ((auxcon1_17_closure_type*)cloptr)->closure_env_1, ((auxcon1_17_closure_type*)cloptr)->closure_env_2, ((auxcon1_17_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxcon1_17_closure_init (auxcon1_17_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxcon1_17_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxcon1_17_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxcon1_17_closure_type *p_clo = ATS_MALLOC(sizeof(auxcon1_17_closure_type)) ;
auxcon1_17_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 7935(line=456, offs=1) -- 8274(line=474, offs=2)
*/
ATSstaticdec()
ats_void_type
auxlpar1_18 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp147) ;
// ATSlocal_void (tmp148) ;
// ATSlocal_void (tmp149) ;
// ATSlocal_void (tmp150) ;
// ATSlocal_void (tmp151) ;
// ATSlocal_void (tmp152) ;
// ATSlocal_void (tmp153) ;
// ATSlocal_void (tmp154) ;
// ATSlocal_void (tmp155) ;
// ATSlocal_void (tmp156) ;
// ATSlocal_void (tmp157) ;
// ATSlocal_void (tmp158) ;

__ats_lab_auxlpar1_18:
/* tmp148 = */ atspre_fprint_string (env0, ATSstrcst("extern\nfun")) ;
/* tmp149 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (env0, env1) ;
/* tmp150 = */ atspre_fprint_string (env0, ATSstrcst("\n")) ;
/* tmp151 = */ atspre_fprint_string (env0, env2) ;
/* tmp152 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp153 = */ atspre_fprint_string (env0, env3) ;
/* tmp154 = */ atspre_fprint_string (env0, ATSstrcst("$lpar")) ;
/* tmp155 = */ atspre_fprint_string (env0, ATSstrcst(": $d2ctype(")) ;
/* tmp156 = */ atspre_fprint_string (env0, env2) ;
/* tmp157 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp158 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
/* tmp147 = */ atspre_fprint_newline (env0) ;
return /* (tmp147) */ ;
} /* end of [auxlpar1_18] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxlpar1_18_closure_type ;

ats_void_type
auxlpar1_18_clofun (ats_clo_ptr_type cloptr) {
auxlpar1_18 (((auxlpar1_18_closure_type*)cloptr)->closure_env_0, ((auxlpar1_18_closure_type*)cloptr)->closure_env_1, ((auxlpar1_18_closure_type*)cloptr)->closure_env_2, ((auxlpar1_18_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxlpar1_18_closure_init (auxlpar1_18_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxlpar1_18_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxlpar1_18_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxlpar1_18_closure_type *p_clo = ATS_MALLOC(sizeof(auxlpar1_18_closure_type)) ;
auxlpar1_18_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 8282(line=477, offs=1) -- 8621(line=495, offs=2)
*/
ATSstaticdec()
ats_void_type
auxrpar1_19 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp159) ;
// ATSlocal_void (tmp160) ;
// ATSlocal_void (tmp161) ;
// ATSlocal_void (tmp162) ;
// ATSlocal_void (tmp163) ;
// ATSlocal_void (tmp164) ;
// ATSlocal_void (tmp165) ;
// ATSlocal_void (tmp166) ;
// ATSlocal_void (tmp167) ;
// ATSlocal_void (tmp168) ;
// ATSlocal_void (tmp169) ;
// ATSlocal_void (tmp170) ;

__ats_lab_auxrpar1_19:
/* tmp160 = */ atspre_fprint_string (env0, ATSstrcst("extern\nfun")) ;
/* tmp161 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (env0, env1) ;
/* tmp162 = */ atspre_fprint_string (env0, ATSstrcst("\n")) ;
/* tmp163 = */ atspre_fprint_string (env0, env2) ;
/* tmp164 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp165 = */ atspre_fprint_string (env0, env3) ;
/* tmp166 = */ atspre_fprint_string (env0, ATSstrcst("$rpar")) ;
/* tmp167 = */ atspre_fprint_string (env0, ATSstrcst(": $d2ctype(")) ;
/* tmp168 = */ atspre_fprint_string (env0, env2) ;
/* tmp169 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp170 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
/* tmp159 = */ atspre_fprint_newline (env0) ;
return /* (tmp159) */ ;
} /* end of [auxrpar1_19] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxrpar1_19_closure_type ;

ats_void_type
auxrpar1_19_clofun (ats_clo_ptr_type cloptr) {
auxrpar1_19 (((auxrpar1_19_closure_type*)cloptr)->closure_env_0, ((auxrpar1_19_closure_type*)cloptr)->closure_env_1, ((auxrpar1_19_closure_type*)cloptr)->closure_env_2, ((auxrpar1_19_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxrpar1_19_closure_init (auxrpar1_19_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxrpar1_19_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxrpar1_19_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxrpar1_19_closure_type *p_clo = ATS_MALLOC(sizeof(auxrpar1_19_closure_type)) ;
auxrpar1_19_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 8629(line=498, offs=1) -- 8988(line=520, offs=2)
*/
ATSstaticdec()
ats_void_type
auxsep1_n_20 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp171) ;
// ATSlocal_void (tmp172) ;
// ATSlocal_void (tmp173) ;
// ATSlocal_void (tmp174) ;
// ATSlocal_void (tmp175) ;
// ATSlocal_void (tmp176) ;
// ATSlocal_void (tmp177) ;
// ATSlocal_void (tmp178) ;
// ATSlocal_void (tmp179) ;
// ATSlocal_void (tmp180) ;
// ATSlocal_void (tmp181) ;
// ATSlocal_void (tmp182) ;
// ATSlocal_void (tmp183) ;

__ats_lab_auxsep1_n_20:
/* tmp172 = */ atspre_fprint_string (env0, ATSstrcst("extern\nfun")) ;
/* tmp173 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (env0, env1) ;
/* tmp174 = */ atspre_fprint_string (env0, ATSstrcst("\n")) ;
/* tmp175 = */ atspre_fprint_string (env0, env2) ;
/* tmp176 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp177 = */ atspre_fprint_string (env0, env3) ;
/* tmp178 = */ atspre_fprint_string (env0, ATSstrcst("$sep")) ;
/* tmp179 = */ atspre_fprint_int (env0, arg0) ;
/* tmp180 = */ atspre_fprint_string (env0, ATSstrcst(": $d2ctype(")) ;
/* tmp181 = */ atspre_fprint_string (env0, env2) ;
/* tmp182 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp183 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
/* tmp171 = */ atspre_fprint_newline (env0) ;
return /* (tmp171) */ ;
} /* end of [auxsep1_n_20] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxsep1_n_20_closure_type ;

ats_void_type
auxsep1_n_20_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxsep1_n_20 (((auxsep1_n_20_closure_type*)cloptr)->closure_env_0, ((auxsep1_n_20_closure_type*)cloptr)->closure_env_1, ((auxsep1_n_20_closure_type*)cloptr)->closure_env_2, ((auxsep1_n_20_closure_type*)cloptr)->closure_env_3, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxsep1_n_20_closure_init (auxsep1_n_20_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxsep1_n_20_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxsep1_n_20_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxsep1_n_20_closure_type *p_clo = ATS_MALLOC(sizeof(auxsep1_n_20_closure_type)) ;
auxsep1_n_20_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 8996(line=523, offs=1) -- 9336(line=541, offs=2)
*/
ATSstaticdec()
ats_void_type
auxarg1_n_21 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp184) ;
// ATSlocal_void (tmp185) ;
// ATSlocal_void (tmp186) ;
// ATSlocal_void (tmp187) ;
// ATSlocal_void (tmp188) ;
// ATSlocal_void (tmp189) ;
// ATSlocal_void (tmp190) ;
// ATSlocal_void (tmp191) ;
// ATSlocal_void (tmp192) ;
// ATSlocal_void (tmp193) ;
// ATSlocal_void (tmp194) ;
// ATSlocal_void (tmp195) ;
// ATSlocal_void (tmp196) ;

__ats_lab_auxarg1_n_21:
/* tmp185 = */ atspre_fprint_string (env0, ATSstrcst("extern\nfun")) ;
/* tmp186 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (env0, env1) ;
/* tmp187 = */ atspre_fprint_string (env0, ATSstrcst("\n")) ;
/* tmp188 = */ atspre_fprint_string (env0, env2) ;
/* tmp189 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp190 = */ atspre_fprint_string (env0, env3) ;
/* tmp191 = */ atspre_fprint_string (env0, ATSstrcst("$arg")) ;
/* tmp192 = */ atspre_fprint_int (env0, arg0) ;
/* tmp193 = */ atspre_fprint_string (env0, ATSstrcst(": $d2ctype(")) ;
/* tmp194 = */ atspre_fprint_string (env0, env2) ;
/* tmp195 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp196 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
/* tmp184 = */ atspre_fprint_newline (env0) ;
return /* (tmp184) */ ;
} /* end of [auxarg1_n_21] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxarg1_n_21_closure_type ;

ats_void_type
auxarg1_n_21_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxarg1_n_21 (((auxarg1_n_21_closure_type*)cloptr)->closure_env_0, ((auxarg1_n_21_closure_type*)cloptr)->closure_env_1, ((auxarg1_n_21_closure_type*)cloptr)->closure_env_2, ((auxarg1_n_21_closure_type*)cloptr)->closure_env_3, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxarg1_n_21_closure_init (auxarg1_n_21_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxarg1_n_21_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxarg1_n_21_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxarg1_n_21_closure_type *p_clo = ATS_MALLOC(sizeof(auxarg1_n_21_closure_type)) ;
auxarg1_n_21_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 9344(line=544, offs=1) -- 9564(line=557, offs=2)
*/
ATSstaticdec()
ats_void_type
auxcon2_22 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp197) ;
// ATSlocal_void (tmp198) ;
// ATSlocal_void (tmp199) ;
// ATSlocal_void (tmp200) ;
// ATSlocal_void (tmp201) ;
// ATSlocal_void (tmp202) ;
// ATSlocal_void (tmp203) ;
// ATSlocal_void (tmp204) ;

__ats_lab_auxcon2_22:
/* tmp198 = */ atspre_fprint_string (env0, ATSstrcst("val () = ")) ;
/* tmp199 = */ atspre_fprint_string (env0, env2) ;
/* tmp200 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp201 = */ atspre_fprint_string (env0, env3) ;
/* tmp202 = */ atspre_fprint_string (env0, ATSstrcst("$con")) ;
/* tmp203 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp204 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0)")) ;
/* tmp197 = */ atspre_fprint_newline (env0) ;
return /* (tmp197) */ ;
} /* end of [auxcon2_22] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxcon2_22_closure_type ;

ats_void_type
auxcon2_22_clofun (ats_clo_ptr_type cloptr) {
auxcon2_22 (((auxcon2_22_closure_type*)cloptr)->closure_env_0, ((auxcon2_22_closure_type*)cloptr)->closure_env_1, ((auxcon2_22_closure_type*)cloptr)->closure_env_2, ((auxcon2_22_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxcon2_22_closure_init (auxcon2_22_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxcon2_22_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxcon2_22_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxcon2_22_closure_type *p_clo = ATS_MALLOC(sizeof(auxcon2_22_closure_type)) ;
auxcon2_22_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 9569(line=559, offs=1) -- 9796(line=574, offs=2)
*/
ATSstaticdec()
ats_void_type
auxlpar2_23 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp205) ;
// ATSlocal_void (tmp206) ;
// ATSlocal_void (tmp207) ;
// ATSlocal_void (tmp208) ;
// ATSlocal_void (tmp209) ;
// ATSlocal_void (tmp210) ;
// ATSlocal_void (tmp211) ;
// ATSlocal_void (tmp212) ;

__ats_lab_auxlpar2_23:
/* tmp206 = */ atspre_fprint_string (env0, ATSstrcst("val () = ")) ;
/* tmp207 = */ atspre_fprint_string (env0, env2) ;
/* tmp208 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp209 = */ atspre_fprint_string (env0, env3) ;
/* tmp210 = */ atspre_fprint_string (env0, ATSstrcst("$lpar")) ;
/* tmp211 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp212 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0)")) ;
/* tmp205 = */ atspre_fprint_newline (env0) ;
return /* (tmp205) */ ;
} /* end of [auxlpar2_23] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxlpar2_23_closure_type ;

ats_void_type
auxlpar2_23_clofun (ats_clo_ptr_type cloptr) {
auxlpar2_23 (((auxlpar2_23_closure_type*)cloptr)->closure_env_0, ((auxlpar2_23_closure_type*)cloptr)->closure_env_1, ((auxlpar2_23_closure_type*)cloptr)->closure_env_2, ((auxlpar2_23_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxlpar2_23_closure_init (auxlpar2_23_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxlpar2_23_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxlpar2_23_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxlpar2_23_closure_type *p_clo = ATS_MALLOC(sizeof(auxlpar2_23_closure_type)) ;
auxlpar2_23_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 9804(line=577, offs=1) -- 10031(line=592, offs=2)
*/
ATSstaticdec()
ats_void_type
auxrpar2_24 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp213) ;
// ATSlocal_void (tmp214) ;
// ATSlocal_void (tmp215) ;
// ATSlocal_void (tmp216) ;
// ATSlocal_void (tmp217) ;
// ATSlocal_void (tmp218) ;
// ATSlocal_void (tmp219) ;
// ATSlocal_void (tmp220) ;

__ats_lab_auxrpar2_24:
/* tmp214 = */ atspre_fprint_string (env0, ATSstrcst("val () = ")) ;
/* tmp215 = */ atspre_fprint_string (env0, env2) ;
/* tmp216 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp217 = */ atspre_fprint_string (env0, env3) ;
/* tmp218 = */ atspre_fprint_string (env0, ATSstrcst("$rpar")) ;
/* tmp219 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp220 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0)")) ;
/* tmp213 = */ atspre_fprint_newline (env0) ;
return /* (tmp213) */ ;
} /* end of [auxrpar2_24] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxrpar2_24_closure_type ;

ats_void_type
auxrpar2_24_clofun (ats_clo_ptr_type cloptr) {
auxrpar2_24 (((auxrpar2_24_closure_type*)cloptr)->closure_env_0, ((auxrpar2_24_closure_type*)cloptr)->closure_env_1, ((auxrpar2_24_closure_type*)cloptr)->closure_env_2, ((auxrpar2_24_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxrpar2_24_closure_init (auxrpar2_24_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxrpar2_24_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxrpar2_24_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxrpar2_24_closure_type *p_clo = ATS_MALLOC(sizeof(auxrpar2_24_closure_type)) ;
auxrpar2_24_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 10039(line=595, offs=1) -- 10267(line=610, offs=2)
*/
ATSstaticdec()
ats_void_type
auxsep2_n_25 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp221) ;
// ATSlocal_void (tmp222) ;
// ATSlocal_void (tmp223) ;
// ATSlocal_void (tmp224) ;
// ATSlocal_void (tmp225) ;
// ATSlocal_void (tmp226) ;
// ATSlocal_void (tmp227) ;
// ATSlocal_void (tmp228) ;
// ATSlocal_void (tmp229) ;

__ats_lab_auxsep2_n_25:
/* tmp222 = */ atspre_fprint_string (env0, ATSstrcst("val () = ")) ;
/* tmp223 = */ atspre_fprint_string (env0, env2) ;
/* tmp224 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp225 = */ atspre_fprint_string (env0, env3) ;
/* tmp226 = */ atspre_fprint_string (env0, ATSstrcst("$sep")) ;
/* tmp227 = */ atspre_fprint_int (env0, arg0) ;
/* tmp228 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp229 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0)")) ;
/* tmp221 = */ atspre_fprint_newline (env0) ;
return /* (tmp221) */ ;
} /* end of [auxsep2_n_25] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxsep2_n_25_closure_type ;

ats_void_type
auxsep2_n_25_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxsep2_n_25 (((auxsep2_n_25_closure_type*)cloptr)->closure_env_0, ((auxsep2_n_25_closure_type*)cloptr)->closure_env_1, ((auxsep2_n_25_closure_type*)cloptr)->closure_env_2, ((auxsep2_n_25_closure_type*)cloptr)->closure_env_3, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxsep2_n_25_closure_init (auxsep2_n_25_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxsep2_n_25_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxsep2_n_25_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxsep2_n_25_closure_type *p_clo = ATS_MALLOC(sizeof(auxsep2_n_25_closure_type)) ;
auxsep2_n_25_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 10272(line=612, offs=1) -- 10500(line=627, offs=2)
*/
ATSstaticdec()
ats_void_type
auxarg2_n_26 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp230) ;
// ATSlocal_void (tmp231) ;
// ATSlocal_void (tmp232) ;
// ATSlocal_void (tmp233) ;
// ATSlocal_void (tmp234) ;
// ATSlocal_void (tmp235) ;
// ATSlocal_void (tmp236) ;
// ATSlocal_void (tmp237) ;
// ATSlocal_void (tmp238) ;

__ats_lab_auxarg2_n_26:
/* tmp231 = */ atspre_fprint_string (env0, ATSstrcst("val () = ")) ;
/* tmp232 = */ atspre_fprint_string (env0, env2) ;
/* tmp233 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp234 = */ atspre_fprint_string (env0, env3) ;
/* tmp235 = */ atspre_fprint_string (env0, ATSstrcst("$arg")) ;
/* tmp236 = */ atspre_fprint_int (env0, arg0) ;
/* tmp237 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (env0, env1) ;
/* tmp238 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0)")) ;
/* tmp230 = */ atspre_fprint_newline (env0) ;
return /* (tmp230) */ ;
} /* end of [auxarg2_n_26] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxarg2_n_26_closure_type ;

ats_void_type
auxarg2_n_26_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxarg2_n_26 (((auxarg2_n_26_closure_type*)cloptr)->closure_env_0, ((auxarg2_n_26_closure_type*)cloptr)->closure_env_1, ((auxarg2_n_26_closure_type*)cloptr)->closure_env_2, ((auxarg2_n_26_closure_type*)cloptr)->closure_env_3, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxarg2_n_26_closure_init (auxarg2_n_26_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxarg2_n_26_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxarg2_n_26_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxarg2_n_26_closure_type *p_clo = ATS_MALLOC(sizeof(auxarg2_n_26_closure_type)) ;
auxarg2_n_26_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 10508(line=630, offs=1) -- 10745(line=649, offs=2)
*/
ATSstaticdec()
ats_void_type
auxbody2_27 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0, ats_int_type arg1) {
/* local vardec */
// ATSlocal_void (tmp239) ;
ATSlocal (ats_bool_type, tmp240) ;
// ATSlocal_void (tmp241) ;
ATSlocal (ats_bool_type, tmp242) ;
// ATSlocal_void (tmp243) ;
ATSlocal (ats_int_type, tmp244) ;
ATSlocal (ats_int_type, tmp245) ;

__ats_lab_auxbody2_27:
tmp240 = atspre_lt_int_int (arg1, env4) ;
if (tmp240) {
tmp242 = atspre_gt_int_int (arg1, arg0) ;
if (tmp242) {
/* tmp241 = */ auxsep2_n_25 (env0, env1, env2, env3, arg1) ;
} else {
/* empty */
} /* end of [if] */
tmp244 = atspre_add_int_int (arg1, 1) ;
/* tmp243 = */ auxarg2_n_26 (env0, env1, env2, env3, tmp244) ;
tmp245 = atspre_add_int_int (arg1, 1) ;
arg0 = arg0 ;
arg1 = tmp245 ;
goto __ats_lab_auxbody2_27 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp239) */ ;
} /* end of [auxbody2_27] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
ats_int_type closure_env_4 ;
} auxbody2_27_closure_type ;

ats_void_type
auxbody2_27_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0, ats_int_type arg1) {
auxbody2_27 (((auxbody2_27_closure_type*)cloptr)->closure_env_0, ((auxbody2_27_closure_type*)cloptr)->closure_env_1, ((auxbody2_27_closure_type*)cloptr)->closure_env_2, ((auxbody2_27_closure_type*)cloptr)->closure_env_3, ((auxbody2_27_closure_type*)cloptr)->closure_env_4, arg0, arg1) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxbody2_27_closure_init (auxbody2_27_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxbody2_27_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
p_clo->closure_env_4 = env4 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxbody2_27_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
auxbody2_27_closure_type *p_clo = ATS_MALLOC(sizeof(auxbody2_27_closure_type)) ;
auxbody2_27_closure_init (p_clo, env0, env1, env2, env3, env4) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 10777(line=652, offs=1) -- 11053(line=670, offs=2)
*/
ATSstaticdec()
ats_void_type
auxcon3_28 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp246) ;
// ATSlocal_void (tmp247) ;
// ATSlocal_void (tmp248) ;
// ATSlocal_void (tmp249) ;
// ATSlocal_void (tmp250) ;
// ATSlocal_void (tmp251) ;
// ATSlocal_void (tmp252) ;
// ATSlocal_void (tmp253) ;
// ATSlocal_void (tmp254) ;
// ATSlocal_void (tmp255) ;
// ATSlocal_void (tmp256) ;

__ats_lab_auxcon3_28:
/* tmp247 = */ atspre_fprint_string (env0, ATSstrcst("implement")) ;
/* tmp248 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (env0, env1) ;
/* tmp249 = */ atspre_fprint_newline (env0) ;
/* tmp250 = */ atspre_fprint_string (env0, env2) ;
/* tmp251 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp252 = */ atspre_fprint_string (env0, env3) ;
/* tmp253 = */ atspre_fprint_string (env0, ATSstrcst("$con(out, _) = ")) ;
/* tmp254 = */ atspre_fprint_string (env0, ATSstrcst("fprint(out, \"")) ;
/* tmp255 = */ atspre_fprint_string (env0, env3) ;
/* tmp256 = */ atspre_fprint_string (env0, ATSstrcst("\")")) ;
/* tmp246 = */ atspre_fprint_newline (env0) ;
return /* (tmp246) */ ;
} /* end of [auxcon3_28] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxcon3_28_closure_type ;

ats_void_type
auxcon3_28_clofun (ats_clo_ptr_type cloptr) {
auxcon3_28 (((auxcon3_28_closure_type*)cloptr)->closure_env_0, ((auxcon3_28_closure_type*)cloptr)->closure_env_1, ((auxcon3_28_closure_type*)cloptr)->closure_env_2, ((auxcon3_28_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxcon3_28_closure_init (auxcon3_28_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxcon3_28_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxcon3_28_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxcon3_28_closure_type *p_clo = ATS_MALLOC(sizeof(auxcon3_28_closure_type)) ;
auxcon3_28_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 11084(line=673, offs=1) -- 11325(line=688, offs=2)
*/
ATSstaticdec()
ats_void_type
auxlpar3_29 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp257) ;
// ATSlocal_void (tmp258) ;
// ATSlocal_void (tmp259) ;
// ATSlocal_void (tmp260) ;
// ATSlocal_void (tmp261) ;
// ATSlocal_void (tmp262) ;
// ATSlocal_void (tmp263) ;
// ATSlocal_void (tmp264) ;
// ATSlocal_void (tmp265) ;
// ATSlocal_void (tmp266) ;

__ats_lab_auxlpar3_29:
/* tmp258 = */ atspre_fprint_string (env0, ATSstrcst("implement")) ;
/* tmp259 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (env0, env1) ;
/* tmp260 = */ atspre_fprint_newline (env0) ;
/* tmp261 = */ atspre_fprint_string (env0, env2) ;
/* tmp262 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp263 = */ atspre_fprint_string (env0, env3) ;
/* tmp264 = */ atspre_fprint_string (env0, ATSstrcst("$lpar(out, _) = ")) ;
/* tmp265 = */ atspre_fprint_string (env0, env2) ;
/* tmp266 = */ atspre_fprint_string (env0, ATSstrcst("$lpar(out)")) ;
/* tmp257 = */ atspre_fprint_newline (env0) ;
return /* (tmp257) */ ;
} /* end of [auxlpar3_29] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxlpar3_29_closure_type ;

ats_void_type
auxlpar3_29_clofun (ats_clo_ptr_type cloptr) {
auxlpar3_29 (((auxlpar3_29_closure_type*)cloptr)->closure_env_0, ((auxlpar3_29_closure_type*)cloptr)->closure_env_1, ((auxlpar3_29_closure_type*)cloptr)->closure_env_2, ((auxlpar3_29_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxlpar3_29_closure_init (auxlpar3_29_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxlpar3_29_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxlpar3_29_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxlpar3_29_closure_type *p_clo = ATS_MALLOC(sizeof(auxlpar3_29_closure_type)) ;
auxlpar3_29_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 11357(line=691, offs=1) -- 11598(line=706, offs=2)
*/
ATSstaticdec()
ats_void_type
auxrpar3_30 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
/* local vardec */
// ATSlocal_void (tmp267) ;
// ATSlocal_void (tmp268) ;
// ATSlocal_void (tmp269) ;
// ATSlocal_void (tmp270) ;
// ATSlocal_void (tmp271) ;
// ATSlocal_void (tmp272) ;
// ATSlocal_void (tmp273) ;
// ATSlocal_void (tmp274) ;
// ATSlocal_void (tmp275) ;
// ATSlocal_void (tmp276) ;

__ats_lab_auxrpar3_30:
/* tmp268 = */ atspre_fprint_string (env0, ATSstrcst("implement")) ;
/* tmp269 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (env0, env1) ;
/* tmp270 = */ atspre_fprint_newline (env0) ;
/* tmp271 = */ atspre_fprint_string (env0, env2) ;
/* tmp272 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp273 = */ atspre_fprint_string (env0, env3) ;
/* tmp274 = */ atspre_fprint_string (env0, ATSstrcst("$rpar(out, _) = ")) ;
/* tmp275 = */ atspre_fprint_string (env0, env2) ;
/* tmp276 = */ atspre_fprint_string (env0, ATSstrcst("$rpar(out)")) ;
/* tmp267 = */ atspre_fprint_newline (env0) ;
return /* (tmp267) */ ;
} /* end of [auxrpar3_30] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxrpar3_30_closure_type ;

ats_void_type
auxrpar3_30_clofun (ats_clo_ptr_type cloptr) {
auxrpar3_30 (((auxrpar3_30_closure_type*)cloptr)->closure_env_0, ((auxrpar3_30_closure_type*)cloptr)->closure_env_1, ((auxrpar3_30_closure_type*)cloptr)->closure_env_2, ((auxrpar3_30_closure_type*)cloptr)->closure_env_3) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxrpar3_30_closure_init (auxrpar3_30_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxrpar3_30_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxrpar3_30_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxrpar3_30_closure_type *p_clo = ATS_MALLOC(sizeof(auxrpar3_30_closure_type)) ;
auxrpar3_30_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 11630(line=709, offs=1) -- 11877(line=724, offs=2)
*/
ATSstaticdec()
ats_void_type
auxsep3_n_31 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp277) ;
// ATSlocal_void (tmp278) ;
// ATSlocal_void (tmp279) ;
// ATSlocal_void (tmp280) ;
// ATSlocal_void (tmp281) ;
// ATSlocal_void (tmp282) ;
// ATSlocal_void (tmp283) ;
// ATSlocal_void (tmp284) ;
// ATSlocal_void (tmp285) ;
// ATSlocal_void (tmp286) ;
// ATSlocal_void (tmp287) ;
// ATSlocal_void (tmp288) ;

__ats_lab_auxsep3_n_31:
/* tmp278 = */ atspre_fprint_string (env0, ATSstrcst("implement")) ;
/* tmp279 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (env0, env1) ;
/* tmp280 = */ atspre_fprint_newline (env0) ;
/* tmp281 = */ atspre_fprint_string (env0, env2) ;
/* tmp282 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp283 = */ atspre_fprint_string (env0, env3) ;
/* tmp284 = */ atspre_fprint_string (env0, ATSstrcst("$sep")) ;
/* tmp285 = */ atspre_fprint_int (env0, arg0) ;
/* tmp286 = */ atspre_fprint_string (env0, ATSstrcst("(out, _) = ")) ;
/* tmp287 = */ atspre_fprint_string (env0, env2) ;
/* tmp288 = */ atspre_fprint_string (env0, ATSstrcst("$sep<>(out)")) ;
/* tmp277 = */ atspre_fprint_newline (env0) ;
return /* (tmp277) */ ;
} /* end of [auxsep3_n_31] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
} auxsep3_n_31_closure_type ;

ats_void_type
auxsep3_n_31_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxsep3_n_31 (((auxsep3_n_31_closure_type*)cloptr)->closure_env_0, ((auxsep3_n_31_closure_type*)cloptr)->closure_env_1, ((auxsep3_n_31_closure_type*)cloptr)->closure_env_2, ((auxsep3_n_31_closure_type*)cloptr)->closure_env_3, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxsep3_n_31_closure_init (auxsep3_n_31_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxsep3_n_31_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxsep3_n_31_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3) {
auxsep3_n_31_closure_type *p_clo = ATS_MALLOC(sizeof(auxsep3_n_31_closure_type)) ;
auxsep3_n_31_closure_init (p_clo, env0, env1, env2, env3) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 11962(line=733, offs=1) -- 12266(line=752, offs=2)
*/
ATSstaticdec()
ats_void_type
aux_33 (ats_ptr_type env0, ats_int_type env1, ats_int_type env2, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp290) ;
ATSlocal (ats_bool_type, tmp291) ;
// ATSlocal_void (tmp292) ;
ATSlocal (ats_bool_type, tmp293) ;
// ATSlocal_void (tmp294) ;
ATSlocal (ats_bool_type, tmp295) ;
// ATSlocal_void (tmp296) ;
// ATSlocal_void (tmp297) ;
ATSlocal (ats_bool_type, tmp298) ;
ATSlocal (ats_int_type, tmp299) ;

__ats_lab_aux_33:
tmp291 = atspre_lte_int_int (arg0, env1) ;
if (tmp291) {
tmp293 = atspre_gt_int_int (arg0, 1) ;
if (tmp293) {
/* tmp292 = */ atspre_fprint_string (env0, ATSstrcst(", ")) ;
} else {
/* empty */
} /* end of [if] */
tmp295 = atspre_eq_int_int (arg0, env2) ;
if (tmp295) {
/* tmp296 = */ atspre_fprint_string (env0, ATSstrcst("arg")) ;
/* tmp294 = */ atspre_fprint_int (env0, env2) ;
} else {
/* empty */
} /* end of [if] */
tmp298 = atspre_neq_int_int (arg0, env2) ;
if (tmp298) {
/* tmp297 = */ atspre_fprint_string (env0, ATSstrcst("_")) ;
} else {
/* empty */
} /* end of [if] */
tmp299 = atspre_add_int_int (arg0, 1) ;
arg0 = tmp299 ;
goto __ats_lab_aux_33 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp290) */ ;
} /* end of [aux_33] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_int_type closure_env_1 ;
ats_int_type closure_env_2 ;
} aux_33_closure_type ;

ats_void_type
aux_33_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
aux_33 (((aux_33_closure_type*)cloptr)->closure_env_0, ((aux_33_closure_type*)cloptr)->closure_env_1, ((aux_33_closure_type*)cloptr)->closure_env_2, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
aux_33_closure_init (aux_33_closure_type *p_clo, ats_ptr_type env0, ats_int_type env1, ats_int_type env2) {
p_clo->closure_fun = (ats_fun_ptr_type)&aux_33_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
return ;
} /* end of function */

ats_clo_ptr_type
aux_33_closure_make (ats_ptr_type env0, ats_int_type env1, ats_int_type env2) {
aux_33_closure_type *p_clo = ATS_MALLOC(sizeof(aux_33_closure_type)) ;
aux_33_closure_init (p_clo, env0, env1, env2) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 11910(line=727, offs=1) -- 12329(line=756, offs=4)
*/
ATSstaticdec()
ats_void_type
auxpat3_n_32 (ats_ptr_type env0, ats_ptr_type env1, ats_int_type env2, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp289) ;
// ATSlocal_void (tmp300) ;
// ATSlocal_void (tmp301) ;
// ATSlocal_void (tmp302) ;

__ats_lab_auxpat3_n_32:
/* tmp300 = */ atspre_fprint_string (env0, env1) ;
/* tmp301 = */ atspre_fprint_string (env0, ATSstrcst("(")) ;
/* tmp302 = */ aux_33 (env0, env2, arg0, 1) ;
/* tmp289 = */ atspre_fprint_string (env0, ATSstrcst(")")) ;
return /* (tmp289) */ ;
} /* end of [auxpat3_n_32] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_int_type closure_env_2 ;
} auxpat3_n_32_closure_type ;

ats_void_type
auxpat3_n_32_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxpat3_n_32 (((auxpat3_n_32_closure_type*)cloptr)->closure_env_0, ((auxpat3_n_32_closure_type*)cloptr)->closure_env_1, ((auxpat3_n_32_closure_type*)cloptr)->closure_env_2, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxpat3_n_32_closure_init (auxpat3_n_32_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_int_type env2) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxpat3_n_32_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxpat3_n_32_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_int_type env2) {
auxpat3_n_32_closure_type *p_clo = ATS_MALLOC(sizeof(auxpat3_n_32_closure_type)) ;
auxpat3_n_32_closure_init (p_clo, env0, env1, env2) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 12359(line=759, offs=1) -- 12732(line=783, offs=2)
*/
ATSstaticdec()
ats_void_type
auxarg3_n_34 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp303) ;
// ATSlocal_void (tmp304) ;
// ATSlocal_void (tmp305) ;
// ATSlocal_void (tmp306) ;
// ATSlocal_void (tmp307) ;
// ATSlocal_void (tmp308) ;
// ATSlocal_void (tmp309) ;
// ATSlocal_void (tmp310) ;
// ATSlocal_void (tmp311) ;
// ATSlocal_void (tmp312) ;
// ATSlocal_void (tmp313) ;
// ATSlocal_void (tmp314) ;
// ATSlocal_void (tmp315) ;
// ATSlocal_void (tmp316) ;
// ATSlocal_void (tmp317) ;
// ATSlocal_void (tmp318) ;
// ATSlocal_void (tmp319) ;
// ATSlocal_void (tmp320) ;

__ats_lab_auxarg3_n_34:
/* tmp304 = */ atspre_fprint_string (env0, ATSstrcst("implement")) ;
/* tmp305 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (env0, env1) ;
/* tmp306 = */ atspre_fprint_newline (env0) ;
/* tmp307 = */ atspre_fprint_string (env0, env2) ;
/* tmp308 = */ atspre_fprint_string (env0, ATSstrcst("$")) ;
/* tmp309 = */ atspre_fprint_string (env0, env3) ;
/* tmp310 = */ atspre_fprint_string (env0, ATSstrcst("$arg")) ;
/* tmp311 = */ atspre_fprint_int (env0, arg0) ;
/* tmp312 = */ atspre_fprint_string (env0, ATSstrcst("(out, arg0) =")) ;
/* tmp313 = */ atspre_fprint_newline (env0) ;
/* tmp314 = */ atspre_fprint_string (env0, ATSstrcst("  let val-")) ;
/* tmp315 = */ auxpat3_n_32 (env0, env3, env4, arg0) ;
/* tmp316 = */ atspre_fprint_string (env0, ATSstrcst(" = arg0 in ")) ;
/* tmp317 = */ atspre_fprint_string (env0, env2) ;
/* tmp318 = */ atspre_fprint_string (env0, ATSstrcst("$carg(out, arg")) ;
/* tmp319 = */ atspre_fprint_int (env0, arg0) ;
/* tmp320 = */ atspre_fprint_string (env0, ATSstrcst(") end")) ;
/* tmp303 = */ atspre_fprint_newline (env0) ;
return /* (tmp303) */ ;
} /* end of [auxarg3_n_34] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
ats_int_type closure_env_4 ;
} auxarg3_n_34_closure_type ;

ats_void_type
auxarg3_n_34_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
auxarg3_n_34 (((auxarg3_n_34_closure_type*)cloptr)->closure_env_0, ((auxarg3_n_34_closure_type*)cloptr)->closure_env_1, ((auxarg3_n_34_closure_type*)cloptr)->closure_env_2, ((auxarg3_n_34_closure_type*)cloptr)->closure_env_3, ((auxarg3_n_34_closure_type*)cloptr)->closure_env_4, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxarg3_n_34_closure_init (auxarg3_n_34_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxarg3_n_34_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
p_clo->closure_env_4 = env4 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxarg3_n_34_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
auxarg3_n_34_closure_type *p_clo = ATS_MALLOC(sizeof(auxarg3_n_34_closure_type)) ;
auxarg3_n_34_closure_init (p_clo, env0, env1, env2, env3, env4) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 12883(line=793, offs=7) -- 12955(line=793, offs=79)
*/
ATSstaticdec()
ats_void_type
loop_35 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp325) ;
ATSlocal (ats_bool_type, tmp326) ;
// ATSlocal_void (tmp327) ;
ATSlocal (ats_int_type, tmp328) ;

__ats_lab_loop_35:
tmp326 = atspre_lt_int_int (arg0, env4) ;
if (tmp326) {
/* tmp327 = */ auxsep1_n_20 (env0, env1, env2, env3, arg0) ;
tmp328 = atspre_add_int_int (arg0, 1) ;
arg0 = tmp328 ;
goto __ats_lab_loop_35 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp325) */ ;
} /* end of [loop_35] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
ats_int_type closure_env_4 ;
} loop_35_closure_type ;

ats_void_type
loop_35_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
loop_35 (((loop_35_closure_type*)cloptr)->closure_env_0, ((loop_35_closure_type*)cloptr)->closure_env_1, ((loop_35_closure_type*)cloptr)->closure_env_2, ((loop_35_closure_type*)cloptr)->closure_env_3, ((loop_35_closure_type*)cloptr)->closure_env_4, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
loop_35_closure_init (loop_35_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
p_clo->closure_fun = (ats_fun_ptr_type)&loop_35_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
p_clo->closure_env_4 = env4 ;
return ;
} /* end of function */

ats_clo_ptr_type
loop_35_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
loop_35_closure_type *p_clo = ATS_MALLOC(sizeof(loop_35_closure_type)) ;
loop_35_closure_init (p_clo, env0, env1, env2, env3, env4) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 12989(line=797, offs=7) -- 13062(line=797, offs=80)
*/
ATSstaticdec()
ats_void_type
loop_36 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp330) ;
ATSlocal (ats_bool_type, tmp331) ;
// ATSlocal_void (tmp332) ;
ATSlocal (ats_int_type, tmp333) ;

__ats_lab_loop_36:
tmp331 = atspre_lte_int_int (arg0, env4) ;
if (tmp331) {
/* tmp332 = */ auxarg1_n_21 (env0, env1, env2, env3, arg0) ;
tmp333 = atspre_add_int_int (arg0, 1) ;
arg0 = tmp333 ;
goto __ats_lab_loop_36 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp330) */ ;
} /* end of [loop_36] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
ats_int_type closure_env_4 ;
} loop_36_closure_type ;

ats_void_type
loop_36_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
loop_36 (((loop_36_closure_type*)cloptr)->closure_env_0, ((loop_36_closure_type*)cloptr)->closure_env_1, ((loop_36_closure_type*)cloptr)->closure_env_2, ((loop_36_closure_type*)cloptr)->closure_env_3, ((loop_36_closure_type*)cloptr)->closure_env_4, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
loop_36_closure_init (loop_36_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
p_clo->closure_fun = (ats_fun_ptr_type)&loop_36_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
p_clo->closure_env_4 = env4 ;
return ;
} /* end of function */

ats_clo_ptr_type
loop_36_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
loop_36_closure_type *p_clo = ATS_MALLOC(sizeof(loop_36_closure_type)) ;
loop_36_closure_init (p_clo, env0, env1, env2, env3, env4) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 13515(line=824, offs=7) -- 13587(line=824, offs=79)
*/
ATSstaticdec()
ats_void_type
loop_37 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp355) ;
ATSlocal (ats_bool_type, tmp356) ;
// ATSlocal_void (tmp357) ;
ATSlocal (ats_int_type, tmp358) ;

__ats_lab_loop_37:
tmp356 = atspre_lt_int_int (arg0, env4) ;
if (tmp356) {
/* tmp357 = */ auxsep3_n_31 (env0, env1, env2, env3, arg0) ;
tmp358 = atspre_add_int_int (arg0, 1) ;
arg0 = tmp358 ;
goto __ats_lab_loop_37 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp355) */ ;
} /* end of [loop_37] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
ats_int_type closure_env_4 ;
} loop_37_closure_type ;

ats_void_type
loop_37_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
loop_37 (((loop_37_closure_type*)cloptr)->closure_env_0, ((loop_37_closure_type*)cloptr)->closure_env_1, ((loop_37_closure_type*)cloptr)->closure_env_2, ((loop_37_closure_type*)cloptr)->closure_env_3, ((loop_37_closure_type*)cloptr)->closure_env_4, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
loop_37_closure_init (loop_37_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
p_clo->closure_fun = (ats_fun_ptr_type)&loop_37_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
p_clo->closure_env_4 = env4 ;
return ;
} /* end of function */

ats_clo_ptr_type
loop_37_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
loop_37_closure_type *p_clo = ATS_MALLOC(sizeof(loop_37_closure_type)) ;
loop_37_closure_init (p_clo, env0, env1, env2, env3, env4) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 13621(line=828, offs=7) -- 13694(line=828, offs=80)
*/
ATSstaticdec()
ats_void_type
loop_38 (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4, ats_int_type arg0) {
/* local vardec */
// ATSlocal_void (tmp360) ;
ATSlocal (ats_bool_type, tmp361) ;
// ATSlocal_void (tmp362) ;
ATSlocal (ats_int_type, tmp363) ;

__ats_lab_loop_38:
tmp361 = atspre_lte_int_int (arg0, env4) ;
if (tmp361) {
/* tmp362 = */ auxarg3_n_34 (env0, env1, env2, env3, env4, arg0) ;
tmp363 = atspre_add_int_int (arg0, 1) ;
arg0 = tmp363 ;
goto __ats_lab_loop_38 ; // tail call
} else {
/* empty */
} /* end of [if] */
return /* (tmp360) */ ;
} /* end of [loop_38] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
ats_ptr_type closure_env_1 ;
ats_ptr_type closure_env_2 ;
ats_ptr_type closure_env_3 ;
ats_int_type closure_env_4 ;
} loop_38_closure_type ;

ats_void_type
loop_38_clofun (ats_clo_ptr_type cloptr, ats_int_type arg0) {
loop_38 (((loop_38_closure_type*)cloptr)->closure_env_0, ((loop_38_closure_type*)cloptr)->closure_env_1, ((loop_38_closure_type*)cloptr)->closure_env_2, ((loop_38_closure_type*)cloptr)->closure_env_3, ((loop_38_closure_type*)cloptr)->closure_env_4, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
loop_38_closure_init (loop_38_closure_type *p_clo, ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
p_clo->closure_fun = (ats_fun_ptr_type)&loop_38_clofun ;
p_clo->closure_env_0 = env0 ;
p_clo->closure_env_1 = env1 ;
p_clo->closure_env_2 = env2 ;
p_clo->closure_env_3 = env3 ;
p_clo->closure_env_4 = env4 ;
return ;
} /* end of function */

ats_clo_ptr_type
loop_38_closure_make (ats_ptr_type env0, ats_ptr_type env1, ats_ptr_type env2, ats_ptr_type env3, ats_int_type env4) {
loop_38_closure_type *p_clo = ATS_MALLOC(sizeof(loop_38_closure_type)) ;
loop_38_closure_init (p_clo, env0, env1, env2, env3, env4) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 7328(line=417, offs=1) -- 13719(line=833, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_datype_d2cf_con_5 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) {
/* local vardec */
// ATSlocal_void (tmp130) ;
ATSlocal (ats_ptr_type, tmp131) ;
ATSlocal (ats_ptr_type, tmp132) ;
ATSlocal (ats_ptr_type, tmp133) ;
ATSlocal (ats_int_type, tmp134) ;
// ATSlocal_void (tmp321) ;
// ATSlocal_void (tmp322) ;
// ATSlocal_void (tmp323) ;
// ATSlocal_void (tmp324) ;
// ATSlocal_void (tmp329) ;
// ATSlocal_void (tmp334) ;
// ATSlocal_void (tmp335) ;
// ATSlocal_void (tmp336) ;
// ATSlocal_void (tmp337) ;
// ATSlocal_void (tmp338) ;
// ATSlocal_void (tmp339) ;
// ATSlocal_void (tmp340) ;
// ATSlocal_void (tmp341) ;
// ATSlocal_void (tmp342) ;
// ATSlocal_void (tmp343) ;
// ATSlocal_void (tmp344) ;
// ATSlocal_void (tmp345) ;
// ATSlocal_void (tmp346) ;
// ATSlocal_void (tmp347) ;
// ATSlocal_void (tmp348) ;
// ATSlocal_void (tmp349) ;
// ATSlocal_void (tmp350) ;
// ATSlocal_void (tmp351) ;
// ATSlocal_void (tmp352) ;
// ATSlocal_void (tmp353) ;
// ATSlocal_void (tmp354) ;
// ATSlocal_void (tmp359) ;

__ats_lab_aux_datype_d2cf_con_5:
tmp131 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_name (arg3) ;
tmp132 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_type (arg3) ;
tmp133 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_name (arg4) ;
tmp134 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_arity_real (arg4) ;
/* tmp321 = */ atspre_fprint_string (arg0, ATSstrcst("//\n")) ;
/* tmp322 = */ auxcon1_17 (arg0, arg3, tmp131, tmp133) ;
/* tmp323 = */ auxlpar1_18 (arg0, arg3, tmp131, tmp133) ;
/* tmp324 = */ auxrpar1_19 (arg0, arg3, tmp131, tmp133) ;
/* tmp329 = */ loop_35 (arg0, arg3, tmp131, tmp133, tmp134, 1) ;
/* tmp334 = */ loop_36 (arg0, arg3, tmp131, tmp133, tmp134, 1) ;
/* tmp335 = */ atspre_fprint_string (arg0, ATSstrcst("//\n")) ;
/* tmp336 = */ atspre_fprint_string (arg0, ATSstrcst("implement")) ;
/* tmp337 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (arg0, arg3) ;
/* tmp338 = */ atspre_fprint_newline (arg0) ;
/* tmp339 = */ atspre_fprint_string (arg0, tmp131) ;
/* tmp340 = */ atspre_fprint_string (arg0, ATSstrcst("$")) ;
/* tmp341 = */ atspre_fprint_string (arg0, tmp133) ;
/* tmp342 = */ atspre_fprint_string (arg0, ATSstrcst("(out, arg0) = ")) ;
/* tmp343 = */ atspre_fprint_newline (arg0) ;
/* tmp344 = */ atspre_fprint_string (arg0, ATSstrcst("{\n//")) ;
/* tmp345 = */ atspre_fprint_newline (arg0) ;
/* tmp346 = */ auxcon2_22 (arg0, arg3, tmp131, tmp133) ;
/* tmp347 = */ auxlpar2_23 (arg0, arg3, tmp131, tmp133) ;
/* tmp348 = */ auxbody2_27 (arg0, arg3, tmp131, tmp133, tmp134, 0, 0) ;
/* tmp349 = */ auxrpar2_24 (arg0, arg3, tmp131, tmp133) ;
/* tmp350 = */ atspre_fprint_string (arg0, ATSstrcst("//\n}")) ;
/* tmp351 = */ atspre_fprint_newline (arg0) ;
/* tmp352 = */ auxcon3_28 (arg0, arg3, tmp131, tmp133) ;
/* tmp353 = */ auxlpar3_29 (arg0, arg3, tmp131, tmp133) ;
/* tmp354 = */ auxrpar3_30 (arg0, arg3, tmp131, tmp133) ;
/* tmp359 = */ loop_37 (arg0, arg3, tmp131, tmp133, tmp134, 1) ;
/* tmp130 = */ loop_38 (arg0, arg3, tmp131, tmp133, tmp134, 1) ;
return /* (tmp130) */ ;
} /* end of [aux_datype_d2cf_con_5] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 13757(line=836, offs=1) -- 14051(line=849, offs=2)
*/
ATSstaticdec()
ats_void_type
aux_datype_d2cf_conlst_6 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) {
/* local vardec */
// ATSlocal_void (tmp364) ;
ATSlocal (ats_ptr_type, tmp365) ;
ATSlocal (ats_ptr_type, tmp366) ;
// ATSlocal_void (tmp367) ;

__ats_lab_aux_datype_d2cf_conlst_6:
do {
/* branch: __ats_lab_14 */
__ats_lab_14_0:
if (arg4 != (ats_sum_ptr_type)0) { goto __ats_lab_15_0 ; }
__ats_lab_14_1:
break ;

/* branch: __ats_lab_15 */
__ats_lab_15_0:
// if (arg4 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_15_1:
tmp365 = ats_caselptrlab_mac(anairiats_sum_3, arg4, atslab_0) ;
tmp366 = ats_caselptrlab_mac(anairiats_sum_3, arg4, atslab_1) ;
/* tmp367 = */ aux_datype_d2cf_con_5 (arg0, arg1, arg2, arg3, tmp365) ;
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = arg2 ;
arg3 = arg3 ;
arg4 = tmp366 ;
goto __ats_lab_aux_datype_d2cf_conlst_6 ; // tail call
break ;
} while (0) ;
return /* (tmp364) */ ;
} /* end of [aux_datype_d2cf_conlst_6] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_fprint.dats: 14141(line=855, offs=3) -- 14530(line=877, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_fprint (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp368) ;
ATSlocal (ats_ptr_type, tmp369) ;
ATSlocal (ats_ptr_type, tmp370) ;
ATSlocal (ats_ptr_type, tmp371) ;
ATSlocal (ats_ptr_type, tmp372) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_fprint:
do {
/* branch: __ats_lab_16 */
__ats_lab_16_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_17_0 ; }
__ats_lab_16_1:
/* tmp368 = */ auxerr_nil_0 (arg0, arg1) ;
break ;

/* branch: __ats_lab_17 */
__ats_lab_17_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_17_1:
tmp369 = ats_caselptrlab_mac(anairiats_sum_3, arg2, atslab_0) ;
tmp370 = ats_caselptrlab_mac(anairiats_sum_3, arg2, atslab_1) ;
tmp371 = _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_datype (tmp369) ;
do {
/* branch: __ats_lab_18 */
__ats_lab_18_0:
if (tmp371 != (ats_sum_ptr_type)0) { goto __ats_lab_19_0 ; }
__ats_lab_18_1:
/* tmp368 = */ auxerr_s2cst_1 (arg0, arg1) ;
break ;

/* branch: __ats_lab_19 */
__ats_lab_19_0:
// if (tmp371 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_19_1:
tmp372 = ats_caselptrlab_mac(anairiats_sum_1, tmp371, atslab_0) ;
ATS_FREE(tmp371) ;
/* tmp368 = */ aux_datype_3 (arg0, arg1, tmp372, tmp370) ;
break ;
} while (0) ;
break ;
} while (0) ;
return /* (tmp368) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_fprint] */

/* static load function */

// extern ats_void_type ATS_2d0_2e2_2e12_2prelude_2SATS_2unsafe_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp1_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__staload (void) ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__staload_flag = 1 ;

// ATS_2d0_2e2_2e12_2prelude_2SATS_2unsafe_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp1_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__staload () ;

return ;
} /* staload function */

/* dynamic load function */

// dynload flag declaration
extern ats_int_type _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_fprint_2edats__staload () ;

#ifdef _ATS_PROOFCHECK
#endif /* _ATS_PROOFCHECK */

/* marking static variables for GC */

/* marking external values for GC */

/* code for dynamic loading */
return ;
} /* end of [dynload function] */

/* external codes at mid */
/* external codes at bot */

/* ****** ****** */

/* end of [pats_codegen2_fprint_dats.c] */
