/*
**
** 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_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_e1xp_loc ;
ats_ptr_type atslab_e1xp_node ;
} anairiats_rec_0 ;

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

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_2 ;

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

typedef
struct {
ats_ptr_type atslab_s2qua_svs ;
ats_ptr_type atslab_s2qua_sps ;
} anairiats_rec_4 ;

typedef struct {
anairiats_rec_4 atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_5 ;

typedef struct {
int tag ;
ats_ptr_type atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_6 ;

typedef struct {
int tag ;
ats_int_type atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_7 ;

typedef struct {
ats_ptr_type atslab_0 ;
ats_ptr_type atslab_1 ;
ats_ptr_type atslab_2 ;
} anairiats_sum_8 ;

typedef
struct {
ats_ptr_type atslab_s2exp_srt ;
ats_ptr_type atslab_s2exp_node ;
} anairiats_rec_9 ;

typedef struct {
int tag ;
ats_ptr_type atslab_0 ;
ats_int_type atslab_1 ;
ats_ptr_type atslab_2 ;
} anairiats_sum_10 ;

/* 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__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_staexp1_2esats__E1XPide_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp1_2esats__E1XPstring_5) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2RTBASpre_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2RTBASimp_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2RTBASdef_2) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2RTbas_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2RTfun_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2ITMcst_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__SLABELED_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Ecst_4) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Evar_7) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Eapp_17) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Etyrec_25) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2ITMcst_0) ;

/* external dynamic constant declarations */
ATSextern_fun(ats_int_type, atspre_add_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_string_string) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_fprint_string) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__symbol_get_name) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__label_is_int) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__label_is_sym) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__fprint_label) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rtdat_get_sym) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__fprint_s2rt) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_is_lin) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_is_nonlin) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_is_prgm) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_boxed) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_flted) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_sym) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_is_tydef) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_is_datype) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_get_sym) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_get_srt) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__fprint_s2exp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_nonlin) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_decarg) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__the_s2expenv_find) (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_s2cst) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2var) (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_bool_type aux_test_0 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type aux_find_5 (ats_ptr_type arg0) ;
static
ats_ptr_type aux_find_9 (ats_ptr_type arg0) ;
static
ats_void_type auxlst_12 (ats_ptr_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type auxlst_12_closure_make (ats_ptr_type env0) ;
static
ats_void_type auxlst_12_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type aux_s2qua_11 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, anairiats_rec_4 arg3) ;
static
ats_void_type aux_s2qualst_13 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) ;
static
ats_void_type fprs2t_18 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type loop_19 (ats_ptr_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type loop_19_closure_make (ats_ptr_type env0) ;
static
ats_void_type loop_19_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type aux_17 (ats_ptr_type env0, anairiats_rec_4 arg0) ;
static
ats_clo_ptr_type aux_17_closure_make (ats_ptr_type env0) ;
static
ats_void_type aux_17_clofun (ats_clo_ptr_type cloptr, anairiats_rec_4 arg0) ;
static
ats_void_type auxlst_20 (ats_ptr_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type auxlst_20_closure_make (ats_ptr_type env0) ;
static
ats_void_type auxlst_20_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type aux_s2rt_22 (ats_ptr_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type aux_s2rt_22_closure_make (ats_ptr_type env0) ;
static
ats_void_type aux_s2rt_22_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_void_type aux_s2rtlst_23 (ats_ptr_type env0, ats_ptr_type arg0, ats_int_type arg1) ;
static
ats_clo_ptr_type aux_s2rtlst_23_closure_make (ats_ptr_type env0) ;
static
ats_void_type aux_s2rtlst_23_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0, ats_int_type arg1) ;
static
ats_void_type aux_s2rtbas_24 (ats_ptr_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type aux_s2rtbas_24_closure_make (ats_ptr_type env0) ;
static
ats_void_type aux_s2rtbas_24_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_bool_type aux_istup_27 (ats_ptr_type arg0) ;
static
ats_void_type aux_s2exp_28 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type aux_s2explst_29 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2) ;
static
ats_void_type aux_labs2explst_30 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2) ;

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

/* function implementations */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 1813(line=67, offs=1) -- 2057(line=83, offs=2)
*/
ATSstaticdec()
ats_bool_type
aux_test_0 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp0) ;
ATSlocal (ats_ptr_type, tmp1) ;
ATSlocal (ats_ptr_type, tmp2) ;
ATSlocal (ats_ptr_type, tmp3) ;
ATSlocal (ats_ptr_type, tmp4) ;

__ats_lab_aux_test_0:
tmp1 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg0), atslab_e1xp_node) ;
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (((ats_sum_ptr_type)tmp1)->tag != 0) { goto __ats_lab_1_0 ; }
__ats_lab_0_1:
tmp2 = ats_caselptrlab_mac(anairiats_sum_1, tmp1, atslab_0) ;
tmp3 = _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__symbol_get_name (tmp2) ;
tmp0 = atspre_eq_string_string (arg1, tmp3) ;
break ;

/* branch: __ats_lab_1 */
__ats_lab_1_0:
if (((ats_sum_ptr_type)tmp1)->tag != 5) { goto __ats_lab_2_0 ; }
__ats_lab_1_1:
tmp4 = ats_caselptrlab_mac(anairiats_sum_1, tmp1, atslab_0) ;
tmp0 = atspre_eq_string_string (arg1, tmp4) ;
break ;

