/*
**
** 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_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_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_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_ptr_type atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_2 ;

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_3 ;

typedef struct {
ats_ptr_type atslab_0 ;
ats_ptr_type atslab_1 ;
ats_ptr_type atslab_2 ;
ats_ptr_type atslab_3 ;
} anairiats_sum_4 ;

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

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

typedef struct {
int tag ;
ats_ptr_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 ;
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_8 ;

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

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

/* external typedefs */
/* external dynamic constructor declarations */
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_cons_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_nil_1) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__None_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__None_vt_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__Some_vt_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Edatconptr_11) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Efun_19) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2Efoldat_23) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2Efreeat_24) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d2exp_trup_wrt_32) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d3exp_foldat_39) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_d3exp_freeat_40) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__PFOBJ_0) ;

/* external dynamic constant declarations */
ATSextern_fun(ats_void_type, atspre_vbox_make_view_ptr) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_prerr_newline) () ;
ATSextern_fun(ats_int_type, atspre_add_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_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_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_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, _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_leftmost) (ats_ptr_type) ;
ATSextern_val(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_t0ype) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_errexp) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__prerr_s2exp) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_is_lin2) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__prerr_the_staerrlst) () ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_type) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_foldat) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_freeat) (ats_ptr_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_staexp2_solve_2esats__s2explst_tyleq_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_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__d2exp_trup) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3lval_set_type_err) (ats_int_type, 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_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_wrt) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__d3exp_open_and_add) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__pfobj_search_atview) (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 */
/* exn constructor declarations */
/* global dynamic (non-functional) constant declarations */
/* internal function declarations */
static
ats_void_type prerr_FILENAME_02045_ () ;
static
ats_void_type prerr_error3_loc_02051_ (ats_ptr_type arg0) ;
static
ats_int_type auxck_free_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2) ;
static
ats_ptr_type auxfind_3 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_ptr_type auxmain_4 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) ;

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

/* function implementations */

/*
// /tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 1622(line=51, offs=3) -- 1662(line=51, offs=43)
*/
ATSstaticdec()
ats_void_type
prerr_FILENAME_02045_ () {
/* local vardec */
// ATSlocal_void (tmp0) ;

__ats_lab_prerr_FILENAME_02045_:
/* tmp0 = */ atspre_prerr_string (ATSstrcst("pats_trans3_fldfrat")) ;
return /* (tmp0) */ ;
} /* end of [prerr_FILENAME_02045_] */

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

__ats_lab_prerr_error3_loc_02051_:
/* tmp10 = */ _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__prerr_location (arg0) ;
/* tmp9 = */ atspre_prerr_string (ATSstrcst(": error(3)")) ;
return /* (tmp9) */ ;
} /* end of [prerr_error3_loc_02051_] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 2088(line=80, offs=1) -- 2820(line=116, offs=4)
*/
ATSstaticdec()
ats_int_type
auxck_free_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_int_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp1) ;
ATSlocal (ats_ptr_type, tmp2) ;
ATSlocal (ats_ptr_type, tmp3) ;
ATSlocal (ats_int_type, tmp4) ;
ATSlocal (ats_bool_type, tmp5) ;
// ATSlocal_void (tmp6) ;
ATSlocal (ats_int_type, tmp7) ;
// ATSlocal_void (tmp8) ;
// ATSlocal_void (tmp11) ;
// ATSlocal_void (tmp12) ;
// ATSlocal_void (tmp13) ;
// ATSlocal_void (tmp14) ;

__ats_lab_auxck_free_1:
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_1_0 ; }
__ats_lab_0_1:
tmp1 = arg2 ;
break ;

