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

/* 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_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"

#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"

#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_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"

#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"

#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_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_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_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_3 ;
ats_ptr_type atslab_4 ;
} anairiats_rec_0 ;

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

typedef
struct {
ats_bool_type atslab_0 ;
ats_ptr_type atslab_1 ;
ats_ptr_type atslab_2 ;
} anairiats_rec_2 ;

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

typedef struct {
int tag ;
ats_ptr_type atslab_0 ;
ats_int_type atslab_1 ;
ats_ptr_type atslab_2 ;
ats_int_type atslab_3 ;
ats_ptr_type atslab_4 ;
ats_ptr_type atslab_5 ;
} anairiats_sum_4 ;

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

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

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

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

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_9 ;

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

typedef
struct {
ats_ptr_type atslab_d3exp_loc ;
ats_ptr_type atslab_d3exp_type ;
ats_ptr_type atslab_d3exp_node ;
} anairiats_rec_11 ;

typedef struct {
ats_int_type atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_12 ;

typedef
struct {
ats_ptr_type atslab_d2exp_loc ;
ats_ptr_type atslab_d2exp_node ;
} anairiats_rec_13 ;

typedef struct {
anairiats_rec_1 atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_14 ;

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

typedef
struct {
ats_ptr_type atslab_d2sym_loc ;
ats_ptr_type atslab_d2sym_qua ;
ats_ptr_type atslab_d2sym_sym ;
ats_ptr_type atslab_d2sym_pitmlst ;
} anairiats_rec_16 ;

/* 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__list_vt_cons_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_vt_nil_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Efun_19) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Emetfun_20) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Eexi_27) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Euni_28) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2KEfun_5) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2PITM_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2ITMcst_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2ITMvar_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2ITMsymdef_4) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2EXPARGsta_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2EXPARGdyn_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__D3Eitem_23) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d2exp_trup_item_17) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d3exp_trup_applst_eff_24) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d2exp_trup_applst_sym_nil_29) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d2exp_trup_applst_sym_cons2_30) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3PITM_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3EXPARGsta_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3EXPARGdyn_1) ;

/* external dynamic constant declarations */
ATSextern_fun(ats_void_type, atspre_assert_errmsg) (ats_bool_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_vbox_make_view_ptr) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_prerr_newline) () ;
ATSextern_fun(ats_ptr_type, atspre_string_append) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, atspre_neg_bool) (ats_bool_type) ;
ATSextern_fun(ats_int_type, atspre_sub_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_int_type, atspre_max_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_int_type, atspre_isucc) (ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_iadd) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_isub) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_idiv) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_ilt) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_igt) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_igte) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_ieq) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_size1_of_int1) (ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_add_size1_int1) (ats_size_type, ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_sub_size1_int1) (ats_size_type, ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_mul2_size1_size1) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_bool_type, atspre_lt_size1_size1) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_bool_type, atspre_gt_size1_int1) (ats_size_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_neq_size1_size1) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_ptr_type, atspre_ptr_alloc_tsz) (ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_ptr_zero_tsz) (ats_ref_type, ats_size_type) ;
ATSextern_fun(ats_ptr_type, atspre_ref_make_elt_tsz) (ats_ref_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_fprint_string) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_prerr_string) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, ListSubscriptException_make) () ;
ATSextern_fun(ats_ptr_type, atspre_array_ptr_alloc_tsz) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_free) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_initialize_funenv_tsz) (ats_ref_type, ats_size_type, ats_ptr_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_initialize_cloenv_tsz) (ats_ref_type, ats_size_type, ats_ref_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, atspre_array_ptr_split_tsz) (ats_ptr_type, ats_size_type, ats_size_type) ;
ATSextern_fun(ats_ptr_type, atspre_array_ptr_takeout_tsz) (ats_ptr_type, ats_size_type, ats_size_type) ;
ATSextern_fun(anairiats_rec_0, atspre_array_ptr_takeout2_tsz) (ats_ptr_type, ats_size_type, ats_size_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_foreach_funenv_tsz) (ats_ref_type, ats_ptr_type, ats_size_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_iforeach_funenv_tsz) (ats_ref_type, ats_ptr_type, ats_size_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, atspre_array2_ptr_takeout_tsz) (ats_ptr_type, ats_size_type, ats_size_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atslib_qsort) (ats_ref_type, ats_size_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, patsopt_prerrf_ifdebug) (ats_ptr_type, ...) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__prerr_location) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__location_combine) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_unis) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2kexp_make_s2exp) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_hnfize) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2kexplst_ismat) (ats_ptr_type, 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_dynexp2_2esats__d2cst_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__eq_d2cst_d2cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_decarg) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__eq_d2var_d2var) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__fprint_d2itm) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__fprint_d2sym) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2exp_get_seloverld_root) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_item) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_app_sta) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_app_unista) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_app_dyn) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_int_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_errexp) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3explst_trdn_arg) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_var) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_tmpcst) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_tmpvar) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d23exp_trup_applst) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_sym) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_tmpsym) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2explst_trup) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3exp_fun_restore) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3explst_arg_restore) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(anairiats_rec_1, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_unimet_instantiate_all) (ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(anairiats_rec_1, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_uni_instantiate_sexparglst) (ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__the_effenv_check_s2eff) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2fun_opninv_and_add) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(anairiats_rec_2, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__un_s2exp_wthtype) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__d3explst_open_and_add) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;

/* external dynamic terminating constant declarations */
#ifdef _ATS_PROOFCHECK
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2SATS_2list_2esats__list_length_is_nonnegative_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2SATS_2list_vt_2esats__list_vt_length_is_nonnegative_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2SATS_2array_2esats__array_v_takeout2_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____copy_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____free_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____assert_prfck () ;
extern
ats_void_type ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____assert_prfck () ;
#endif /* _ATS_PROOFCHECK */

/* assuming abstract types */
/* sum constructor declarations */
ATSglobal(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3PITM_0) ;
ATSglobal(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3EXPARGsta_0) ;
ATSglobal(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3EXPARGdyn_1) ;

/* exn constructor declarations */
/* global dynamic (non-functional) constant declarations */
/* internal function declarations */
static
ats_void_type prerr_FILENAME_02083_ () ;
static
ats_int_type list_length_compare_01411_ats_ptr_type_2cats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_bool_type loop_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2, ats_ptr_type arg3) ;
static
ats_void_type prerr_error3_loc_02089_ (ats_ptr_type arg0) ;
static
ats_ptr_type d2exp_trup_item_4 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_bool_type list_is_nil_01294_ (ats_ptr_type arg0) ;
static
ats_ptr_type d3exp_trup_item_6 (ats_ptr_type arg0) ;
static
ats_ptr_type d3pitm_make_8 (ats_int_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type d3pitm_get_dexp_9 (ats_ptr_type arg0) ;
static
ats_ptr_type d3pitm_get_type_10 (ats_ptr_type arg0) ;
static
ats_int_type d3pitm_get_pval_11 (ats_ptr_type arg0) ;
static
ats_void_type fprint_d3pitm_12 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type auxsel_arity_14 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) ;
static
ats_ptr_type auxsel_skexplst_15 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type auxmap_17 (ats_ptr_type arg0) ;
static
ats_ptr_type revapp_20 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type list_vt_reverse_append_01507_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type list_vt_reverse_01506_ats_ptr_type (ats_ptr_type arg0) ;
static
ats_void_type loop_23 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) ;
static
ats_ptr_type list_map_funenv_01412_ats_ptr_type_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_ptr_type list_map_fun_01413_ats_ptr_type_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type __ats_fun_24 (ats_ptr_type arg0) ;
static
ats_void_type loop_26 (ats_ptr_type arg0) ;
static
ats_void_type list_vt_free_01499_ats_ptr_type (ats_ptr_type arg0) ;
static
anairiats_rec_15 auxsel_arglst_16 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_int_type loop_28 (ats_ptr_type arg0, ats_int_type arg1) ;
static
ats_bool_type app_31 (ats_ptr_type arg0, ats_clo_ptr_type arg1) ;
static
ats_void_type loop_33 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) ;
static
ats_ptr_type list_filter_funenv_01338_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_ptr_type list_filter_vcloptr_01342_ats_ptr_type (ats_ptr_type arg0, ats_clo_ptr_type arg1) ;
static
ats_ptr_type list_filter_cloptr_01341_ats_ptr_type (ats_ptr_type arg0, ats_clo_ptr_type arg1) ;
static
ats_bool_type __ats_fun_34 (ats_int_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type __ats_fun_34_closure_make (ats_int_type env0) ;
static
ats_bool_type __ats_fun_34_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_ptr_type auxselmax_27 (ats_ptr_type arg0) ;
static
ats_bool_type auxeq_d2itm_35 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_bool_type auxeq_d3pitm_36 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_bool_type __ats_fun_38 (ats_ptr_type env0, ats_ptr_type arg0) ;
static
ats_clo_ptr_type __ats_fun_38_closure_make (ats_ptr_type env0) ;
static
ats_bool_type __ats_fun_38_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) ;
static
ats_ptr_type auxeq_d3pitm_remdup_37 (ats_ptr_type arg0) ;
static
anairiats_rec_1 fopr_41 (ats_ptr_type arg0) ;
static
ats_void_type loop_44 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) ;
static
ats_ptr_type list_map_funenv_01412_ats_ptr_type_anairiats_rec_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_ptr_type list_map_fun_01413_ats_ptr_type_anairiats_rec_1 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type auxins_45 (ats_int_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_ptr_type auxins2_46 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;

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

/* function implementations */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 1676(line=59, offs=1) -- 1723(line=62, offs=29)
*/
ATSstaticdec()
ats_void_type
prerr_FILENAME_02083_ () {
/* local vardec */
// ATSlocal_void (tmp0) ;

__ats_lab_prerr_FILENAME_02083_:
/* tmp0 = */ atspre_prerr_string (ATSstrcst("pats_trans3_appsym")) ;
return /* (tmp0) */ ;
} /* end of [prerr_FILENAME_02083_] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 52087(line=1854, offs=21) -- 52314(line=1862, offs=6)
*/
ATSstaticdec()
ats_int_type
list_length_compare_01411_ats_ptr_type_2cats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_int_type, tmp9) ;
ATSlocal (ats_ptr_type, tmp10) ;
ATSlocal (ats_ptr_type, tmp11) ;

__ats_lab_list_length_compare_01411_ats_ptr_type_2cats_ptr_type:
do {
/* branch: __ats_lab_1 */
__ats_lab_1_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_4_0 ; }
__ats_lab_1_1:
tmp10 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
do {
/* branch: __ats_lab_2 */
__ats_lab_2_0:
if (arg1 == (ats_sum_ptr_type)0) { goto __ats_lab_3_0 ; }
__ats_lab_2_1:
tmp11 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_1) ;
arg0 = tmp10 ;
arg1 = tmp11 ;
goto __ats_lab_list_length_compare_01411_ats_ptr_type_2cats_ptr_type ; // tail call
break ;