/* branch: __ats_lab_2 */
__ats_lab_2_0:
__ats_lab_2_1:
tmp0 = ats_false_bool ;
break ;
} while (0) ;
return (tmp0) ;
} /* end of [aux_test_0] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 2133(line=88, offs=17) -- 2162(line=88, offs=46)
*/
ATSglobaldec()
ats_bool_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__datcon_test_e1xp (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp5) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__datcon_test_e1xp:
tmp5 = aux_test_0 (arg0, ATSstrcst("datcon")) ;
return (tmp5) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__datcon_test_e1xp] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 2192(line=90, offs=20) -- 2224(line=90, offs=52)
*/
ATSglobaldec()
ats_bool_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__datcontag_test_e1xp (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp6) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__datcontag_test_e1xp:
tmp6 = aux_test_0 (arg0, ATSstrcst("datcontag")) ;
return (tmp6) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__datcontag_test_e1xp] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 2254(line=93, offs=17) -- 2283(line=93, offs=46)
*/
ATSglobaldec()
ats_bool_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__fprint_test_e1xp (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp7) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__fprint_test_e1xp:
tmp7 = aux_test_0 (arg0, ATSstrcst("fprint")) ;
return (tmp7) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__fprint_test_e1xp] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 2313(line=96, offs=17) -- 2342(line=96, offs=46)
*/
ATSglobaldec()
ats_bool_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__absrec_test_e1xp (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp8) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__absrec_test_e1xp:
tmp8 = aux_test_0 (arg0, ATSstrcst("absrec")) ;
return (tmp8) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__absrec_test_e1xp] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 2401(line=105, offs=1) -- 2781(line=128, offs=4)
*/
ATSstaticdec()
ats_ptr_type
aux_find_5 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp9) ;
ATSlocal (ats_ptr_type, tmp10) ;
ATSlocal (ats_ptr_type, tmp11) ;
ATSlocal (ats_ptr_type, tmp12) ;
ATSlocal (ats_ptr_type, tmp13) ;