/* branch: __ats_lab_1 */
__ats_lab_1_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_1_1:
tmp2 = ats_caselptrlab_mac(anairiats_sum_2, arg1, atslab_0) ;
tmp3 = ats_caselptrlab_mac(anairiats_sum_2, arg1, atslab_1) ;
/* ats_int_type tmp4 ; */
tmp4 = arg2 ;
tmp5 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_is_lin2 (tmp2) ;
if (tmp5) {
tmp7 = atspre_add_int_int (tmp4, 1) ;
tmp4 = tmp7 ;
/* tmp8 = */ prerr_error3_loc_02051_ (arg0) ;
/* tmp11 = */ atspre_prerr_string (ATSstrcst(": [free@] operation cannot be performed")) ;
/* tmp12 = */ atspre_prerr_string (ATSstrcst(": a linear component of the type [")) ;
/* tmp13 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__prerr_s2exp (tmp2) ;
/* tmp14 = */ atspre_prerr_string (ATSstrcst("] may be abandoned.")) ;
/* tmp6 = */ atspre_prerr_newline () ;
} else {
/* empty */
} /* end of [if] */
arg0 = arg0 ;
arg1 = tmp3 ;
arg2 = tmp4 ;
goto __ats_lab_auxck_free_1 ; // tail call
break ;
} while (0) ;
return (tmp1) ;
} /* end of [auxck_free_1] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 2849(line=119, offs=1) -- 3877(line=164, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxfind_3 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp15) ;
ATSlocal (ats_ptr_type, tmp16) ;
ATSlocal (ats_ptr_type, tmp17) ;
ATSlocal (ats_ptr_type, tmp18) ;
ATSlocal (ats_ptr_type, tmp19) ;
ATSlocal (ats_ptr_type, tmp20) ;
ATSlocal (ats_ptr_type, tmp21) ;
ATSlocal (ats_ptr_type, tmp22) ;
// ATSlocal_void (tmp23) ;
ATSlocal (ats_ptr_type, tmp24) ;
ATSlocal (ats_ptr_type, tmp25) ;

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

/* branch: __ats_lab_3 */
__ats_lab_3_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_3_1:
tmp16 = ats_caselptrlab_mac(anairiats_sum_2, arg1, atslab_0) ;
tmp17 = ats_caselptrlab_mac(anairiats_sum_2, arg1, atslab_1) ;
tmp18 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__pfobj_search_atview (tmp16) ;
do {
/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (tmp18 == (ats_sum_ptr_type)0) { goto __ats_lab_5_0 ; }
__ats_lab_4_1:
tmp20 = ats_caselptrlab_mac(anairiats_sum_3, tmp18, atslab_0) ;
ATS_FREE(tmp18) ;
// 
tmp21 = ats_caselptrlab_mac(anairiats_sum_4, tmp20, atslab_0) ;
tmp22 = ats_caselptrlab_mac(anairiats_sum_4, tmp20, atslab_2) ;
ATS_FREE(tmp20) ;
tmp24 = (ats_sum_ptr_type)0 ;
/* tmp23 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_type (tmp21, tmp24) ;
tmp19 = tmp22 ;
break ;

/* branch: __ats_lab_5 */
__ats_lab_5_0:
// if (tmp18 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_5_1:
tmp19 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_errexp (_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_t0ype) ;
break ;
} while (0) ;
tmp25 = auxfind_3 (arg0, tmp17) ;
tmp15 = ATS_MALLOC(sizeof(anairiats_sum_2)) ;
ats_selptrset_mac(anairiats_sum_2, tmp15, atslab_0, tmp19) ;
ats_selptrset_mac(anairiats_sum_2, tmp15, atslab_1, tmp25) ;
break ;
} while (0) ;
return (tmp15) ;
} /* end of [auxfind_3] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 3903(line=167, offs=1) -- 6599(line=263, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxmain_4 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_ptr_type arg3) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp26) ;
ATSlocal (ats_ptr_type, tmp27) ;
ATSlocal (ats_ptr_type, tmp28) ;
// ATSlocal_void (tmp29) ;
ATSlocal (ats_ptr_type, tmp30) ;
ATSlocal (ats_ptr_type, tmp31) ;
ATSlocal (ats_ptr_type, tmp32) ;
ATSlocal (ats_ptr_type, tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;
ATSlocal (ats_ptr_type, tmp35) ;
ATSlocal (ats_int_type, tmp36) ;
ATSlocal (anairiats_rec_1, tmp37) ;
ATSlocal (ats_ptr_type, tmp38) ;
ATSlocal (ats_ptr_type, tmp39) ;
// ATSlocal_void (tmp40) ;
ATSlocal (ats_ptr_type, tmp41) ;
ATSlocal (anairiats_rec_1, tmp42) ;
ATSlocal (ats_ptr_type, tmp43) ;
ATSlocal (ats_ptr_type, tmp44) ;
// ATSlocal_void (tmp45) ;
ATSlocal (ats_ptr_type, tmp46) ;
ATSlocal (ats_ptr_type, tmp47) ;
ATSlocal (ats_ptr_type, tmp48) ;
// ATSlocal_void (tmp49) ;
ATSlocal (ats_bool_type, tmp50) ;
ATSlocal (ats_int_type, tmp51) ;
ATSlocal (ats_bool_type, tmp52) ;
ATSlocal (ats_ptr_type, tmp53) ;
// ATSlocal_void (tmp54) ;
ATSlocal (ats_bool_type, tmp55) ;
ATSlocal (ats_int_type, tmp56) ;
// ATSlocal_void (tmp57) ;
ATSlocal (ats_bool_type, tmp58) ;
// ATSlocal_void (tmp59) ;
// ATSlocal_void (tmp60) ;
// ATSlocal_void (tmp61) ;
// ATSlocal_void (tmp62) ;
// ATSlocal_void (tmp63) ;
ATSlocal (ats_ptr_type, tmp64) ;
// ATSlocal_void (tmp65) ;
ATSlocal (ats_bool_type, tmp66) ;
ATSlocal (ats_int_type, tmp67) ;
// ATSlocal_void (tmp68) ;
ATSlocal (ats_bool_type, tmp69) ;
// ATSlocal_void (tmp70) ;
// ATSlocal_void (tmp71) ;
// ATSlocal_void (tmp72) ;
// ATSlocal_void (tmp73) ;
ATSlocal (ats_ptr_type, tmp74) ;
// ATSlocal_void (tmp75) ;
// ATSlocal_void (tmp76) ;
ATSlocal (ats_bool_type, tmp77) ;
// ATSlocal_void (tmp78) ;
ATSlocal (ats_bool_type, tmp79) ;
// ATSlocal_void (tmp80) ;
// ATSlocal_void (tmp81) ;

__ats_lab_auxmain_4:
tmp27 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, arg3), atslab_d2exp_loc) ;
tmp28 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup (arg3) ;
/* tmp29 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__d3exp_open_and_add (tmp28) ;
tmp30 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_get_type (tmp28) ;
tmp31 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp30), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_6 */
__ats_lab_6_0:
if (((ats_sum_ptr_type)tmp31)->tag != 11) { goto __ats_lab_7_0 ; }
__ats_lab_6_1:
tmp32 = ats_caselptrlab_mac(anairiats_sum_7, tmp31, atslab_0) ;
tmp33 = ats_caselptrlab_mac(anairiats_sum_7, tmp31, atslab_2) ;
tmp34 = auxfind_3 (arg0, tmp33) ;
tmp35 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_type (tmp32) ;
/* ats_int_type tmp36 ; */
tmp36 = 0 ;
tmp37 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_uni_instantiate_sexparglst (tmp35, arg2, (&tmp36)) ;
tmp38 = ats_select_mac(tmp37, atslab_0) ;
tmp39 = ats_select_mac(tmp37, atslab_1) ;
/* tmp40 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt (arg0, tmp39) ;
tmp41 = _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__location_leftmost (tmp27) ;
tmp42 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_uni_instantiate_all (tmp38, tmp41, (&tmp36)) ;
tmp43 = ats_select_mac(tmp42, atslab_0) ;
tmp44 = ats_select_mac(tmp42, atslab_1) ;
/* tmp45 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt (arg0, tmp44) ;
tmp46 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp43), atslab_s2exp_node) ;
if (((ats_sum_ptr_type)tmp46)->tag != 19) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 4701(line=196, offs=9) -- 4781(line=198, offs=28)") ; }
tmp47 = ats_caselptrlab_mac(anairiats_sum_8, tmp46, atslab_4) ;
tmp48 = ats_caselptrlab_mac(anairiats_sum_8, tmp46, atslab_5) ;
tmp50 = atspre_eq_int_int (arg1, 0) ;
if (tmp50) {
tmp51 = auxck_free_1 (arg0, tmp34, 0) ;
tmp52 = atspre_gt_int_int (tmp51, 0) ;
if (tmp52) {
tmp53 = ATS_MALLOC(sizeof(anairiats_sum_9)) ;
((ats_sum_ptr_type)tmp53)->tag = 40 ;
ats_selptrset_mac(anairiats_sum_9, tmp53, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_9, tmp53, atslab_1, tmp28) ;
/* tmp49 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp53) ;
} else {
/* empty */
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
tmp55 = atspre_gt_int_int (arg1, 0) ;
if (tmp55) {
/* ats_int_type tmp56 ; */
tmp56 = 0 ;
/* tmp57 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_err (arg0, tmp34, tmp47, (&tmp56)) ;
tmp58 = atspre_gt_int_int (tmp56, 0) ;
if (tmp58) {
/* tmp59 = */ prerr_error3_loc_02051_ (tmp27) ;
/* tmp60 = */ atspre_prerr_string (ATSstrcst(": [fold@] operation cannot be formed")) ;
/* tmp61 = */ atspre_prerr_string (ATSstrcst(": some argument types are mismatched.")) ;
/* tmp62 = */ atspre_prerr_newline () ;
/* tmp63 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__prerr_the_staerrlst () ;
tmp64 = ATS_MALLOC(sizeof(anairiats_sum_9)) ;
((ats_sum_ptr_type)tmp64)->tag = 39 ;
ats_selptrset_mac(anairiats_sum_9, tmp64, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_9, tmp64, atslab_1, tmp28) ;
/* tmp54 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp64) ;
} else {
/* empty */
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
tmp66 = atspre_gt_int_int (arg1, 0) ;
if (tmp66) {
/* ats_int_type tmp67 ; */
tmp67 = 0 ;
/* tmp68 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d3lval_set_type_err (0, tmp28, tmp48, (&tmp67)) ;
tmp69 = atspre_gt_int_int (tmp67, 0) ;
if (tmp69) {
/* tmp70 = */ prerr_error3_loc_02051_ (tmp27) ;
/* tmp71 = */ atspre_prerr_string (ATSstrcst(": [fold@] operation cannot be formed")) ;
/* tmp72 = */ atspre_prerr_string (ATSstrcst(": the type of the dynamic expression cannot be changed.")) ;
/* tmp73 = */ atspre_prerr_newline () ;
tmp74 = ATS_MALLOC(sizeof(anairiats_sum_9)) ;
((ats_sum_ptr_type)tmp74)->tag = 39 ;
ats_selptrset_mac(anairiats_sum_9, tmp74, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_9, tmp74, atslab_1, tmp28) ;
/* tmp65 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp74) ;
} else {
/* empty */
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
tmp26 = tmp28 ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
__ats_lab_7_1:
/* tmp75 = */ prerr_error3_loc_02051_ (tmp27) ;
tmp77 = atspre_eq_int_int (arg1, 0) ;
if (tmp77) {
/* tmp76 = */ atspre_prerr_string (ATSstrcst(": [free@] operation cannot be performed")) ;
} else {
/* empty */
} /* end of [if] */
tmp79 = atspre_gt_int_int (arg1, 0) ;
if (tmp79) {
/* tmp78 = */ atspre_prerr_string (ATSstrcst(": [fold@] operation cannot be performed")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp80 = */ atspre_prerr_string (ATSstrcst(": unfolded datatype constructor is expected.")) ;
/* tmp81 = */ atspre_prerr_newline () ;
tmp26 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_errexp (arg0) ;
break ;
} while (0) ;
return (tmp26) ;
} /* end of [auxmain_4] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 6675(line=269, offs=3) -- 6845(line=279, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_foldat (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp82) ;
ATSlocal (ats_ptr_type, tmp83) ;
ATSlocal (ats_ptr_type, tmp84) ;
ATSlocal (ats_ptr_type, tmp85) ;
ATSlocal (ats_ptr_type, tmp86) ;
ATSlocal (ats_ptr_type, tmp87) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_foldat:
tmp83 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, arg0), atslab_d2exp_loc) ;
tmp84 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, arg0), atslab_d2exp_node) ;
if (((ats_sum_ptr_type)tmp84)->tag != 23) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 6721(line=273, offs=5) -- 6759(line=273, offs=43)") ; }
tmp85 = ats_caselptrlab_mac(anairiats_sum_9, tmp84, atslab_0) ;
tmp86 = ats_caselptrlab_mac(anairiats_sum_9, tmp84, atslab_1) ;
tmp87 = auxmain_4 (tmp83, 1, tmp85, tmp86) ;
tmp82 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_foldat (tmp83, tmp87) ;
return (tmp82) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_foldat] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 6907(line=283, offs=3) -- 7229(line=301, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_freeat (ats_ptr_type arg0) {
/* local vardec */
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_int_type, tmp93) ;
// ATSlocal_void (tmp94) ;
ATSlocal (ats_bool_type, tmp95) ;
ATSlocal (ats_ptr_type, tmp96) ;
ATSlocal (ats_ptr_type, tmp97) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_freeat:
tmp89 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, arg0), atslab_d2exp_loc) ;
tmp90 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, arg0), atslab_d2exp_node) ;
if (((ats_sum_ptr_type)tmp90)->tag != 24) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_fldfrat.dats: 6953(line=286, offs=5) -- 6991(line=286, offs=43)") ; }
tmp91 = ats_caselptrlab_mac(anairiats_sum_9, tmp90, atslab_0) ;
tmp92 = ats_caselptrlab_mac(anairiats_sum_9, tmp90, atslab_1) ;
tmp93 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__the_effenv_check_wrt (tmp89) ;
tmp95 = atspre_gt_int_int (tmp93, 0) ;
if (tmp95) {
tmp96 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
((ats_sum_ptr_type)tmp96)->tag = 32 ;
ats_selptrset_mac(anairiats_sum_10, tmp96, atslab_0, tmp89) ;
/* tmp94 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp96) ;
} else {
/* empty */
} /* end of [if] */
tmp97 = auxmain_4 (tmp89, 0, tmp91, tmp92) ;
tmp88 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__d3exp_freeat (tmp89, tmp97) ;
return (tmp88) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__d2exp_trup_freeat] */

/* static load function */

// extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_atspre_2edats__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_location_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_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_staexp2_solve_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_fldfrat_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_2edats__staload_flag = 1 ;

// _2tmp_2ATS_2dPostiats_2src_2pats_atspre_2edats__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_location_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload () ;

return ;
} /* staload function */

/* dynamic load function */

// dynload flag declaration
extern ats_int_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_fldfrat_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_fldfrat_dats.c] */