/* branch: __ats_lab_3 */
__ats_lab_3_0:
// if (arg1 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_3_1:
tmp9 = 1 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_4 */
__ats_lab_4_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_4_1:
do {
/* branch: __ats_lab_5 */
__ats_lab_5_0:
if (arg1 == (ats_sum_ptr_type)0) { goto __ats_lab_6_0 ; }
__ats_lab_5_1:
tmp9 = -1 ;
break ;

/* branch: __ats_lab_6 */
__ats_lab_6_0:
// if (arg1 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_6_1:
tmp9 = 0 ;
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp9) ;
} /* end of [list_length_compare_01411_ats_ptr_type_2cats_ptr_type] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 2165(line=90, offs=5) -- 2926(line=115, offs=4)
*/
ATSstaticdec()
ats_bool_type
loop_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2, ats_ptr_type arg3) {
/* local vardec */
ATSlocal (ats_bool_type, tmp1) ;
ATSlocal (ats_ptr_type, tmp2) ;
ATSlocal (ats_ptr_type, tmp3) ;
ATSlocal (ats_int_type, tmp4) ;
ATSlocal (ats_ptr_type, tmp5) ;
ATSlocal (ats_ptr_type, tmp6) ;
ATSlocal (ats_bool_type, tmp7) ;
ATSlocal (ats_int_type, tmp8) ;
ATSlocal (ats_bool_type, tmp12) ;
ATSlocal (ats_ptr_type, tmp13) ;
ATSlocal (ats_ptr_type, tmp14) ;
ATSlocal (ats_ptr_type, tmp15) ;

__ats_lab_loop_1:
tmp2 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_hnfize (arg1) ;
tmp3 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_3, tmp2), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (((ats_sum_ptr_type)tmp3)->tag != 19) { goto __ats_lab_7_0 ; }
__ats_lab_0_1:
tmp4 = ats_caselptrlab_mac(anairiats_sum_4, tmp3, atslab_3) ;
tmp5 = ats_caselptrlab_mac(anairiats_sum_4, tmp3, atslab_4) ;
tmp6 = ats_caselptrlab_mac(anairiats_sum_4, tmp3, atslab_5) ;
tmp7 = atspre_eq_int_int (arg2, tmp4) ;
if (tmp7) {
tmp8 = list_length_compare_01411_ats_ptr_type_2cats_ptr_type (arg3, tmp5) ;
tmp12 = atspre_ieq (tmp8, 0) ;
if (tmp12) {
tmp1 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp (arg0, tmp6) ;
} else {
tmp1 = ats_false_bool ;
} /* end of [if] */
} else {
tmp1 = ats_false_bool ;
} /* end of [if] */
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
if (((ats_sum_ptr_type)tmp3)->tag != 27) { goto __ats_lab_8_0 ; }
__ats_lab_7_1:
tmp13 = ats_caselptrlab_mac(anairiats_sum_6, tmp3, atslab_2) ;
arg0 = arg0 ;
arg1 = tmp13 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab_loop_1 ; // tail call
break ;

/* branch: __ats_lab_8 */
__ats_lab_8_0:
if (((ats_sum_ptr_type)tmp3)->tag != 28) { goto __ats_lab_9_0 ; }
__ats_lab_8_1:
tmp14 = ats_caselptrlab_mac(anairiats_sum_6, tmp3, atslab_2) ;
arg0 = arg0 ;
arg1 = tmp14 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab_loop_1 ; // tail call
break ;

/* branch: __ats_lab_9 */
__ats_lab_9_0:
if (((ats_sum_ptr_type)tmp3)->tag != 20) { goto __ats_lab_10_0 ; }
__ats_lab_9_1:
tmp15 = ats_caselptrlab_mac(anairiats_sum_6, tmp3, atslab_2) ;
arg0 = arg0 ;
arg1 = tmp15 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab_loop_1 ; // tail call
break ;

/* branch: __ats_lab_10 */
__ats_lab_10_0:
__ats_lab_10_1:
tmp1 = ats_false_bool ;
break ;
} while (0) ;
return (tmp1) ;
} /* end of [loop_1] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 3006(line=121, offs=3) -- 3316(line=134, offs=4)
*/
ATSglobaldec()
ats_bool_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp16) ;
ATSlocal (ats_ptr_type, tmp17) ;
ATSlocal (ats_ptr_type, tmp18) ;
ATSlocal (ats_int_type, tmp19) ;
ATSlocal (ats_ptr_type, tmp20) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp:
do {
/* branch: __ats_lab_11 */
__ats_lab_11_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_14_0 ; }
__ats_lab_11_1:
tmp17 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp18 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
do {
/* branch: __ats_lab_12 */
__ats_lab_12_0:
if (((ats_sum_ptr_type)tmp17)->tag != 1) { goto __ats_lab_13_0 ; }
__ats_lab_12_1:
tmp19 = ats_caselptrlab_mac(anairiats_sum_7, tmp17, atslab_0) ;
tmp20 = ats_caselptrlab_mac(anairiats_sum_7, tmp17, atslab_2) ;
tmp16 = loop_1 (tmp18, arg1, tmp19, tmp20) ;
break ;

/* branch: __ats_lab_13 */
__ats_lab_13_0:
// if (((ats_sum_ptr_type)tmp17)->tag != 0) { ats_deadcode_failure_handle () ; }
__ats_lab_13_1:
arg0 = tmp18 ;
arg1 = arg1 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp ; // tail call
break ;
} while (0) ;
break ;

/* branch: __ats_lab_14 */
__ats_lab_14_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_14_1:
tmp16 = ats_true_bool ;
break ;
} while (0) ;
return (tmp16) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp] */

/*
// /tmp/ATS-Postiats/src/pats_errmsg.dats: 2341(line=88, offs=17) -- 2399(line=91, offs=2)
*/
ATSstaticdec()
ats_void_type
prerr_error3_loc_02089_ (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp32) ;
// ATSlocal_void (tmp33) ;

__ats_lab_prerr_error3_loc_02089_:
/* tmp33 = */ _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__prerr_location (arg0) ;
/* tmp32 = */ atspre_prerr_string (ATSstrcst(": error(3)")) ;
return /* (tmp32) */ ;
} /* end of [prerr_error3_loc_02089_] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 3404(line=141, offs=1) -- 4343(line=180, offs=4)
*/
ATSstaticdec()
ats_ptr_type
d2exp_trup_item_4 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
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) ;
ATSlocal (ats_ptr_type, tmp27) ;
ATSlocal (ats_ptr_type, tmp28) ;
ATSlocal (ats_ptr_type, tmp29) ;
ATSlocal (ats_ptr_type, tmp30) ;
// ATSlocal_void (tmp31) ;
// ATSlocal_void (tmp34) ;
// ATSlocal_void (tmp35) ;
// ATSlocal_void (tmp36) ;
// ATSlocal_void (tmp37) ;
ATSlocal (ats_ptr_type, tmp38) ;

__ats_lab_d2exp_trup_item_4:
do {
/* branch: __ats_lab_15 */
__ats_lab_15_0:
if (((ats_sum_ptr_type)arg1)->tag != 0) { goto __ats_lab_16_0 ; }
__ats_lab_15_1:
tmp22 = ats_caselptrlab_mac(anairiats_sum_8, arg1, atslab_0) ;
tmp23 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_decarg (tmp22) ;
tmp24 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_type (tmp22) ;
tmp25 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_unis (tmp23, tmp24) ;
tmp21 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_item (arg0, tmp25, arg1, arg2) ;
break ;

/* branch: __ats_lab_16 */
__ats_lab_16_0:
if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_17_0 ; }
__ats_lab_16_1:
tmp26 = ats_caselptrlab_mac(anairiats_sum_8, arg1, atslab_0) ;
tmp27 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_decarg (tmp26) ;
tmp28 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_type (tmp26) ;
if (tmp28 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 3905(line=165, offs=9) -- 3938(line=165, offs=42)") ; }
tmp29 = ats_caselptrlab_mac(anairiats_sum_9, tmp28, atslab_0) ;
tmp30 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_unis (tmp27, tmp29) ;
tmp21 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_item (arg0, tmp30, arg1, arg2) ;
break ;

/* branch: __ats_lab_17 */
__ats_lab_17_0:
__ats_lab_17_1:
/* tmp31 = */ prerr_error3_loc_02089_ (arg0) ;
/* tmp34 = */ patsopt_prerrf_ifdebug (ATSstrcst(": [%s]: %s"), ATSstrcst("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats"), ATSstrcst("d2exp_trup_item")) ;
/* tmp35 = */ atspre_prerr_string (ATSstrcst(": a dynamic constant or variable is expected.")) ;
/* tmp36 = */ atspre_prerr_newline () ;
tmp38 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
((ats_sum_ptr_type)tmp38)->tag = 17 ;
ats_selptrset_mac(anairiats_sum_10, tmp38, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_10, tmp38, atslab_1, arg1) ;
/* tmp37 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp38) ;
tmp21 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_errexp (arg0) ;
break ;
} while (0) ;
return (tmp21) ;
} /* end of [d2exp_trup_item_4] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 50443(line=1783, offs=17) -- 50505(line=1785, offs=4)
*/
ATSstaticdec()
ats_bool_type
list_is_nil_01294_ (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp45) ;

__ats_lab_list_is_nil_01294_:
do {
/* branch: __ats_lab_18 */
__ats_lab_18_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_19_0 ; }
__ats_lab_18_1:
tmp45 = ats_false_bool ;
break ;

/* branch: __ats_lab_19 */
__ats_lab_19_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_19_1:
tmp45 = ats_true_bool ;
break ;
} while (0) ;
return (tmp45) ;
} /* end of [list_is_nil_01294_] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 4398(line=184, offs=5) -- 4994(line=212, offs=4)
*/
ATSstaticdec()
ats_ptr_type
d3exp_trup_item_6 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp39) ;
ATSlocal (ats_ptr_type, tmp40) ;
ATSlocal (ats_ptr_type, tmp41) ;
ATSlocal (ats_ptr_type, tmp42) ;
ATSlocal (ats_ptr_type, tmp43) ;
ATSlocal (ats_bool_type, tmp44) ;
ATSlocal (ats_ptr_type, tmp46) ;
ATSlocal (ats_ptr_type, tmp47) ;
// ATSlocal_void (tmp48) ;
ATSlocal (ats_ptr_type, tmp49) ;