__ats_lab_aux_find_5:
tmp10 = _2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__the_s2expenv_find (arg0) ;
do {
/* branch: __ats_lab_3 */
__ats_lab_3_0:
if (tmp10 == (ats_sum_ptr_type)0) { goto __ats_lab_8_0 ; }
__ats_lab_3_1:
tmp11 = ats_caselptrlab_mac(anairiats_sum_2, tmp10, atslab_0) ;
ATS_FREE(tmp10) ;
do {
/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (((ats_sum_ptr_type)tmp11)->tag != 1) { goto __ats_lab_7_0 ; }
__ats_lab_4_1:
tmp12 = ats_caselptrlab_mac(anairiats_sum_1, tmp11, atslab_0) ;
do {
/* branch: __ats_lab_5 */
__ats_lab_5_0:
if (tmp12 == (ats_sum_ptr_type)0) { goto __ats_lab_6_0 ; }
__ats_lab_5_1:
tmp13 = ats_caselptrlab_mac(anairiats_sum_3, tmp12, atslab_0) ;
tmp9 = ATS_MALLOC(sizeof(anairiats_sum_2)) ;
ats_selptrset_mac(anairiats_sum_2, tmp9, atslab_0, tmp13) ;
break ;

/* branch: __ats_lab_6 */
__ats_lab_6_0:
// if (tmp12 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_6_1:
tmp9 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
__ats_lab_7_1:
tmp9 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_8 */
__ats_lab_8_0:
// if (tmp10 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_8_1:
tmp9 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp9) ;
} /* end of [aux_find_5] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 2857(line=134, offs=3) -- 3224(line=163, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_s2cst (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp14) ;
ATSlocal (ats_ptr_type, tmp15) ;
ATSlocal (ats_ptr_type, tmp16) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_s2cst:
tmp15 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg0), atslab_e1xp_node) ;
do {
/* branch: __ats_lab_9 */
__ats_lab_9_0:
if (((ats_sum_ptr_type)tmp15)->tag != 0) { goto __ats_lab_10_0 ; }
__ats_lab_9_1:
tmp16 = ats_caselptrlab_mac(anairiats_sum_1, tmp15, atslab_0) ;
tmp14 = aux_find_5 (tmp16) ;
break ;

/* branch: __ats_lab_10 */
__ats_lab_10_0:
__ats_lab_10_1:
tmp14 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp14) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_s2cst] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 3332(line=171, offs=3) -- 3598(line=187, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_tydef (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp17) ;
ATSlocal (ats_ptr_type, tmp18) ;
ATSlocal (ats_ptr_type, tmp19) ;
ATSlocal (ats_bool_type, tmp20) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_tydef:
tmp18 = _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_s2cst (arg0) ;
do {
/* branch: __ats_lab_11 */
__ats_lab_11_0:
if (tmp18 == (ats_sum_ptr_type)0) { goto __ats_lab_12_0 ; }
__ats_lab_11_1:
tmp19 = ats_caselptrlab_mac(anairiats_sum_2, tmp18, atslab_0) ;
tmp20 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_is_tydef (tmp19) ;
if (tmp20) {
tmp17 = tmp18 ;
} else {
ATS_FREE(tmp18) ;
tmp17 = (ats_sum_ptr_type)0 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_12 */
__ats_lab_12_0:
// if (tmp18 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_12_1:
tmp17 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp17) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_tydef] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 3684(line=193, offs=3) -- 3951(line=209, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_datype (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp21) ;
ATSlocal (ats_ptr_type, tmp22) ;
ATSlocal (ats_ptr_type, tmp23) ;
ATSlocal (ats_bool_type, tmp24) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_datype:
tmp22 = _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_s2cst (arg0) ;
do {
/* branch: __ats_lab_13 */
__ats_lab_13_0:
if (tmp22 == (ats_sum_ptr_type)0) { goto __ats_lab_14_0 ; }
__ats_lab_13_1:
tmp23 = ats_caselptrlab_mac(anairiats_sum_2, tmp22, atslab_0) ;
tmp24 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_is_datype (tmp23) ;
if (tmp24) {
tmp21 = tmp22 ;
} else {
ATS_FREE(tmp22) ;
tmp21 = (ats_sum_ptr_type)0 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_14 */
__ats_lab_14_0:
// if (tmp22 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_14_1:
tmp21 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp21) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_datype] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 4017(line=216, offs=1) -- 4309(line=235, offs=4)
*/
ATSstaticdec()
ats_ptr_type
aux_find_9 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp25) ;
ATSlocal (ats_ptr_type, tmp26) ;
ATSlocal (ats_ptr_type, tmp27) ;
ATSlocal (ats_ptr_type, tmp28) ;

__ats_lab_aux_find_9:
tmp26 = _2tmp_2ATS_2dPostiats_2src_2pats_trans2_env_2esats__the_d2expenv_find (arg0) ;
do {
/* branch: __ats_lab_15 */
__ats_lab_15_0:
if (tmp26 == (ats_sum_ptr_type)0) { goto __ats_lab_18_0 ; }
__ats_lab_15_1:
tmp27 = ats_caselptrlab_mac(anairiats_sum_2, tmp26, atslab_0) ;
ATS_FREE(tmp26) ;
do {
/* branch: __ats_lab_16 */
__ats_lab_16_0:
if (((ats_sum_ptr_type)tmp27)->tag != 0) { goto __ats_lab_17_0 ; }
__ats_lab_16_1:
tmp28 = ats_caselptrlab_mac(anairiats_sum_1, tmp27, atslab_0) ;
tmp25 = ATS_MALLOC(sizeof(anairiats_sum_2)) ;
ats_selptrset_mac(anairiats_sum_2, tmp25, atslab_0, tmp28) ;
break ;

/* branch: __ats_lab_17 */
__ats_lab_17_0:
__ats_lab_17_1:
tmp25 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_18 */
__ats_lab_18_0:
// if (tmp26 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_18_1:
tmp25 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp25) ;
} /* end of [aux_find_9] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 4385(line=241, offs=3) -- 4749(line=269, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_d2cst (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp29) ;
ATSlocal (ats_ptr_type, tmp30) ;
ATSlocal (ats_ptr_type, tmp31) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_d2cst:
tmp30 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg0), atslab_e1xp_node) ;
do {
/* branch: __ats_lab_19 */
__ats_lab_19_0:
if (((ats_sum_ptr_type)tmp30)->tag != 0) { goto __ats_lab_20_0 ; }
__ats_lab_19_1:
tmp31 = ats_caselptrlab_mac(anairiats_sum_1, tmp30, atslab_0) ;
tmp29 = aux_find_9 (tmp31) ;
break ;

/* branch: __ats_lab_20 */
__ats_lab_20_0:
__ats_lab_20_1:
tmp29 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp29) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_get_d2cst] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 4927(line=285, offs=1) -- 5093(line=296, offs=2)
*/
ATSstaticdec()
ats_void_type
auxlst_12 (ats_ptr_type env0, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;
ATSlocal (ats_ptr_type, tmp35) ;
// ATSlocal_void (tmp36) ;
ATSlocal (ats_ptr_type, tmp37) ;

__ats_lab_auxlst_12:
do {
/* branch: __ats_lab_21 */
__ats_lab_21_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_22_0 ; }
__ats_lab_21_1:
break ;

/* branch: __ats_lab_22 */
__ats_lab_22_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_22_1:
tmp34 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_0) ;
tmp35 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_1) ;
tmp37 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_get_sym (tmp34) ;
/* tmp36 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (env0, tmp37) ;
arg0 = tmp35 ;
goto __ats_lab_auxlst_12 ; // tail call
break ;
} while (0) ;
return /* (tmp33) */ ;
} /* end of [auxlst_12] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} auxlst_12_closure_type ;

ats_void_type
auxlst_12_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
auxlst_12 (((auxlst_12_closure_type*)cloptr)->closure_env_0, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxlst_12_closure_init (auxlst_12_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxlst_12_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxlst_12_closure_make (ats_ptr_type env0) {
auxlst_12_closure_type *p_clo = ATS_MALLOC(sizeof(auxlst_12_closure_type)) ;
auxlst_12_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 4837(line=278, offs=1) -- 5165(line=300, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_s2qua_11 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, anairiats_rec_4 arg3) {
/* local vardec */
// ATSlocal_void (tmp32) ;
// ATSlocal_void (tmp38) ;
// ATSlocal_void (tmp39) ;
ATSlocal (ats_ptr_type, tmp40) ;