__ats_lab_d3exp_trup_item_6:
tmp40 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_d3exp_loc) ;
tmp41 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_d3exp_node) ;
if (((ats_sum_ptr_type)tmp41)->tag != 23) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 4476(line=188, offs=5) -- 4514(line=188, offs=43)") ; }
tmp42 = ats_caselptrlab_mac(anairiats_sum_10, tmp41, atslab_0) ;
tmp43 = ats_caselptrlab_mac(anairiats_sum_10, tmp41, atslab_1) ;
tmp44 = list_is_nil_01294_ (tmp43) ;
do {
/* branch: __ats_lab_20 */
__ats_lab_20_0:
if (((ats_sum_ptr_type)tmp42)->tag != 0) { goto __ats_lab_21_0 ; }
__ats_lab_20_1:
tmp46 = ats_caselptrlab_mac(anairiats_sum_8, tmp42, atslab_0) ;
if (tmp44) {
tmp39 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_cst (tmp40, tmp46) ;
} else {
tmp39 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_tmpcst (tmp40, tmp46, tmp43) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_21 */
__ats_lab_21_0:
if (((ats_sum_ptr_type)tmp42)->tag != 1) { goto __ats_lab_22_0 ; }
__ats_lab_21_1:
tmp47 = ats_caselptrlab_mac(anairiats_sum_8, tmp42, atslab_0) ;
if (tmp44) {
tmp39 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_var (tmp40, tmp47) ;
} else {
tmp39 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_tmpvar (tmp40, tmp47, tmp43) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_22 */
__ats_lab_22_0:
__ats_lab_22_1:
tmp49 = atspre_string_append ("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 4927(line=209, offs=14) -- 4943(line=209, offs=30)", ATSstrcst("\n")) ;
/* tmp48 = */ atspre_assert_errmsg (ats_false_bool, tmp49) ;
tmp39 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_errexp (tmp40) ;
break ;
} while (0) ;
return (tmp39) ;
} /* end of [d3exp_trup_item_6] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 5192(line=225, offs=1) -- 5260(line=228, offs=31)
*/
ATSstaticdec()
ats_ptr_type
d3pitm_make_8 (ats_int_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp50) ;

__ats_lab_d3pitm_make_8:
tmp50 = ATS_MALLOC(sizeof(anairiats_sum_12)) ;
ats_selptrset_mac(anairiats_sum_12, tmp50, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_12, tmp50, atslab_1, arg1) ;
return (tmp50) ;
} /* end of [d3pitm_make_8] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 5290(line=232, offs=1) -- 5380(line=237, offs=4)
*/
ATSstaticdec()
ats_ptr_type
d3pitm_get_dexp_9 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp51) ;
ATSlocal (ats_ptr_type, tmp52) ;

__ats_lab_d3pitm_get_dexp_9:

tmp52 = ats_caselptrlab_mac(anairiats_sum_12, arg0, atslab_1) ;
tmp51 = tmp52 ;
return (tmp51) ;
} /* end of [d3pitm_get_dexp_9] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 5414(line=240, offs=1) -- 5515(line=245, offs=4)
*/
ATSstaticdec()
ats_ptr_type
d3pitm_get_type_10 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp53) ;
ATSlocal (ats_ptr_type, tmp54) ;

__ats_lab_d3pitm_get_type_10:

tmp54 = ats_caselptrlab_mac(anairiats_sum_12, arg0, atslab_1) ;
tmp53 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, tmp54), atslab_d3exp_type) ;
return (tmp53) ;
} /* end of [d3pitm_get_type_10] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 5549(line=248, offs=1) -- 5638(line=253, offs=4)
*/
ATSstaticdec()
ats_int_type
d3pitm_get_pval_11 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_int_type, tmp55) ;
ATSlocal (ats_int_type, tmp56) ;

__ats_lab_d3pitm_get_pval_11:

tmp56 = ats_caselptrlab_mac(anairiats_sum_12, arg0, atslab_0) ;
tmp55 = tmp56 ;
return (tmp55) ;
} /* end of [d3pitm_get_pval_11] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 5672(line=256, offs=1) -- 5933(line=268, offs=4)
*/
ATSstaticdec()
ats_void_type
fprint_d3pitm_12 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp57) ;
ATSlocal (ats_int_type, tmp58) ;
ATSlocal (ats_ptr_type, tmp59) ;
ATSlocal (ats_ptr_type, tmp60) ;
ATSlocal (ats_ptr_type, tmp61) ;
// ATSlocal_void (tmp62) ;
// ATSlocal_void (tmp63) ;

__ats_lab_fprint_d3pitm_12:

tmp58 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp59 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
tmp60 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, tmp59), atslab_d3exp_node) ;
if (((ats_sum_ptr_type)tmp60)->tag != 23) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 5764(line=261, offs=7) -- 5805(line=262, offs=34)") ; }
tmp61 = ats_caselptrlab_mac(anairiats_sum_10, tmp60, atslab_0) ;
/* tmp62 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__fprint_d2itm (arg0, tmp61) ;
/* tmp63 = */ atspre_fprint_string (arg0, ATSstrcst(" of ")) ;
/* tmp57 = */ atspre_fprint_int (arg0, tmp58) ;
return /* (tmp57) */ ;
} /* end of [fprint_d3pitm_12] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 6479(line=294, offs=3) -- 8763(line=367, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp64) ;
ATSlocal (ats_ptr_type, tmp65) ;
ATSlocal (ats_ptr_type, tmp66) ;
ATSlocal (ats_ptr_type, tmp67) ;
ATSlocal (ats_ptr_type, tmp68) ;
ATSlocal (ats_ptr_type, tmp69) ;
ATSlocal (ats_ptr_type, tmp70) ;
ATSlocal (ats_int_type, tmp71) ;
ATSlocal (anairiats_rec_1, tmp72) ;
ATSlocal (ats_ptr_type, tmp73) ;
ATSlocal (ats_ptr_type, tmp74) ;
// ATSlocal_void (tmp75) ;
ATSlocal (ats_ptr_type, tmp76) ;
ATSlocal (ats_int_type, tmp77) ;
ATSlocal (ats_ptr_type, tmp78) ;
ATSlocal (ats_ptr_type, tmp79) ;
ATSlocal (ats_ptr_type, tmp80) ;
ATSlocal (ats_ptr_type, tmp81) ;
// ATSlocal_void (tmp82) ;
ATSlocal (ats_int_type, tmp83) ;
ATSlocal (anairiats_rec_1, tmp84) ;
ATSlocal (ats_ptr_type, tmp85) ;
ATSlocal (ats_ptr_type, tmp86) ;
// ATSlocal_void (tmp87) ;
ATSlocal (ats_ptr_type, tmp88) ;
ATSlocal (ats_ptr_type, tmp89) ;
ATSlocal (ats_ptr_type, tmp90) ;
ATSlocal (ats_ptr_type, tmp91) ;
ATSlocal (ats_ptr_type, tmp92) ;
ATSlocal (ats_ptr_type, tmp93) ;
ATSlocal (ats_ptr_type, tmp94) ;
ATSlocal (ats_ptr_type, tmp95) ;
ATSlocal (ats_ptr_type, tmp96) ;
ATSlocal (anairiats_rec_2, tmp97) ;
ATSlocal (ats_bool_type, tmp98) ;
ATSlocal (ats_ptr_type, tmp99) ;
ATSlocal (ats_ptr_type, tmp100) ;
ATSlocal (ats_ptr_type, tmp101) ;
ATSlocal (ats_ptr_type, tmp102) ;
ATSlocal (ats_int_type, tmp103) ;
// ATSlocal_void (tmp104) ;
ATSlocal (ats_bool_type, tmp105) ;
ATSlocal (ats_ptr_type, tmp106) ;
ATSlocal (ats_ptr_type, tmp107) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst:
tmp65 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_13, arg0), atslab_d2exp_loc) ;
do {
/* branch: __ats_lab_23 */
__ats_lab_23_0:
if (arg2 == (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; }
__ats_lab_23_1:
tmp66 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp67 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
do {
/* branch: __ats_lab_24 */
__ats_lab_24_0:
if (((ats_sum_ptr_type)tmp66)->tag != 0) { goto __ats_lab_25_0 ; }
__ats_lab_24_1:
tmp68 = ats_caselptrlab_mac(anairiats_sum_10, tmp66, atslab_1) ;
tmp69 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg1), atslab_d3exp_loc) ;
tmp70 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg1), atslab_d3exp_type) ;
/* ats_int_type tmp71 ; */
tmp71 = 0 ;
tmp72 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_uni_instantiate_sexparglst (tmp70, tmp68, (&tmp71)) ;
tmp73 = ats_select_mac(tmp72, atslab_0) ;
tmp74 = ats_select_mac(tmp72, atslab_1) ;
/* tmp75 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt (tmp69, tmp74) ;
tmp76 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_app_sta (tmp65, tmp73, arg1) ;
arg0 = arg0 ;
arg1 = tmp76 ;
arg2 = tmp67 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst ; // tail call
break ;

/* branch: __ats_lab_25 */
__ats_lab_25_0:
// if (((ats_sum_ptr_type)tmp66)->tag != 1) { ats_deadcode_failure_handle () ; }
__ats_lab_25_1:
tmp77 = ats_caselptrlab_mac(anairiats_sum_7, tmp66, atslab_0) ;
tmp78 = ats_caselptrlab_mac(anairiats_sum_7, tmp66, atslab_1) ;
tmp79 = ats_caselptrlab_mac(anairiats_sum_7, tmp66, atslab_2) ;
tmp80 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg1), atslab_d3exp_loc) ;
tmp81 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg1), atslab_d3exp_type) ;
/* tmp82 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__d3explst_open_and_add (tmp79) ;
/* ats_int_type tmp83 ; */
tmp83 = 0 ;
tmp84 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_unimet_instantiate_all (tmp81, tmp78, (&tmp83)) ;
tmp85 = ats_select_mac(tmp84, atslab_0) ;
tmp86 = ats_select_mac(tmp84, atslab_1) ;
/* tmp87 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt (tmp80, tmp86) ;
tmp88 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_app_unista (tmp65, tmp85, arg1) ;
tmp89 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_3, tmp85), atslab_s2exp_node) ;
if (((ats_sum_ptr_type)tmp89)->tag != 19) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 7600(line=331, offs=11) -- 7705(line=333, offs=29)") ; }
tmp90 = ats_caselptrlab_mac(anairiats_sum_4, tmp89, atslab_0) ;
tmp91 = ats_caselptrlab_mac(anairiats_sum_4, tmp89, atslab_2) ;
tmp92 = ats_caselptrlab_mac(anairiats_sum_4, tmp89, atslab_4) ;
tmp93 = ats_caselptrlab_mac(anairiats_sum_4, tmp89, atslab_5) ;
tmp94 = _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__location_combine (tmp80, tmp78) ;
tmp95 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2fun_opninv_and_add (tmp78, tmp92, tmp93) ;
tmp96 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3explst_trdn_arg (tmp79, tmp95) ;
tmp97 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__un_s2exp_wthtype (tmp94, tmp93) ;
tmp98 = ats_select_mac(tmp97, atslab_0) ;
tmp99 = ats_select_mac(tmp97, atslab_1) ;
tmp100 = ats_select_mac(tmp97, atslab_2) ;
tmp101 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3exp_fun_restore (tmp90, tmp88) ;
if (tmp98) {
tmp102 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3explst_arg_restore (tmp96, tmp95, tmp100) ;
} else {
tmp102 = tmp96 ;
} /* end of [if] */
tmp103 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__the_effenv_check_s2eff (tmp94, tmp91) ;
tmp105 = atspre_gt_int_int (tmp103, 0) ;
if (tmp105) {
tmp106 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
((ats_sum_ptr_type)tmp106)->tag = 24 ;
ats_selptrset_mac(anairiats_sum_10, tmp106, atslab_0, tmp94) ;
ats_selptrset_mac(anairiats_sum_10, tmp106, atslab_1, tmp91) ;
/* tmp104 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp106) ;
} else {
/* empty */
} /* end of [if] */
tmp107 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_app_dyn (tmp65, tmp99, tmp101, tmp77, tmp102) ;
arg0 = arg0 ;
arg1 = tmp107 ;
arg2 = tmp67 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst ; // tail call
break ;
} while (0) ;
break ;

/* branch: __ats_lab_26 */
__ats_lab_26_0:
// if (arg2 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_26_1:
tmp64 = arg1 ;
break ;
} while (0) ;
return (tmp64) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 8900(line=380, offs=1) -- 10019(line=422, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxsel_arity_14 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ptr_type arg4) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp108) ;
ATSlocal (ats_ptr_type, tmp109) ;
ATSlocal (ats_ptr_type, tmp110) ;
ATSlocal (ats_ptr_type, tmp111) ;
ATSlocal (ats_ptr_type, tmp112) ;
ATSlocal (ats_int_type, tmp113) ;
ATSlocal (ats_ptr_type, tmp114) ;
ATSlocal (ats_ptr_type, tmp115) ;
ATSlocal (ats_ptr_type, tmp116) ;
ATSlocal (ats_ptr_type, tmp117) ;
ATSlocal (ats_bool_type, tmp118) ;
ATSlocal (ats_ptr_type, tmp119) ;
ATSlocal (ats_ptr_type, tmp120) ;
ATSlocal (ats_ptr_type, tmp121) ;

__ats_lab_auxsel_arity_14:
do {
/* branch: __ats_lab_27 */
__ats_lab_27_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_30_0 ; }
__ats_lab_27_1:
do {
/* branch: __ats_lab_28 */
__ats_lab_28_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_29_0 ; }
__ats_lab_28_1:
tmp108 = (ats_sum_ptr_type)0 ;
break ;

/* branch: __ats_lab_29 */
__ats_lab_29_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_29_1:
tmp109 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp110 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
ATS_FREE(arg2) ;
arg0 = arg0 ;
arg1 = tmp109 ;
arg2 = tmp110 ;
arg3 = arg3 ;
arg4 = arg4 ;
goto __ats_lab_auxsel_arity_14 ; // tail call
break ;
} while (0) ;
break ;

/* branch: __ats_lab_30 */
__ats_lab_30_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_30_1:
tmp111 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_0) ;
tmp112 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_1) ;

tmp113 = ats_caselptrlab_mac(anairiats_sum_12, tmp111, atslab_0) ;
tmp114 = ats_caselptrlab_mac(anairiats_sum_12, tmp111, atslab_1) ;
do {
/* branch: __ats_lab_31 */
__ats_lab_31_0:
if (((ats_sum_ptr_type)tmp114)->tag != 4) { goto __ats_lab_32_0 ; }
__ats_lab_31_1:
tmp115 = ats_caselptrlab_mac(anairiats_sum_10, tmp114, atslab_1) ;
tmp116 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp116, atslab_0, tmp112) ;
ats_selptrset_mac(anairiats_sum_5, tmp116, atslab_1, arg2) ;
arg0 = arg0 ;
arg1 = tmp115 ;
arg2 = tmp116 ;
arg3 = arg3 ;
arg4 = arg4 ;
goto __ats_lab_auxsel_arity_14 ; // tail call
break ;

/* branch: __ats_lab_32 */
__ats_lab_32_0:
__ats_lab_32_1:
tmp117 = d2exp_trup_item_4 (arg0, tmp114, arg3) ;
tmp119 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, tmp117), atslab_d3exp_type) ;
tmp118 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__aritest_d2exparglst_s2exp (arg4, tmp119) ;
tmp120 = auxsel_arity_14 (arg0, tmp112, arg2, arg3, arg4) ;
if (tmp118) {
tmp121 = d3pitm_make_8 (tmp113, tmp117) ;
tmp108 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp108, atslab_0, tmp121) ;
ats_selptrset_mac(anairiats_sum_5, tmp108, atslab_1, tmp120) ;
} else {
tmp108 = tmp120 ;
} /* end of [if] */
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp108) ;
} /* end of [auxsel_arity_14] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 10050(line=425, offs=1) -- 11046(line=475, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxsel_skexplst_15 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp122) ;
ATSlocal (anairiats_rec_1, tmp123) ;
ATSlocal (ats_ptr_type, tmp124) ;
ATSlocal (ats_ptr_type, tmp125) ;
ATSlocal (ats_ptr_type, tmp126) ;
ATSlocal (ats_ptr_type, tmp127) ;
ATSlocal (ats_bool_type, tmp128) ;
ATSlocal (anairiats_rec_1, tmp129) ;
ATSlocal (ats_ptr_type, tmp130) ;
ATSlocal (ats_ptr_type, tmp131) ;

__ats_lab_auxsel_skexplst_15:
do {
/* branch: __ats_lab_33 */
__ats_lab_33_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_34_0 ; }
__ats_lab_33_1:
tmp122 = (ats_sum_ptr_type)0 ;
break ;

/* branch: __ats_lab_34 */
__ats_lab_34_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_34_1:
tmp123 = ats_caselptrlab_mac(anairiats_sum_14, arg0, atslab_0) ;
tmp124 = ats_caselptrlab_mac(anairiats_sum_14, arg0, atslab_1) ;
ATS_FREE(arg0) ;
tmp125 = ats_select_mac(tmp123, atslab_1) ;
do {
/* branch: __ats_lab_35 */
__ats_lab_35_0:
if (((ats_sum_ptr_type)tmp125)->tag != 5) { goto __ats_lab_36_0 ; }
__ats_lab_35_1:
tmp126 = ats_caselptrlab_mac(anairiats_sum_10, tmp125, atslab_0) ;
tmp127 = ats_caselptrlab_mac(anairiats_sum_10, tmp125, atslab_1) ;
tmp128 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2kexplst_ismat (arg1, tmp126) ;
tmp130 = ats_select_mac(tmp123, atslab_0) ;
tmp129.atslab_0 = tmp130 ;
tmp129.atslab_1 = tmp127 ;

tmp131 = auxsel_skexplst_15 (tmp124, arg1) ;
if (tmp128) {
tmp122 = ATS_MALLOC(sizeof(anairiats_sum_14)) ;
ats_selptrset_mac(anairiats_sum_14, tmp122, atslab_0, tmp129) ;
ats_selptrset_mac(anairiats_sum_14, tmp122, atslab_1, tmp131) ;
} else {
tmp122 = tmp131 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_36 */
__ats_lab_36_0:
__ats_lab_36_1:
arg0 = tmp124 ;
arg1 = arg1 ;
goto __ats_lab_auxsel_skexplst_15 ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp122) ;
} /* end of [auxsel_skexplst_15] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 11216(line=488, offs=1) -- 11377(line=496, offs=2)
*/
ATSstaticdec()
ats_ptr_type
auxmap_17 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp133) ;
ATSlocal (anairiats_rec_1, tmp134) ;
ATSlocal (ats_ptr_type, tmp135) ;
ATSlocal (ats_ptr_type, tmp136) ;
ATSlocal (ats_ptr_type, tmp137) ;

__ats_lab_auxmap_17:
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:
tmp133 = (ats_sum_ptr_type)0 ;
break ;

/* branch: __ats_lab_38 */
__ats_lab_38_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_38_1:
tmp134 = ats_caselptrlab_mac(anairiats_sum_14, arg0, atslab_0) ;
tmp135 = ats_caselptrlab_mac(anairiats_sum_14, arg0, atslab_1) ;
ATS_FREE(arg0) ;
tmp136 = ats_select_mac(tmp134, atslab_0) ;
tmp137 = auxmap_17 (tmp135) ;
tmp133 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp133, atslab_0, tmp136) ;
ats_selptrset_mac(anairiats_sum_5, tmp133, atslab_1, tmp137) ;
break ;
} while (0) ;
return (tmp133) ;
} /* end of [auxmap_17] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list_vt.dats: 7889(line=308, offs=7) -- 8174(line=317, offs=28)
*/
ATSstaticdec()
ats_ptr_type
revapp_20 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp141) ;
ATSlocal (ats_ptr_type, tmp142) ;
ATSlocal (ats_ptr_type, tmp143) ;
ATSlocal (ats_ptr_type, tmp144) ;

__ats_lab_revapp_20:
do {
/* branch: __ats_lab_40 */
__ats_lab_40_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_41_0 ; }
__ats_lab_40_1:
tmp142 = &ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
tmp143 = ats_ptrget_mac(ats_ptr_type, tmp142) ;
ats_ptrget_mac(ats_ptr_type, tmp142) = arg1 ;
tmp144 = arg0 ;
arg0 = tmp143 ;
arg1 = tmp144 ;
goto __ats_lab_revapp_20 ; // tail call
break ;

/* branch: __ats_lab_41 */
__ats_lab_41_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_41_1:
tmp141 = arg1 ;
break ;
} while (0) ;
return (tmp141) ;
} /* end of [revapp_20] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list_vt.dats: 7770(line=303, offs=24) -- 8220(line=321, offs=4)
*/
ATSstaticdec()
ats_ptr_type
list_vt_reverse_append_01507_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp140) ;

__ats_lab_list_vt_reverse_append_01507_ats_ptr_type:
tmp140 = revapp_20 (arg0, arg1) ;
return (tmp140) ;
} /* end of [list_vt_reverse_append_01507_ats_ptr_type] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list_vt.dats: 7652(line=298, offs=17) -- 7704(line=299, offs=46)
*/
ATSstaticdec()
ats_ptr_type
list_vt_reverse_01506_ats_ptr_type (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp139) ;
ATSlocal (ats_ptr_type, tmp145) ;