__ats_lab_aux_s2qua_11:
/* tmp38 = */ atspre_fprint_string (arg0, arg1) ;
tmp40 = ats_select_mac(arg3, atslab_s2qua_svs) ;
/* tmp39 = */ auxlst_12 (arg0, tmp40) ;
/* tmp32 = */ atspre_fprint_string (arg0, arg2) ;
return /* (tmp32) */ ;
} /* end of [aux_s2qua_11] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 5193(line=303, offs=1) -- 5457(line=317, offs=2)
*/
ATSstaticdec()
ats_void_type
aux_s2qualst_13 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) {
/* local vardec */
// ATSlocal_void (tmp41) ;
ATSlocal (anairiats_rec_4, tmp42) ;
ATSlocal (ats_ptr_type, tmp43) ;
// ATSlocal_void (tmp44) ;

__ats_lab_aux_s2qualst_13:
do {
/* branch: __ats_lab_23 */
__ats_lab_23_0:
if (arg3 != (ats_sum_ptr_type)0) { goto __ats_lab_24_0 ; }
__ats_lab_23_1:
break ;

/* branch: __ats_lab_24 */
__ats_lab_24_0:
// if (arg3 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_24_1:
tmp42 = ats_caselptrlab_mac(anairiats_sum_5, arg3, atslab_0) ;
tmp43 = ats_caselptrlab_mac(anairiats_sum_5, arg3, atslab_1) ;
/* tmp44 = */ aux_s2qua_11 (arg0, arg1, arg2, tmp42) ;
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = arg2 ;
arg3 = tmp43 ;
goto __ats_lab_aux_s2qualst_13 ; // tail call
break ;
} while (0) ;
return /* (tmp41) */ ;
} /* end of [aux_s2qualst_13] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 5545(line=323, offs=3) -- 5649(line=331, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp45) ;
ATSlocal (ats_ptr_type, tmp46) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp:
tmp46 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_decarg (arg1) ;
/* tmp45 = */ aux_s2qualst_13 (arg0, ATSstrcst("<"), ATSstrcst(">"), tmp46) ;
return /* (tmp45) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstapp] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 5723(line=335, offs=3) -- 5827(line=343, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp47) ;
ATSlocal (ats_ptr_type, tmp48) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp:
tmp48 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_decarg (arg1) ;
/* tmp47 = */ aux_s2qualst_13 (arg0, ATSstrcst("{"), ATSstrcst("}"), tmp48) ;
return /* (tmp47) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstimp] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 6020(line=360, offs=1) -- 6223(line=373, offs=2)
*/
ATSstaticdec()
ats_void_type
fprs2t_18 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp51) ;
ATSlocal (ats_bool_type, tmp52) ;
// ATSlocal_void (tmp53) ;
ATSlocal (ats_bool_type, tmp54) ;
ATSlocal (ats_bool_type, tmp55) ;

__ats_lab_fprs2t_18:
tmp52 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_is_prgm (arg1) ;
if (tmp52) {
tmp54 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_is_lin (arg1) ;
if (tmp54) {
/* tmp53 = */ atspre_fprint_string (arg0, ATSstrcst("vt0p")) ;
} else {
/* empty */
} /* end of [if] */
tmp55 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_is_nonlin (arg1) ;
if (tmp55) {
/* tmp51 = */ atspre_fprint_string (arg0, ATSstrcst("t0p")) ;
} else {
/* empty */
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
return /* (tmp51) */ ;
} /* end of [fprs2t_18] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 6253(line=376, offs=1) -- 6544(line=392, offs=2)
*/
ATSstaticdec()
ats_void_type
loop_19 (ats_ptr_type env0, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp56) ;
ATSlocal (ats_ptr_type, tmp57) ;
ATSlocal (ats_ptr_type, tmp58) ;
ATSlocal (ats_ptr_type, tmp59) ;
ATSlocal (ats_ptr_type, tmp60) ;
// ATSlocal_void (tmp61) ;
// ATSlocal_void (tmp62) ;
// ATSlocal_void (tmp63) ;

__ats_lab_loop_19:
do {
/* branch: __ats_lab_25 */
__ats_lab_25_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; }
__ats_lab_25_1:
break ;

/* branch: __ats_lab_26 */
__ats_lab_26_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_26_1:
tmp57 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_0) ;
tmp58 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_1) ;
tmp59 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_get_sym (tmp57) ;
tmp60 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_get_srt (tmp57) ;
/* tmp61 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (env0, tmp59) ;
/* tmp62 = */ atspre_fprint_string (env0, ATSstrcst(":")) ;
/* tmp63 = */ fprs2t_18 (env0, tmp60) ;
arg0 = tmp58 ;
goto __ats_lab_loop_19 ; // tail call
break ;
} while (0) ;
return /* (tmp56) */ ;
} /* end of [loop_19] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} loop_19_closure_type ;

ats_void_type
loop_19_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
loop_19 (((loop_19_closure_type*)cloptr)->closure_env_0, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
loop_19_closure_init (loop_19_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&loop_19_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
loop_19_closure_make (ats_ptr_type env0) {
loop_19_closure_type *p_clo = ATS_MALLOC(sizeof(loop_19_closure_type)) ;
loop_19_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 5970(line=354, offs=1) -- 6632(line=398, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_17 (ats_ptr_type env0, anairiats_rec_4 arg0) {
/* local vardec */
// ATSlocal_void (tmp50) ;
ATSlocal (ats_ptr_type, tmp64) ;
// ATSlocal_void (tmp65) ;
// ATSlocal_void (tmp66) ;

__ats_lab_aux_17:
tmp64 = ats_select_mac(arg0, atslab_s2qua_svs) ;
/* tmp65 = */ atspre_fprint_string (env0, ATSstrcst("{")) ;
/* tmp66 = */ loop_19 (env0, tmp64) ;
/* tmp50 = */ atspre_fprint_string (env0, ATSstrcst("}")) ;
return /* (tmp50) */ ;
} /* end of [aux_17] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} aux_17_closure_type ;

ats_void_type
aux_17_clofun (ats_clo_ptr_type cloptr, anairiats_rec_4 arg0) {
aux_17 (((aux_17_closure_type*)cloptr)->closure_env_0, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
aux_17_closure_init (aux_17_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&aux_17_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
aux_17_closure_make (ats_ptr_type env0) {
aux_17_closure_type *p_clo = ATS_MALLOC(sizeof(aux_17_closure_type)) ;
aux_17_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 6654(line=401, offs=1) -- 6787(line=409, offs=2)
*/
ATSstaticdec()
ats_void_type
auxlst_20 (ats_ptr_type env0, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp67) ;
ATSlocal (anairiats_rec_4, tmp68) ;
ATSlocal (ats_ptr_type, tmp69) ;
// ATSlocal_void (tmp70) ;

__ats_lab_auxlst_20:
do {
/* branch: __ats_lab_27 */
__ats_lab_27_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_28_0 ; }
__ats_lab_27_1:
break ;

/* branch: __ats_lab_28 */
__ats_lab_28_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_28_1:
tmp68 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp69 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
/* tmp70 = */ aux_17 (env0, tmp68) ;
arg0 = tmp69 ;
goto __ats_lab_auxlst_20 ; // tail call
break ;
} while (0) ;
return /* (tmp67) */ ;
} /* end of [auxlst_20] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} auxlst_20_closure_type ;

ats_void_type
auxlst_20_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
auxlst_20 (((auxlst_20_closure_type*)cloptr)->closure_env_0, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
auxlst_20_closure_init (auxlst_20_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&auxlst_20_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
auxlst_20_closure_make (ats_ptr_type env0) {
auxlst_20_closure_type *p_clo = ATS_MALLOC(sizeof(auxlst_20_closure_type)) ;
auxlst_20_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 5945(line=351, offs=3) -- 6852(line=413, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp49) ;
ATSlocal (ats_ptr_type, tmp71) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec:
tmp71 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_decarg (arg1) ;
/* tmp49 = */ auxlst_20 (arg0, tmp71) ;
return /* (tmp49) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_tmpcstdec] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 6967(line=422, offs=1) -- 7350(line=446, offs=2)
*/
ATSstaticdec()
ats_void_type
aux_s2rt_22 (ats_ptr_type env0, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp73) ;
ATSlocal (ats_ptr_type, tmp74) ;
ATSlocal (ats_ptr_type, tmp75) ;
ATSlocal (ats_ptr_type, tmp76) ;
// ATSlocal_void (tmp77) ;
// ATSlocal_void (tmp78) ;
// ATSlocal_void (tmp79) ;

__ats_lab_aux_s2rt_22:
do {
/* branch: __ats_lab_29 */
__ats_lab_29_0:
if (((ats_sum_ptr_type)arg0)->tag != 0) { goto __ats_lab_30_0 ; }
__ats_lab_29_1:
tmp74 = ats_caselptrlab_mac(anairiats_sum_1, arg0, atslab_0) ;
/* tmp73 = */ aux_s2rtbas_24 (env0, tmp74) ;
break ;

/* branch: __ats_lab_30 */
__ats_lab_30_0:
if (((ats_sum_ptr_type)arg0)->tag != 1) { goto __ats_lab_31_0 ; }
__ats_lab_30_1:
tmp75 = ats_caselptrlab_mac(anairiats_sum_6, arg0, atslab_0) ;
tmp76 = ats_caselptrlab_mac(anairiats_sum_6, arg0, atslab_1) ;
/* tmp77 = */ atspre_fprint_string (env0, ATSstrcst("(")) ;
/* tmp78 = */ aux_s2rtlst_23 (env0, tmp75, 0) ;
/* tmp79 = */ atspre_fprint_string (env0, ATSstrcst(") ->")) ;
arg0 = tmp76 ;
goto __ats_lab_aux_s2rt_22 ; // tail call
break ;

/* branch: __ats_lab_31 */
__ats_lab_31_0:
__ats_lab_31_1:
/* tmp73 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__fprint_s2rt (env0, arg0) ;
break ;
} while (0) ;
return /* (tmp73) */ ;
} /* end of [aux_s2rt_22] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} aux_s2rt_22_closure_type ;

ats_void_type
aux_s2rt_22_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
aux_s2rt_22 (((aux_s2rt_22_closure_type*)cloptr)->closure_env_0, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
aux_s2rt_22_closure_init (aux_s2rt_22_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&aux_s2rt_22_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
aux_s2rt_22_closure_make (ats_ptr_type env0) {
aux_s2rt_22_closure_type *p_clo = ATS_MALLOC(sizeof(aux_s2rt_22_closure_type)) ;
aux_s2rt_22_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 7382(line=449, offs=1) -- 7672(line=465, offs=2)
*/
ATSstaticdec()
ats_void_type
aux_s2rtlst_23 (ats_ptr_type env0, ats_ptr_type arg0, ats_int_type arg1) {
/* local vardec */
// ATSlocal_void (tmp80) ;
ATSlocal (ats_ptr_type, tmp81) ;
ATSlocal (ats_ptr_type, tmp82) ;
// ATSlocal_void (tmp83) ;
ATSlocal (ats_bool_type, tmp84) ;
// ATSlocal_void (tmp85) ;
ATSlocal (ats_int_type, tmp86) ;

__ats_lab_aux_s2rtlst_23:
do {
/* branch: __ats_lab_32 */
__ats_lab_32_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_33_0 ; }
__ats_lab_32_1:
break ;

/* branch: __ats_lab_33 */
__ats_lab_33_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_33_1:
tmp81 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_0) ;
tmp82 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_1) ;
tmp84 = atspre_gt_int_int (arg1, 0) ;
if (tmp84) {
/* tmp83 = */ atspre_fprint_string (env0, ATSstrcst(", ")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp85 = */ aux_s2rt_22 (env0, tmp81) ;
tmp86 = atspre_add_int_int (arg1, 1) ;
arg0 = tmp82 ;
arg1 = tmp86 ;
goto __ats_lab_aux_s2rtlst_23 ; // tail call
break ;
} while (0) ;
return /* (tmp80) */ ;
} /* end of [aux_s2rtlst_23] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} aux_s2rtlst_23_closure_type ;

ats_void_type
aux_s2rtlst_23_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0, ats_int_type arg1) {
aux_s2rtlst_23 (((aux_s2rtlst_23_closure_type*)cloptr)->closure_env_0, arg0, arg1) ; return ;
} /* end of function */