__ats_lab_list_vt_reverse_01506_ats_ptr_type:
tmp145 = (ats_sum_ptr_type)0 ;
tmp139 = list_vt_reverse_append_01507_ats_ptr_type (arg0, tmp145) ;
return (tmp139) ;
} /* end of [list_vt_reverse_01506_ats_ptr_type] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 52519(line=1874, offs=5) -- 52952(line=1891, offs=4)
*/
ATSstaticdec()
ats_void_type
loop_23 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) {
/* local vardec */
// ATSlocal_void (tmp169) ;
ATSlocal (ats_ptr_type, tmp170) ;
ATSlocal (ats_ptr_type, tmp171) ;
ATSlocal (ats_ptr_type, tmp172) ;
ATSlocal (ats_ptr_type, tmp173) ;
ATSlocal (ats_ptr_type, tmp174) ;
ATSlocal (ats_ptr_type, tmp175) ;

__ats_lab_loop_23:
do {
/* branch: __ats_lab_49 */
__ats_lab_49_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_50_0 ; }
__ats_lab_49_1:
tmp170 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp171 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
tmp172 = ((ats_ptr_type(*)(ats_ptr_type, ats_ptr_type))arg1) (tmp170, arg3) ;
tmp173 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp173, atslab_0, tmp172) ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp173 ;
// if (ats_ptrget_mac(ats_ptr_type, arg2) == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
tmp174 = &ats_caselptrlab_mac(anairiats_sum_5, ats_ptrget_mac(ats_ptr_type, arg2), atslab_1) ;
arg0 = tmp171 ;
arg1 = arg1 ;
arg2 = tmp174 ;
arg3 = arg3 ;
goto __ats_lab_loop_23 ; // tail call
break ;

/* branch: __ats_lab_50 */
__ats_lab_50_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_50_1:
tmp175 = (ats_sum_ptr_type)0 ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp175 ;
break ;
} while (0) ;
return /* (tmp169) */ ;
} /* end of [loop_23] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 52444(line=1870, offs=3) -- 53099(line=1899, offs=4)
*/
ATSstaticdec()
ats_ptr_type
list_map_funenv_01412_ats_ptr_type_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp168) ;
ATSlocal (ats_ptr_type, tmp176) ;
// ATSlocal_void (tmp177) ;

__ats_lab_list_map_funenv_01412_ats_ptr_type_ats_ptr_type:
/* ats_ptr_type tmp176 ; */
/* tmp177 = */ loop_23 (arg0, arg1, (&tmp176), arg2) ;
tmp168 = tmp176 ;
return (tmp168) ;
} /* end of [list_map_funenv_01412_ats_ptr_type_ats_ptr_type] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 53173(line=1904, offs=3) -- 53424(line=1911, offs=2)
*/
ATSstaticdec()
ats_ptr_type
list_map_fun_01413_ats_ptr_type_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp167) ;

__ats_lab_list_map_fun_01413_ats_ptr_type_ats_ptr_type:
tmp167 = list_map_funenv_01412_ats_ptr_type_ats_ptr_type (arg0, ats_castfn_mac(ats_ptr_type, arg1), atspre_null_ptr) ;
return (tmp167) ;
} /* end of [list_map_fun_01413_ats_ptr_type_ats_ptr_type] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 12559(line=543, offs=22) -- 12605(line=543, offs=68)
*/
ATSstaticdec()
ats_ptr_type
__ats_fun_24 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp178) ;
ATSlocal (ats_ptr_type, tmp179) ;

__ats_lab___ats_fun_24:
tmp179 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_d3exp_type) ;
tmp178 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2kexp_make_s2exp (tmp179) ;
return (tmp178) ;
} /* end of [__ats_fun_24] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list_vt.dats: 4893(line=177, offs=7) -- 5015(line=178, offs=73)
*/
ATSstaticdec()
ats_void_type
loop_26 (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp183) ;
ATSlocal (ats_ptr_type, tmp184) ;

__ats_lab_loop_26:
do {
/* branch: __ats_lab_51 */
__ats_lab_51_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_52_0 ; }
__ats_lab_51_1:
tmp184 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
ATS_FREE(arg0) ;
arg0 = tmp184 ;
goto __ats_lab_loop_26 ; // tail call
break ;

/* branch: __ats_lab_52 */
__ats_lab_52_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_52_1:
break ;
} while (0) ;
return /* (tmp183) */ ;
} /* end of [loop_26] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list_vt.dats: 4875(line=176, offs=14) -- 5054(line=182, offs=4)
*/
ATSstaticdec()
ats_void_type
list_vt_free_01499_ats_ptr_type (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp182) ;

__ats_lab_list_vt_free_01499_ats_ptr_type:
/* tmp182 = */ loop_26 (arg0) ;
return /* (tmp182) */ ;
} /* end of [list_vt_free_01499_ats_ptr_type] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 11080(line=478, offs=1) -- 12973(line=554, offs=4)
*/
ATSstaticdec()
anairiats_rec_15
auxsel_arglst_16 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (anairiats_rec_15, tmp132) ;
ATSlocal (ats_ptr_type, tmp138) ;
ATSlocal (ats_ptr_type, tmp146) ;
ATSlocal (ats_ptr_type, tmp147) ;
ATSlocal (ats_ptr_type, tmp148) ;
ATSlocal (anairiats_rec_1, tmp149) ;
ATSlocal (ats_ptr_type, tmp150) ;
ATSlocal (ats_ptr_type, tmp151) ;
ATSlocal (ats_ptr_type, tmp152) ;
ATSlocal (ats_ptr_type, tmp153) ;
ATSlocal (ats_ptr_type, tmp154) ;
ATSlocal (ats_ptr_type, tmp155) ;
ATSlocal (ats_ptr_type, tmp156) ;
ATSlocal (ats_ptr_type, tmp157) ;
ATSlocal (ats_ptr_type, tmp158) ;
ATSlocal (ats_ptr_type, tmp159) ;
ATSlocal (ats_ptr_type, tmp160) ;
ATSlocal (ats_ptr_type, tmp161) ;
ATSlocal (ats_int_type, tmp162) ;
ATSlocal (ats_ptr_type, tmp163) ;
ATSlocal (ats_ptr_type, tmp164) ;
ATSlocal (ats_ptr_type, tmp165) ;
ATSlocal (ats_ptr_type, tmp166) ;
ATSlocal (ats_ptr_type, tmp180) ;
// ATSlocal_void (tmp181) ;
ATSlocal (ats_ptr_type, tmp185) ;
ATSlocal (ats_ptr_type, tmp186) ;

__ats_lab_auxsel_arglst_16:
do {
/* branch: __ats_lab_39 */
__ats_lab_39_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_42_0 ; }
__ats_lab_39_1:
tmp138 = list_vt_reverse_01506_ats_ptr_type (arg2) ;
tmp146 = auxmap_17 (arg0) ;
tmp132.atslab_0 = tmp146 ;
tmp132.atslab_1 = ats_castfn_mac(ats_ptr_type, tmp138) ;
tmp132.atslab_2 = arg1 ;

break ;

/* branch: __ats_lab_42 */
__ats_lab_42_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_42_1:
do {
/* branch: __ats_lab_43 */
__ats_lab_43_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_44_0 ; }
__ats_lab_43_1:
ATS_FREE(arg0) ;
tmp147 = list_vt_reverse_01506_ats_ptr_type (arg2) ;
tmp148 = (ats_sum_ptr_type)0 ;
tmp132.atslab_0 = tmp148 ;
tmp132.atslab_1 = ats_castfn_mac(ats_ptr_type, tmp147) ;
tmp132.atslab_2 = arg1 ;

break ;

/* branch: __ats_lab_44 */
__ats_lab_44_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_44_1:
tmp149 = ats_caselptrlab_mac(anairiats_sum_14, arg0, atslab_0) ;
tmp150 = &ats_caselptrlab_mac(anairiats_sum_14, arg0, atslab_1) ;
tmp151 = ats_ptrget_mac(ats_ptr_type, tmp150) ;
do {
/* branch: __ats_lab_45 */
__ats_lab_45_0:
if (tmp151 != (ats_sum_ptr_type)0) { goto __ats_lab_46_0 ; }
__ats_lab_45_1:
ATS_FREE(arg0) ;
tmp152 = list_vt_reverse_01506_ats_ptr_type (arg2) ;
tmp154 = ats_select_mac(tmp149, atslab_0) ;
tmp155 = (ats_sum_ptr_type)0 ;
tmp153 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp153, atslab_0, tmp154) ;
ats_selptrset_mac(anairiats_sum_5, tmp153, atslab_1, tmp155) ;
tmp132.atslab_0 = tmp153 ;
tmp132.atslab_1 = ats_castfn_mac(ats_ptr_type, tmp152) ;
tmp132.atslab_2 = arg1 ;

break ;

/* branch: __ats_lab_46 */
__ats_lab_46_0:
__ats_lab_46_1:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
tmp156 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_0) ;
tmp157 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_1) ;
do {
/* branch: __ats_lab_47 */
__ats_lab_47_0:
if (((ats_sum_ptr_type)tmp156)->tag != 0) { goto __ats_lab_48_0 ; }
__ats_lab_47_1:
tmp158 = ats_caselptrlab_mac(anairiats_sum_10, tmp156, atslab_0) ;
tmp159 = ats_caselptrlab_mac(anairiats_sum_10, tmp156, atslab_1) ;
tmp160 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
((ats_sum_ptr_type)tmp160)->tag = 0 ;
ats_selptrset_mac(anairiats_sum_10, tmp160, atslab_0, tmp158) ;
ats_selptrset_mac(anairiats_sum_10, tmp160, atslab_1, tmp159) ;
tmp161 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp161, atslab_0, tmp160) ;
ats_selptrset_mac(anairiats_sum_5, tmp161, atslab_1, arg2) ;
arg0 = arg0 ;
arg1 = tmp157 ;
arg2 = tmp161 ;
goto __ats_lab_auxsel_arglst_16 ; // tail call
break ;