ATSinline()
ats_void_type
aux_s2rtlst_23_closure_init (aux_s2rtlst_23_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&aux_s2rtlst_23_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
aux_s2rtlst_23_closure_make (ats_ptr_type env0) {
aux_s2rtlst_23_closure_type *p_clo = ATS_MALLOC(sizeof(aux_s2rtlst_23_closure_type)) ;
aux_s2rtlst_23_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 7707(line=468, offs=1) -- 8001(line=483, offs=2)
*/
ATSstaticdec()
ats_void_type
aux_s2rtbas_24 (ats_ptr_type env0, ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp87) ;
ATSlocal (ats_ptr_type, tmp88) ;
ATSlocal (ats_ptr_type, tmp89) ;
ATSlocal (ats_ptr_type, tmp90) ;
ATSlocal (ats_ptr_type, tmp91) ;

__ats_lab_aux_s2rtbas_24:
do {
/* branch: __ats_lab_34 */
__ats_lab_34_0:
if (((ats_sum_ptr_type)arg0)->tag != 0) { goto __ats_lab_35_0 ; }
__ats_lab_34_1:
tmp88 = ats_caselptrlab_mac(anairiats_sum_1, arg0, atslab_0) ;
/* tmp87 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (env0, tmp88) ;
break ;

/* branch: __ats_lab_35 */
__ats_lab_35_0:
if (((ats_sum_ptr_type)arg0)->tag != 1) { goto __ats_lab_36_0 ; }
__ats_lab_35_1:
tmp89 = ats_caselptrlab_mac(anairiats_sum_7, arg0, atslab_1) ;
/* tmp87 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (env0, tmp89) ;
break ;

/* branch: __ats_lab_36 */
__ats_lab_36_0:
// if (((ats_sum_ptr_type)arg0)->tag != 2) { ats_deadcode_failure_handle () ; }
__ats_lab_36_1:
tmp90 = ats_caselptrlab_mac(anairiats_sum_1, arg0, atslab_0) ;
tmp91 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rtdat_get_sym (tmp90) ;
/* tmp87 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (env0, tmp91) ;
break ;
} while (0) ;
return /* (tmp87) */ ;
} /* end of [aux_s2rtbas_24] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_ptr_type closure_env_0 ;
} aux_s2rtbas_24_closure_type ;

ats_void_type
aux_s2rtbas_24_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
aux_s2rtbas_24 (((aux_s2rtbas_24_closure_type*)cloptr)->closure_env_0, arg0) ; return ;
} /* end of function */

ATSinline()
ats_void_type
aux_s2rtbas_24_closure_init (aux_s2rtbas_24_closure_type *p_clo, ats_ptr_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&aux_s2rtbas_24_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
aux_s2rtbas_24_closure_make (ats_ptr_type env0) {
aux_s2rtbas_24_closure_type *p_clo = ATS_MALLOC(sizeof(aux_s2rtbas_24_closure_type)) ;
aux_s2rtbas_24_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 6942(line=419, offs=3) -- 8055(line=487, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2rt (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp72) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2rt:
/* tmp72 = */ aux_s2rt_22 (arg0, arg1) ;
return /* (tmp72) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2rt] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 8141(line=493, offs=3) -- 8211(line=496, offs=2)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2cst (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp92) ;
ATSlocal (ats_ptr_type, tmp93) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2cst:
tmp93 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_sym (arg1) ;
/* tmp92 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (arg0, tmp93) ;
return /* (tmp92) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2cst] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 8271(line=500, offs=3) -- 8341(line=503, offs=2)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2var (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp94) ;
ATSlocal (ats_ptr_type, tmp95) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2var:
tmp95 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_get_sym (arg1) ;
/* tmp94 = */ _2tmp_2ATS_2dPostiats_2src_2pats_symbol_2esats__fprint_symbol (arg0, tmp95) ;
return /* (tmp94) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2var] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 8403(line=510, offs=1) -- 8650(line=523, offs=2)
*/
ATSstaticdec()
ats_bool_type
aux_istup_27 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp96) ;
ATSlocal (ats_ptr_type, tmp97) ;
ATSlocal (ats_ptr_type, tmp98) ;
ATSlocal (ats_ptr_type, tmp99) ;
ATSlocal (ats_bool_type, tmp100) ;

__ats_lab_aux_istup_27:
do {
/* branch: __ats_lab_37 */
__ats_lab_37_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_38_0 ; }
__ats_lab_37_1:
tmp96 = ats_true_bool ;
break ;

/* branch: __ats_lab_38 */
__ats_lab_38_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_38_1:
tmp97 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_0) ;
tmp98 = ats_caselptrlab_mac(anairiats_sum_3, arg0, atslab_1) ;
// 
tmp99 = ats_caselptrlab_mac(anairiats_sum_8, tmp97, atslab_0) ;
tmp100 = _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__label_is_int (tmp99) ;
if (tmp100) {
arg0 = tmp98 ;
goto __ats_lab_aux_istup_27 ; // tail call
} else {
tmp96 = ats_false_bool ;
} /* end of [if] */
break ;
} while (0) ;
return (tmp96) ;
} /* end of [aux_istup_27] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 8656(line=526, offs=1) -- 10045(line=609, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_s2exp_28 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp101) ;
ATSlocal (ats_ptr_type, tmp102) ;
ATSlocal (ats_ptr_type, tmp103) ;
ATSlocal (ats_ptr_type, tmp104) ;
ATSlocal (ats_ptr_type, tmp105) ;
ATSlocal (ats_ptr_type, tmp106) ;
// ATSlocal_void (tmp107) ;
// ATSlocal_void (tmp108) ;
// ATSlocal_void (tmp109) ;
ATSlocal (ats_ptr_type, tmp110) ;
ATSlocal (ats_ptr_type, tmp111) ;
ATSlocal (ats_bool_type, tmp112) ;
ATSlocal (ats_ptr_type, tmp113) ;
ATSlocal (ats_bool_type, tmp114) ;
// ATSlocal_void (tmp115) ;
ATSlocal (ats_bool_type, tmp116) ;
// ATSlocal_void (tmp117) ;
ATSlocal (ats_bool_type, tmp118) ;
// ATSlocal_void (tmp119) ;
// ATSlocal_void (tmp120) ;
// ATSlocal_void (tmp121) ;
// ATSlocal_void (tmp122) ;

__ats_lab_aux_s2exp_28:
tmp102 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_9, arg1), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_39 */
__ats_lab_39_0:
if (((ats_sum_ptr_type)tmp102)->tag != 4) { goto __ats_lab_40_0 ; }
__ats_lab_39_1:
tmp103 = ats_caselptrlab_mac(anairiats_sum_1, tmp102, atslab_0) ;
/* tmp101 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2cst (arg0, tmp103) ;
break ;

/* branch: __ats_lab_40 */
__ats_lab_40_0:
if (((ats_sum_ptr_type)tmp102)->tag != 7) { goto __ats_lab_41_0 ; }
__ats_lab_40_1:
tmp104 = ats_caselptrlab_mac(anairiats_sum_1, tmp102, atslab_0) ;
/* tmp101 = */ _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2var (arg0, tmp104) ;
break ;

/* branch: __ats_lab_41 */
__ats_lab_41_0:
if (((ats_sum_ptr_type)tmp102)->tag != 17) { goto __ats_lab_42_0 ; }
__ats_lab_41_1:
tmp105 = ats_caselptrlab_mac(anairiats_sum_6, tmp102, atslab_0) ;
tmp106 = ats_caselptrlab_mac(anairiats_sum_6, tmp102, atslab_1) ;
/* tmp107 = */ aux_s2exp_28 (arg0, tmp105) ;
/* tmp108 = */ atspre_fprint_string (arg0, ATSstrcst("(")) ;
/* tmp109 = */ aux_s2explst_29 (arg0, tmp106, 0) ;
/* tmp101 = */ atspre_fprint_string (arg0, ATSstrcst(")")) ;
break ;

/* branch: __ats_lab_42 */
__ats_lab_42_0:
if (((ats_sum_ptr_type)tmp102)->tag != 25) { goto __ats_lab_43_0 ; }
__ats_lab_42_1:
tmp110 = ats_caselptrlab_mac(anairiats_sum_10, tmp102, atslab_0) ;
tmp111 = ats_caselptrlab_mac(anairiats_sum_10, tmp102, atslab_2) ;
tmp112 = aux_istup_27 (tmp111) ;
if (tmp112) {
tmp113 = ATSstrcst("$tup") ;
} else {
tmp113 = ATSstrcst("$rec") ;
} /* end of [if] */
tmp114 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_flted (tmp110) ;
if (tmp114) {
/* tmp115 = */ atspre_fprint_string (arg0, ATSstrcst("@")) ;
} else {
/* empty */
} /* end of [if] */
tmp116 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_boxed (tmp110) ;
if (tmp116) {
tmp118 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_nonlin (arg1) ;
if (tmp118) {
/* tmp119 = */ atspre_fprint_string (arg0, tmp113) ;
/* tmp117 = */ atspre_fprint_string (arg0, ATSstrcst("_t")) ;
} else {
/* tmp120 = */ atspre_fprint_string (arg0, tmp113) ;
/* tmp117 = */ atspre_fprint_string (arg0, ATSstrcst("_vt")) ;
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
if (tmp112) {
/* tmp121 = */ atspre_fprint_string (arg0, ATSstrcst("(")) ;
} else {
/* tmp121 = */ atspre_fprint_string (arg0, ATSstrcst("{")) ;
} /* end of [if] */
/* tmp122 = */ aux_labs2explst_30 (arg0, tmp111, 0) ;
if (tmp112) {
/* tmp101 = */ atspre_fprint_string (arg0, ATSstrcst(")")) ;
} else {
/* tmp101 = */ atspre_fprint_string (arg0, ATSstrcst("}")) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_43 */
__ats_lab_43_0:
__ats_lab_43_1:
/* tmp101 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__fprint_s2exp (arg0, arg1) ;
break ;
} while (0) ;
return /* (tmp101) */ ;
} /* end of [aux_s2exp_28] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 10076(line=612, offs=1) -- 10418(line=633, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_s2explst_29 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2) {
/* local vardec */
// ATSlocal_void (tmp123) ;
ATSlocal (ats_ptr_type, tmp124) ;
ATSlocal (ats_ptr_type, tmp125) ;
// ATSlocal_void (tmp126) ;
ATSlocal (ats_bool_type, tmp127) ;
// ATSlocal_void (tmp128) ;
ATSlocal (ats_int_type, tmp129) ;

__ats_lab_aux_s2explst_29:
do {
/* branch: __ats_lab_44 */
__ats_lab_44_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_45_0 ; }
__ats_lab_44_1:
break ;

/* branch: __ats_lab_45 */
__ats_lab_45_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_45_1:
tmp124 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_0) ;
tmp125 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_1) ;
tmp127 = atspre_gt_int_int (arg2, 0) ;
if (tmp127) {
/* tmp126 = */ atspre_fprint_string (arg0, ATSstrcst(", ")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp128 = */ aux_s2exp_28 (arg0, tmp124) ;
tmp129 = atspre_add_int_int (arg2, 1) ;
arg0 = arg0 ;
arg1 = tmp125 ;
arg2 = tmp129 ;
goto __ats_lab_aux_s2explst_29 ; // tail call
break ;
} while (0) ;
return /* (tmp123) */ ;
} /* end of [aux_s2explst_29] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 10449(line=636, offs=1) -- 10932(line=665, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_labs2explst_30 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2) {
/* local vardec */
// ATSlocal_void (tmp130) ;
ATSlocal (ats_ptr_type, tmp131) ;
ATSlocal (ats_ptr_type, tmp132) ;
// ATSlocal_void (tmp133) ;
ATSlocal (ats_bool_type, tmp134) ;
ATSlocal (ats_ptr_type, tmp135) ;
ATSlocal (ats_ptr_type, tmp136) ;
// ATSlocal_void (tmp137) ;
ATSlocal (ats_bool_type, tmp138) ;
// ATSlocal_void (tmp139) ;
// ATSlocal_void (tmp140) ;
ATSlocal (ats_int_type, tmp141) ;

__ats_lab_aux_labs2explst_30:
do {
/* branch: __ats_lab_46 */
__ats_lab_46_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_47_0 ; }
__ats_lab_46_1:
break ;

/* branch: __ats_lab_47 */
__ats_lab_47_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_47_1:
tmp131 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_0) ;
tmp132 = ats_caselptrlab_mac(anairiats_sum_3, arg1, atslab_1) ;
tmp134 = atspre_gt_int_int (arg2, 0) ;
if (tmp134) {
/* tmp133 = */ atspre_fprint_string (arg0, ATSstrcst(", ")) ;
} else {
/* empty */
} /* end of [if] */
// 
tmp135 = ats_caselptrlab_mac(anairiats_sum_8, tmp131, atslab_0) ;
tmp136 = ats_caselptrlab_mac(anairiats_sum_8, tmp131, atslab_2) ;
tmp138 = _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__label_is_sym (tmp135) ;
if (tmp138) {
/* tmp139 = */ _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__fprint_label (arg0, tmp135) ;
/* tmp137 = */ atspre_fprint_string (arg0, ATSstrcst("=")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp140 = */ aux_s2exp_28 (arg0, tmp136) ;
tmp141 = atspre_add_int_int (arg2, 1) ;
arg0 = arg0 ;
arg1 = tmp132 ;
arg2 = tmp141 ;
goto __ats_lab_aux_labs2explst_30 ; // tail call
break ;
} while (0) ;
return /* (tmp130) */ ;
} /* end of [aux_labs2explst_30] */

/*
// /tmp/ATS-Postiats/src/pats_codegen2_util.dats: 11016(line=671, offs=3) -- 11149(line=683, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2exp (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp142) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2exp:
/* tmp142 = */ aux_s2exp_28 (arg0, arg1) ;
return /* (tmp142) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_2esats__codegen2_emit_s2exp] */

/* static load function */

extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_label_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_util_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_codegen2_util_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_util_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_util_2edats__staload_flag = 1 ;

_2tmp_2ATS_2dPostiats_2src_2pats_label_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_util_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_util_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_util_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_codegen2_util_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_util_dats.c] */