/* branch: __ats_lab_48 */
__ats_lab_48_0:
// if (((ats_sum_ptr_type)tmp156)->tag != 1) { ats_deadcode_failure_handle () ; }
__ats_lab_48_1:
tmp162 = ats_caselptrlab_mac(anairiats_sum_7, tmp156, atslab_0) ;
tmp163 = ats_caselptrlab_mac(anairiats_sum_7, tmp156, atslab_1) ;
tmp164 = ats_caselptrlab_mac(anairiats_sum_7, tmp156, atslab_2) ;
tmp165 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2explst_trup (tmp164) ;
tmp166 = list_map_fun_01413_ats_ptr_type_ats_ptr_type (tmp165, &__ats_fun_24) ;
tmp180 = auxsel_skexplst_15 (arg0, ats_castfn_mac(ats_ptr_type, tmp166)) ;
/* tmp181 = */ list_vt_free_01499_ats_ptr_type (tmp166) ;
tmp185 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp185)->tag = 1 ;
ats_selptrset_mac(anairiats_sum_7, tmp185, atslab_0, tmp162) ;
ats_selptrset_mac(anairiats_sum_7, tmp185, atslab_1, tmp163) ;
ats_selptrset_mac(anairiats_sum_7, tmp185, atslab_2, tmp165) ;
tmp186 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp186, atslab_0, tmp185) ;
ats_selptrset_mac(anairiats_sum_5, tmp186, atslab_1, arg2) ;
arg0 = tmp180 ;
arg1 = tmp157 ;
arg2 = tmp186 ;
goto __ats_lab_auxsel_arglst_16 ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp132) ;
} /* end of [auxsel_arglst_16] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 13092(line=565, offs=1) -- 13282(line=577, offs=2)
*/
ATSstaticdec()
ats_int_type
loop_28 (ats_ptr_type arg0, ats_int_type arg1) {
/* local vardec */
ATSlocal (ats_int_type, tmp188) ;
ATSlocal (ats_ptr_type, tmp189) ;
ATSlocal (ats_ptr_type, tmp190) ;
ATSlocal (ats_int_type, tmp191) ;
ATSlocal (ats_int_type, tmp192) ;

__ats_lab_loop_28:
do {
/* branch: __ats_lab_53 */
__ats_lab_53_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_54_0 ; }
__ats_lab_53_1:
tmp188 = arg1 ;
break ;

/* branch: __ats_lab_54 */
__ats_lab_54_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_54_1:
tmp189 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp190 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
tmp191 = d3pitm_get_pval_11 (tmp189) ;
tmp192 = atspre_max_int_int (arg1, tmp191) ;
arg0 = tmp190 ;
arg1 = tmp192 ;
goto __ats_lab_loop_28 ; // tail call
break ;
} while (0) ;
return (tmp188) ;
} /* end of [loop_28] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 22131(line=798, offs=6) -- 22186(line=798, offs=61)
*/
ATSstaticdec()
ats_bool_type
app_31 (ats_ptr_type arg0, ats_clo_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp197) ;

__ats_lab_app_31:
tmp197 = ((ats_bool_type(*)(ats_clo_ptr_type, ats_ptr_type))(ats_closure_fun(arg1))) (arg1, arg0) ;
return (tmp197) ;
} /* end of [app_31] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 19833(line=716, offs=7) -- 20397(line=733, offs=40)
*/
ATSstaticdec()
ats_void_type
loop_33 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) {
/* local vardec */
// ATSlocal_void (tmp199) ;
ATSlocal (ats_ptr_type, tmp200) ;
ATSlocal (ats_ptr_type, tmp201) ;
ATSlocal (ats_bool_type, tmp202) ;
ATSlocal (ats_ptr_type, tmp203) ;
ATSlocal (ats_ptr_type, tmp204) ;
ATSlocal (ats_ptr_type, tmp205) ;

__ats_lab_loop_33:
do {
/* branch: __ats_lab_55 */
__ats_lab_55_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_56_0 ; }
__ats_lab_55_1:
tmp200 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp201 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
tmp202 = ((ats_bool_type(*)(ats_ptr_type, ats_ptr_type))arg1) (tmp200, arg3) ;
if (tmp202) {
tmp203 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp203, atslab_0, tmp200) ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp203 ;
// if (ats_ptrget_mac(ats_ptr_type, arg2) == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
tmp204 = &ats_caselptrlab_mac(anairiats_sum_5, ats_ptrget_mac(ats_ptr_type, arg2), atslab_1) ;
arg0 = tmp201 ;
arg1 = arg1 ;
arg2 = tmp204 ;
arg3 = arg3 ;
goto __ats_lab_loop_33 ; // tail call
} else {
arg0 = tmp201 ;
arg1 = arg1 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab_loop_33 ; // tail call
} /* end of [if] */
break ;

/* branch: __ats_lab_56 */
__ats_lab_56_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_56_1:
tmp205 = (ats_sum_ptr_type)0 ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp205 ;
break ;
} while (0) ;
return /* (tmp199) */ ;
} /* end of [loop_33] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 19800(line=714, offs=24) -- 20566(line=744, offs=4)
*/
ATSstaticdec()
ats_ptr_type
list_filter_funenv_01338_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp198) ;
ATSlocal (ats_ptr_type, tmp206) ;
// ATSlocal_void (tmp207) ;

__ats_lab_list_filter_funenv_01338_ats_ptr_type:
/* ats_ptr_type tmp206 ; */
/* tmp207 = */ loop_33 (arg0, arg1, (&tmp206), arg2) ;
tmp198 = tmp206 ;
return (tmp198) ;
} /* end of [list_filter_funenv_01338_ats_ptr_type] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 22056(line=796, offs=19) -- 22250(line=801, offs=4)
*/
ATSstaticdec()
ats_ptr_type
list_filter_vcloptr_01342_ats_ptr_type (ats_ptr_type arg0, ats_clo_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp196) ;

__ats_lab_list_filter_vcloptr_01342_ats_ptr_type:
tmp196 = list_filter_funenv_01338_ats_ptr_type (arg0, &app_31, arg1) ;
return (tmp196) ;
} /* end of [list_filter_vcloptr_01342_ats_ptr_type] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 21511(line=779, offs=15) -- 21973(line=793, offs=4)
*/
ATSstaticdec()
ats_ptr_type
list_filter_cloptr_01341_ats_ptr_type (ats_ptr_type arg0, ats_clo_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp195) ;

__ats_lab_list_filter_cloptr_01341_ats_ptr_type:
tmp195 = list_filter_vcloptr_01342_ats_ptr_type (arg0, arg1) ;
return (tmp195) ;
} /* end of [list_filter_cloptr_01341_ats_ptr_type] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 13391(line=585, offs=3) -- 13430(line=585, offs=42)
*/
ATSstaticdec()
ats_bool_type
__ats_fun_34 (ats_int_type env0, ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp209) ;
ATSlocal (ats_int_type, tmp210) ;

__ats_lab___ats_fun_34:
tmp210 = d3pitm_get_pval_11 (arg0) ;
tmp209 = atspre_eq_int_int (tmp210, env0) ;
return (tmp209) ;
} /* end of [__ats_fun_34] */

typedef struct {
ats_fun_ptr_type closure_fun ;
ats_int_type closure_env_0 ;
} __ats_fun_34_closure_type ;

ats_bool_type
__ats_fun_34_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
return __ats_fun_34 (((__ats_fun_34_closure_type*)cloptr)->closure_env_0, arg0) ;
} /* end of function */

ATSinline()
ats_void_type
__ats_fun_34_closure_init (__ats_fun_34_closure_type *p_clo, ats_int_type env0) {
p_clo->closure_fun = (ats_fun_ptr_type)&__ats_fun_34_clofun ;
p_clo->closure_env_0 = env0 ;
return ;
} /* end of function */

ats_clo_ptr_type
__ats_fun_34_closure_make (ats_int_type env0) {
__ats_fun_34_closure_type *p_clo = ATS_MALLOC(sizeof(__ats_fun_34_closure_type)) ;
__ats_fun_34_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 13034(line=559, offs=1) -- 13486(line=590, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxselmax_27 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp187) ;
ATSlocal (ats_int_type, tmp193) ;
ATSlocal (ats_ptr_type, tmp194) ;
ATSlocal (ats_ptr_type, tmp208) ;

__ats_lab_auxselmax_27:
tmp193 = loop_28 (arg0, -1000000) ;
/* ats_ptr_type tmp208 ; */
tmp208 = __ats_fun_34_closure_make (tmp193) ;
tmp194 = list_filter_cloptr_01341_ats_ptr_type (arg0, tmp208) ;
ATS_FREE(tmp208) ;
tmp187 = ats_castfn_mac(ats_ptr_type, tmp194) ;
return (tmp187) ;
} /* end of [auxselmax_27] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 13514(line=593, offs=1) -- 13802(line=611, offs=2)
*/
ATSstaticdec()
ats_bool_type
auxeq_d2itm_35 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp211) ;
ATSlocal (ats_ptr_type, tmp212) ;
ATSlocal (ats_ptr_type, tmp213) ;
ATSlocal (ats_ptr_type, tmp214) ;
ATSlocal (ats_ptr_type, tmp215) ;

__ats_lab_auxeq_d2itm_35:
do {
/* branch: __ats_lab_57 */
__ats_lab_57_0:
if (((ats_sum_ptr_type)arg0)->tag != 0) { goto __ats_lab_60_0 ; }
__ats_lab_57_1:
tmp212 = ats_caselptrlab_mac(anairiats_sum_8, arg0, atslab_0) ;
do {
/* branch: __ats_lab_58 */
__ats_lab_58_0:
if (((ats_sum_ptr_type)arg1)->tag != 0) { goto __ats_lab_59_0 ; }
__ats_lab_58_1:
tmp213 = ats_caselptrlab_mac(anairiats_sum_8, arg1, atslab_0) ;
tmp211 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__eq_d2cst_d2cst (tmp212, tmp213) ;
break ;

/* branch: __ats_lab_59 */
__ats_lab_59_0:
__ats_lab_59_1:
tmp211 = ats_false_bool ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_60 */
__ats_lab_60_0:
if (((ats_sum_ptr_type)arg0)->tag != 1) { goto __ats_lab_63_0 ; }
__ats_lab_60_1:
tmp214 = ats_caselptrlab_mac(anairiats_sum_8, arg0, atslab_0) ;
do {
/* branch: __ats_lab_61 */
__ats_lab_61_0:
if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_62_0 ; }
__ats_lab_61_1:
tmp215 = ats_caselptrlab_mac(anairiats_sum_8, arg1, atslab_0) ;
tmp211 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__eq_d2var_d2var (tmp214, tmp215) ;
break ;

/* branch: __ats_lab_62 */
__ats_lab_62_0:
__ats_lab_62_1:
tmp211 = ats_false_bool ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_63 */
__ats_lab_63_0:
__ats_lab_63_1:
tmp211 = ats_false_bool ;
break ;
} while (0) ;
return (tmp211) ;
} /* end of [auxeq_d2itm_35] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 13836(line=615, offs=1) -- 14184(line=638, offs=4)
*/
ATSstaticdec()
ats_bool_type
auxeq_d3pitm_36 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp216) ;
ATSlocal (ats_ptr_type, tmp217) ;
ATSlocal (ats_ptr_type, tmp218) ;
ATSlocal (ats_ptr_type, tmp219) ;
ATSlocal (ats_ptr_type, tmp220) ;
ATSlocal (ats_ptr_type, tmp221) ;
ATSlocal (ats_ptr_type, tmp222) ;

__ats_lab_auxeq_d3pitm_36:
tmp217 = d3pitm_get_dexp_9 (arg0) ;
tmp218 = d3pitm_get_dexp_9 (arg1) ;
tmp219 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, tmp217), atslab_d3exp_node) ;
do {
/* branch: __ats_lab_64 */
__ats_lab_64_0:
if (((ats_sum_ptr_type)tmp219)->tag != 23) { goto __ats_lab_67_0 ; }
__ats_lab_64_1:
tmp220 = ats_caselptrlab_mac(anairiats_sum_10, tmp219, atslab_0) ;
tmp221 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, tmp218), atslab_d3exp_node) ;
do {
/* branch: __ats_lab_65 */
__ats_lab_65_0:
if (((ats_sum_ptr_type)tmp221)->tag != 23) { goto __ats_lab_66_0 ; }
__ats_lab_65_1:
tmp222 = ats_caselptrlab_mac(anairiats_sum_10, tmp221, atslab_0) ;
tmp216 = auxeq_d2itm_35 (tmp220, tmp222) ;
break ;

/* branch: __ats_lab_66 */
__ats_lab_66_0:
__ats_lab_66_1:
tmp216 = ats_false_bool ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_67 */
__ats_lab_67_0:
__ats_lab_67_1:
tmp216 = ats_false_bool ;
break ;
} while (0) ;
return (tmp216) ;
} /* end of [auxeq_d3pitm_36] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 14419(line=653, offs=7) -- 14454(line=653, offs=42)
*/
ATSstaticdec()
ats_bool_type
__ats_fun_38 (ats_ptr_type env0, ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp228) ;
ATSlocal (ats_bool_type, tmp229) ;

__ats_lab___ats_fun_38:
tmp229 = auxeq_d3pitm_36 (env0, arg0) ;
tmp228 = atspre_neg_bool (tmp229) ;
return (tmp228) ;
} /* end of [__ats_fun_38] */

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

ats_bool_type
__ats_fun_38_clofun (ats_clo_ptr_type cloptr, ats_ptr_type arg0) {
return __ats_fun_38 (((__ats_fun_38_closure_type*)cloptr)->closure_env_0, arg0) ;
} /* end of function */

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

ats_clo_ptr_type
__ats_fun_38_closure_make (ats_ptr_type env0) {
__ats_fun_38_closure_type *p_clo = ATS_MALLOC(sizeof(__ats_fun_38_closure_type)) ;
__ats_fun_38_closure_init (p_clo, env0) ;
return (ats_clo_ptr_type)p_clo ;
} /* end of function */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 14215(line=641, offs=1) -- 14537(line=658, offs=2)
*/
ATSstaticdec()
ats_ptr_type
auxeq_d3pitm_remdup_37 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp223) ;
ATSlocal (ats_ptr_type, tmp224) ;
ATSlocal (ats_ptr_type, tmp225) ;
ATSlocal (ats_ptr_type, tmp226) ;
ATSlocal (ats_ptr_type, tmp227) ;

__ats_lab_auxeq_d3pitm_remdup_37:
do {
/* branch: __ats_lab_68 */
__ats_lab_68_0:
if (arg0 != (ats_sum_ptr_type)0) { goto __ats_lab_69_0 ; }
__ats_lab_68_1:
tmp223 = (ats_sum_ptr_type)0 ;
break ;

/* branch: __ats_lab_69 */
__ats_lab_69_0:
// if (arg0 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_69_1:
tmp224 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp225 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
/* ats_ptr_type tmp227 ; */
tmp227 = __ats_fun_38_closure_make (tmp224) ;
tmp226 = list_filter_cloptr_01341_ats_ptr_type (tmp225, tmp227) ;
ATS_FREE(tmp227) ;
tmp223 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp223, atslab_0, tmp224) ;
ats_selptrset_mac(anairiats_sum_5, tmp223, atslab_1, ats_castfn_mac(ats_ptr_type, tmp226)) ;
break ;
} while (0) ;
return (tmp223) ;
} /* end of [auxeq_d3pitm_remdup_37] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 14632(line=664, offs=3) -- 14748(line=670, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_sym (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp230) ;
ATSlocal (ats_ptr_type, tmp231) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_sym:
tmp231 = (ats_sum_ptr_type)0 ;
tmp230 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_tmpsym (arg0, arg1, tmp231, arg2) ;
return (tmp230) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_sym] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 15264(line=698, offs=3) -- 15412(line=707, offs=6)
*/
ATSstaticdec()
anairiats_rec_1
fopr_41 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (anairiats_rec_1, tmp238) ;
ATSlocal (ats_ptr_type, tmp239) ;
ATSlocal (ats_ptr_type, tmp240) ;

__ats_lab_fopr_41:
tmp239 = d3pitm_get_type_10 (arg0) ;
tmp240 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2kexp_make_s2exp (tmp239) ;
tmp238.atslab_0 = arg0 ;
tmp238.atslab_1 = tmp240 ;

return (tmp238) ;
} /* end of [fopr_41] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 52519(line=1874, offs=5) -- 52952(line=1891, offs=4)
*/
ATSstaticdec()
ats_void_type
loop_44 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) {
/* local vardec */
// ATSlocal_void (tmp244) ;
ATSlocal (ats_ptr_type, tmp245) ;
ATSlocal (ats_ptr_type, tmp246) ;
ATSlocal (anairiats_rec_1, tmp247) ;
ATSlocal (ats_ptr_type, tmp248) ;
ATSlocal (ats_ptr_type, tmp249) ;
ATSlocal (ats_ptr_type, tmp250) ;

__ats_lab_loop_44:
do {
/* branch: __ats_lab_70 */
__ats_lab_70_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_71_0 ; }
__ats_lab_70_1:
tmp245 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_0) ;
tmp246 = ats_caselptrlab_mac(anairiats_sum_5, arg0, atslab_1) ;
tmp247 = ((anairiats_rec_1(*)(ats_ptr_type, ats_ptr_type))arg1) (tmp245, arg3) ;
tmp248 = ATS_MALLOC(sizeof(anairiats_sum_14)) ;
ats_selptrset_mac(anairiats_sum_14, tmp248, atslab_0, tmp247) ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp248 ;
// if (ats_ptrget_mac(ats_ptr_type, arg2) == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
tmp249 = &ats_caselptrlab_mac(anairiats_sum_14, ats_ptrget_mac(ats_ptr_type, arg2), atslab_1) ;
arg0 = tmp246 ;
arg1 = arg1 ;
arg2 = tmp249 ;
arg3 = arg3 ;
goto __ats_lab_loop_44 ; // tail call
break ;

/* branch: __ats_lab_71 */
__ats_lab_71_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_71_1:
tmp250 = (ats_sum_ptr_type)0 ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp250 ;
break ;
} while (0) ;
return /* (tmp244) */ ;
} /* end of [loop_44] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 52444(line=1870, offs=3) -- 53099(line=1899, offs=4)
*/
ATSstaticdec()
ats_ptr_type
list_map_funenv_01412_ats_ptr_type_anairiats_rec_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp243) ;
ATSlocal (ats_ptr_type, tmp251) ;
// ATSlocal_void (tmp252) ;

__ats_lab_list_map_funenv_01412_ats_ptr_type_anairiats_rec_1:
/* ats_ptr_type tmp251 ; */
/* tmp252 = */ loop_44 (arg0, arg1, (&tmp251), arg2) ;
tmp243 = tmp251 ;
return (tmp243) ;
} /* end of [list_map_funenv_01412_ats_ptr_type_anairiats_rec_1] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 53173(line=1904, offs=3) -- 53424(line=1911, offs=2)
*/
ATSstaticdec()
ats_ptr_type
list_map_fun_01413_ats_ptr_type_anairiats_rec_1 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp242) ;

__ats_lab_list_map_fun_01413_ats_ptr_type_anairiats_rec_1:
tmp242 = list_map_funenv_01412_ats_ptr_type_anairiats_rec_1 (arg0, ats_castfn_mac(ats_ptr_type, arg1), atspre_null_ptr) ;
return (tmp242) ;
} /* end of [list_map_fun_01413_ats_ptr_type_anairiats_rec_1] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 14821(line=674, offs=3) -- 17117(line=778, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_tmpsym (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp232) ;
ATSlocal (ats_ptr_type, tmp233) ;
ATSlocal (ats_ptr_type, tmp234) ;
ATSlocal (ats_ptr_type, tmp235) ;
ATSlocal (ats_ptr_type, tmp236) ;
ATSlocal (ats_ptr_type, tmp237) ;
ATSlocal (ats_ptr_type, tmp241) ;
// ATSlocal_void (tmp253) ;
ATSlocal (anairiats_rec_15, tmp254) ;
ATSlocal (ats_ptr_type, tmp255) ;
ATSlocal (ats_ptr_type, tmp256) ;
ATSlocal (ats_ptr_type, tmp257) ;
ATSlocal (ats_ptr_type, tmp258) ;
// ATSlocal_void (tmp259) ;
// ATSlocal_void (tmp260) ;
// ATSlocal_void (tmp261) ;
// ATSlocal_void (tmp262) ;
// ATSlocal_void (tmp263) ;
// ATSlocal_void (tmp264) ;
ATSlocal (ats_ptr_type, tmp265) ;
ATSlocal (ats_ptr_type, tmp266) ;
ATSlocal (ats_ptr_type, tmp267) ;
ATSlocal (ats_ptr_type, tmp268) ;
ATSlocal (ats_ptr_type, tmp269) ;
ATSlocal (ats_ptr_type, tmp270) ;
ATSlocal (ats_ptr_type, tmp271) ;
ATSlocal (ats_ptr_type, tmp272) ;
ATSlocal (ats_ptr_type, tmp273) ;
ATSlocal (ats_ptr_type, tmp274) ;
ATSlocal (ats_ptr_type, tmp275) ;
// ATSlocal_void (tmp276) ;
// 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 (ats_ptr_type, tmp285) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_tmpsym:
tmp233 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_13, arg0), atslab_d2exp_loc) ;
tmp234 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_16, arg1), atslab_d2sym_loc) ;
tmp235 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_16, arg1), atslab_d2sym_pitmlst) ;
tmp237 = (ats_sum_ptr_type)0 ;
tmp236 = auxsel_arity_14 (tmp234, tmp235, tmp237, arg2, arg3) ;
tmp241 = list_map_fun_01413_ats_ptr_type_anairiats_rec_1 (ats_castfn_mac(ats_ptr_type, tmp236), &fopr_41) ;
/* tmp253 = */ list_vt_free_01499_ats_ptr_type (tmp236) ;
tmp255 = (ats_sum_ptr_type)0 ;
tmp254 = auxsel_arglst_16 (tmp241, arg3, tmp255) ;
tmp256 = ats_select_mac(tmp254, atslab_0) ;
tmp257 = auxselmax_27 (tmp256) ;
tmp258 = auxeq_d3pitm_remdup_37 (tmp257) ;
do {
/* branch: __ats_lab_72 */
__ats_lab_72_0:
if (tmp258 != (ats_sum_ptr_type)0) { goto __ats_lab_73_0 ; }
__ats_lab_72_1:
/* tmp259 = */ prerr_error3_loc_02089_ (tmp233) ;
/* tmp260 = */ atspre_prerr_string (ATSstrcst(": the symbol [")) ;
/* tmp261 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__fprint_d2sym (stderr, arg1) ;
/* tmp262 = */ atspre_prerr_string (ATSstrcst("] cannot be resolved as no match is found.")) ;
/* tmp263 = */ atspre_prerr_newline () ;
tmp265 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
((ats_sum_ptr_type)tmp265)->tag = 29 ;
ats_selptrset_mac(anairiats_sum_10, tmp265, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_10, tmp265, atslab_1, arg1) ;
/* tmp264 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp265) ;
tmp232 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_errexp (tmp233) ;
break ;

/* branch: __ats_lab_73 */
__ats_lab_73_0:
if (tmp258 == (ats_sum_ptr_type)0) { goto __ats_lab_74_0 ; }
tmp266 = ats_caselptrlab_mac(anairiats_sum_5, tmp258, atslab_1) ;
if (tmp266 != (ats_sum_ptr_type)0) { goto __ats_lab_74_0 ; }
__ats_lab_73_1:
tmp267 = ats_caselptrlab_mac(anairiats_sum_5, tmp258, atslab_0) ;
tmp268 = d3pitm_get_dexp_9 (tmp267) ;
tmp269 = d3exp_trup_item_6 (tmp268) ;
tmp271 = ats_select_mac(tmp254, atslab_1) ;
tmp270 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__d3exp_trup_applst (arg0, tmp269, tmp271) ;
tmp272 = ats_select_mac(tmp254, atslab_2) ;
tmp232 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d23exp_trup_applst (arg0, tmp270, tmp272) ;
break ;

/* branch: __ats_lab_74 */
__ats_lab_74_0:
// if (tmp258 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
tmp273 = ats_caselptrlab_mac(anairiats_sum_5, tmp258, atslab_1) ;
// if (tmp273 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_74_1:
tmp274 = ats_caselptrlab_mac(anairiats_sum_5, tmp258, atslab_0) ;
tmp275 = ats_caselptrlab_mac(anairiats_sum_5, tmp273, atslab_0) ;
/* tmp276 = */ prerr_error3_loc_02089_ (tmp233) ;
/* tmp277 = */ atspre_prerr_string (ATSstrcst(": the symbol [")) ;
/* tmp278 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__fprint_d2sym (stderr, arg1) ;
/* tmp279 = */ atspre_prerr_string (ATSstrcst("] cannot be resolved due to too many matches:\n")) ;
/* tmp280 = */ fprint_d3pitm_12 (stderr, tmp274) ;
/* tmp281 = */ atspre_prerr_newline () ;
/* tmp282 = */ fprint_d3pitm_12 (stderr, tmp275) ;
/* tmp283 = */ atspre_prerr_newline () ;
tmp285 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
((ats_sum_ptr_type)tmp285)->tag = 30 ;
ats_selptrset_mac(anairiats_sum_10, tmp285, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_10, tmp285, atslab_1, arg1) ;
/* tmp284 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp285) ;
tmp232 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_errexp (tmp233) ;
break ;
} while (0) ;
return (tmp232) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_tmpsym] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 17213(line=787, offs=1) -- 17467(line=801, offs=2)
*/
ATSstaticdec()
ats_ptr_type
auxins_45 (ats_int_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp286) ;
ATSlocal (ats_bool_type, tmp287) ;
ATSlocal (ats_ptr_type, tmp288) ;
ATSlocal (ats_ptr_type, tmp289) ;
ATSlocal (ats_ptr_type, tmp290) ;
ATSlocal (ats_int_type, tmp291) ;

__ats_lab_auxins_45:
tmp287 = atspre_gt_int_int (arg0, 0) ;
if (tmp287) {
if (arg2 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 17312(line=795, offs=9) -- 17340(line=795, offs=37)") ; }
tmp288 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp289 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
tmp291 = atspre_sub_int_int (arg0, 1) ;
tmp290 = auxins_45 (tmp291, arg1, tmp289) ;
tmp286 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp286, atslab_0, tmp288) ;
ats_selptrset_mac(anairiats_sum_5, tmp286, atslab_1, tmp290) ;
} else {
tmp286 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp286, atslab_0, arg1) ;
ats_selptrset_mac(anairiats_sum_5, tmp286, atslab_1, arg2) ;
} /* end of [if] */
return (tmp286) ;
} /* end of [auxins_45] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 17473(line=804, offs=1) -- 18123(line=834, offs=2)
*/
ATSstaticdec()
ats_ptr_type
auxins2_46 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp292) ;
ATSlocal (ats_ptr_type, tmp293) ;
ATSlocal (ats_ptr_type, tmp294) ;
ATSlocal (ats_ptr_type, tmp295) ;
ATSlocal (ats_ptr_type, tmp296) ;
ATSlocal (ats_ptr_type, tmp297) ;
ATSlocal (ats_ptr_type, tmp298) ;
ATSlocal (ats_ptr_type, tmp299) ;
ATSlocal (ats_ptr_type, tmp300) ;
ATSlocal (ats_int_type, tmp301) ;
ATSlocal (ats_ptr_type, tmp302) ;
ATSlocal (ats_ptr_type, tmp303) ;
ATSlocal (ats_ptr_type, tmp304) ;
ATSlocal (ats_ptr_type, tmp305) ;

__ats_lab_auxins2_46:
do {
/* branch: __ats_lab_75 */
__ats_lab_75_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_76_0 ; }
__ats_lab_75_1:
tmp294 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_13, arg0), atslab_d2exp_loc) ;
tmp296 = (ats_sum_ptr_type)0 ;
tmp295 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp295, atslab_0, arg1) ;
ats_selptrset_mac(anairiats_sum_5, tmp295, atslab_1, tmp296) ;
tmp293 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp293)->tag = 1 ;
ats_selptrset_mac(anairiats_sum_7, tmp293, atslab_0, -1) ;
ats_selptrset_mac(anairiats_sum_7, tmp293, atslab_1, tmp294) ;
ats_selptrset_mac(anairiats_sum_7, tmp293, atslab_2, tmp295) ;
tmp297 = (ats_sum_ptr_type)0 ;
tmp292 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp292, atslab_0, tmp293) ;
ats_selptrset_mac(anairiats_sum_5, tmp292, atslab_1, tmp297) ;
break ;

/* branch: __ats_lab_76 */
__ats_lab_76_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_76_1:
tmp298 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp299 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
do {
/* branch: __ats_lab_77 */
__ats_lab_77_0:
if (((ats_sum_ptr_type)tmp298)->tag != 0) { goto __ats_lab_78_0 ; }
__ats_lab_77_1:
tmp300 = auxins2_46 (arg0, arg1, tmp299) ;
tmp292 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp292, atslab_0, tmp298) ;
ats_selptrset_mac(anairiats_sum_5, tmp292, atslab_1, tmp300) ;
break ;

/* branch: __ats_lab_78 */
__ats_lab_78_0:
// if (((ats_sum_ptr_type)tmp298)->tag != 1) { ats_deadcode_failure_handle () ; }
__ats_lab_78_1:
tmp301 = ats_caselptrlab_mac(anairiats_sum_7, tmp298, atslab_0) ;
tmp302 = ats_caselptrlab_mac(anairiats_sum_7, tmp298, atslab_1) ;
tmp303 = ats_caselptrlab_mac(anairiats_sum_7, tmp298, atslab_2) ;
tmp305 = auxins_45 (tmp301, arg1, tmp303) ;
tmp304 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp304)->tag = 1 ;
ats_selptrset_mac(anairiats_sum_7, tmp304, atslab_0, tmp301) ;
ats_selptrset_mac(anairiats_sum_7, tmp304, atslab_1, tmp302) ;
ats_selptrset_mac(anairiats_sum_7, tmp304, atslab_2, tmp305) ;
tmp292 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp292, atslab_0, tmp304) ;
ats_selptrset_mac(anairiats_sum_5, tmp292, atslab_1, tmp299) ;
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp292) ;
} /* end of [auxins2_46] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_appsym.dats: 18210(line=840, offs=3) -- 18398(line=850, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_seloverld (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp306) ;
ATSlocal (ats_ptr_type, tmp307) ;
ATSlocal (ats_ptr_type, tmp308) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_seloverld:
tmp307 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2exp_get_seloverld_root (arg1) ;
tmp308 = auxins2_46 (arg0, tmp307, arg3) ;
tmp306 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_sym (arg0, arg2, tmp308) ;
return (tmp306) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_applst_seloverld] */

/* static load function */

// extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_atspre_2edats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__staload (void) ;
// extern ats_void_type ATS_2d0_2e2_2e12_2prelude_2SATS_2unsafe_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_errmsg_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_errmsg_2edats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_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_dynexp3_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload (void) ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__staload_flag = 1 ;

// _2tmp_2ATS_2dPostiats_2src_2pats_atspre_2edats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__staload () ;
// ATS_2d0_2e2_2e12_2prelude_2SATS_2unsafe_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_errmsg_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_errmsg_2edats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload () ;

// _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3PITM_0.tag = 0 ;
// _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3EXPARGsta_0.tag = 0 ;
// _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__D3EXPARGdyn_1.tag = 1 ;
return ;
} /* staload function */

/* dynamic load function */

// dynload flag declaration
extern ats_int_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_appsym_2edats__staload () ;

#ifdef _ATS_PROOFCHECK
ATS_2d0_2e2_2e12_2prelude_2SATS_2list_2esats__list_length_is_nonnegative_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2SATS_2list_vt_2esats__list_vt_length_is_nonnegative_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2SATS_2array_2esats__array_v_takeout2_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____copy_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____free_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____assert_prfck () ;
#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_trans3_appsym_dats.c] */
