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

#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_int_type atslab_0 ;
ats_ptr_type atslab_1 ;
ats_ptr_type atslab_2 ;
ats_ptr_type atslab_3 ;
} anairiats_rec_1 ;

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

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

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

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

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

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_7 ;

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

typedef struct {
int tag ;
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 {
int tag ;
ats_int_type atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_11 ;

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

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

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

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

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_16 ;

typedef struct {
anairiats_rec_2 atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_17 ;

/* 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, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__WTHS2EXPLSTnil_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__WTHS2EXPLSTcons_none_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__WTHS2EXPLSTcons_invar_2) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__WTHS2EXPLSTcons_trans_3) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__SLABELED_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2EFFset_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2EFFexp_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Ecst_4) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Evar_7) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2EVar_8) ;
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__S2Eat_12) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Eapp_17) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Efun_19) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Etop_22) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Ewithout_23) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Etyarr_24) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Etyrec_25) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Einvar_26) ;
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__S2Erefarg_29) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Evararg_30) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Ewthtype_31) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_label_equal_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_stamp_equal_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_funclo_equal_2) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_clokind_equal_3) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_linearity_equal_4) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_pfarity_equal_5) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_s2eff_subeq_6) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_boxity_equal_7) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_tyreckind_equal_8) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_refval_equal_9) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_s2zexp_merge_10) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_s2exp_equal_11) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_s2exp_tyleq_12) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_s2Var_s2exp_solve_13) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_s2explst_length_14) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_labs2explst_length_15) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__STAERR_wths2explst_shape_16) ;

/* external dynamic constant declarations */
ATSextern_fun(ats_void_type, atspre_vbox_make_view_ptr) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, atspre_neg_bool) (ats_bool_type) ;
ATSextern_fun(ats_int_type, atspre_add_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_sub_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_lt_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_lte_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_gt_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_gte_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_eq_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_neq_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_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_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_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__eq_funclo_funclo) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__compare_label_label) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_stamp_2esats__compare_stamp_stamp) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_effect_2esats__effset_isnil) (ats_uint_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_effect_2esats__effset_isall) (ats_uint_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_effect_2esats__effset_subset) (ats_uint_type, ats_uint_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_get_pol) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_ltmat1) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_boxed) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_nameless) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_tyreckind_tyreckind) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_argsrtss) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2cst_s2cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__neq_s2cst_s2cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_subeq) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__compare_s2var_s2var) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_srt) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_set_link) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Varlst_add_sVarlst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_lbs) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_ubs) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2VarBound_get_val) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_lb_insert) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_ub_insert) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2Var_s2Var) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_d2con_d2con) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_eff) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_nonlin) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_impred) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_szexp) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_set_szexp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_is_bot) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_make_s2exp) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_is_abscon) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf_cast) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_syneq) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_syneq2) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_tszeq) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2zexp_merge) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(anairiats_rec_1, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2Var_occurcheck_s2exp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2exp_bool) (ats_bool_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2eff_hnfize) (ats_ptr_type) ;
ATSextern_fun(anairiats_rec_2, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_exi_instantiate_all) (ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(anairiats_rec_2, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_uni_instantiate_all) (ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2var_occurcheck_s2exp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_pop_and_add_main) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_push) () ;
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_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_eqeq) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_prop) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_bind) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_eqeq) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_absuni_and_add) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_opnexi_and_add) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__label_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve_err) (ats_ptr_type, ats_int_type, ats_int_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err) (ats_ptr_type, ats_int_type, ats_int_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__tyreckind_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err) (ats_ptr_type, ats_int_type, ats_int_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_equal_solve_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_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_staexp2_solve_2esats__s2exp_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_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_staexp2_solve_2esats__labs2explst_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_staexp2_solve_2esats__wths2explst_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_staexp2_solve_2esats__s2explst_tyleq_solve_argsrtlst_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_hypequal_solve) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err_nck) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err_nck) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lVar_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_rVar_err) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_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 aux_solve_23 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_bool_type aux_check_24 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type s2hnf_equal_solve_abscon_err_22 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type loop_28 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type loop_30 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type loop_32 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type loop_40 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type loop_42 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type loop_44 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_void_type auxsolve_49 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_bool_type auxcheck_50 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type s2hnf_hypequal_solve_abscon_48 (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_staexp2_solve.dats: 2276(line=90, offs=3) -- 2476(line=104, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__label_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp0) ;
ATSlocal (ats_bool_type, tmp1) ;
ATSlocal (ats_int_type, tmp2) ;
ATSlocal (ats_int_type, tmp3) ;
ATSlocal (ats_ptr_type, tmp4) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__label_equal_solve_err:
tmp2 = _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__compare_label_label (arg1, arg2) ;
tmp1 = atspre_ieq (tmp2, 0) ;
if (tmp1) {
/* empty */
} else {
tmp3 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp3 ;
tmp4 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp4)->tag = 0 ;
ats_selptrset_mac(anairiats_sum_3, tmp4, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp4, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_3, tmp4, atslab_2, arg2) ;
/* tmp0 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp4) ;
} /* end of [if] */
return /* (tmp0) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__label_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 2569(line=110, offs=3) -- 2766(line=123, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__stamp_equal_solve_err (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp5) ;
ATSlocal (ats_bool_type, tmp6) ;
ATSlocal (ats_int_type, tmp7) ;
ATSlocal (ats_int_type, tmp8) ;
ATSlocal (ats_ptr_type, tmp9) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__stamp_equal_solve_err:
tmp7 = _2tmp_2ATS_2dPostiats_2src_2pats_stamp_2esats__compare_stamp_stamp (arg1, arg2) ;
tmp6 = atspre_ieq (tmp7, 0) ;
if (tmp6) {
/* empty */
} else {
tmp8 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp8 ;
tmp9 = ATS_MALLOC(sizeof(anairiats_sum_4)) ;
((ats_sum_ptr_type)tmp9)->tag = 1 ;
ats_selptrset_mac(anairiats_sum_4, tmp9, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_4, tmp9, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_4, tmp9, atslab_2, arg2) ;
/* tmp5 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp9) ;
} /* end of [if] */
return /* (tmp5) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__stamp_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 2872(line=130, offs=1) -- 2995(line=139, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp10) ;
ATSlocal (ats_int_type, tmp11) ;
// ATSlocal_void (tmp12) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve:
/* ats_int_type tmp11 ; */
tmp11 = 0 ;
/* tmp12 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve_err (arg0, arg1, arg2, (&tmp11)) ;
tmp10 = tmp11 ;
return (tmp10) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 3061(line=143, offs=1) -- 3268(line=159, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp13) ;
ATSlocal (ats_bool_type, tmp14) ;
ATSlocal (ats_int_type, tmp15) ;
ATSlocal (ats_ptr_type, tmp16) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve_err:
tmp14 = _2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__eq_funclo_funclo (arg1, arg2) ;
if (tmp14) {
/* empty */
} else {
tmp15 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp15 ;
tmp16 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp16)->tag = 2 ;
ats_selptrset_mac(anairiats_sum_3, tmp16, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp16, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_3, tmp16, atslab_2, arg2) ;
/* tmp13 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp16) ;
} /* end of [if] */
return /* (tmp13) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 3383(line=167, offs=1) -- 3602(line=183, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__clokind_equal_solve_err (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp17) ;
ATSlocal (ats_bool_type, tmp18) ;
ATSlocal (ats_int_type, tmp19) ;
ATSlocal (ats_ptr_type, tmp20) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__clokind_equal_solve_err:
tmp18 = atspre_eq_int_int (arg1, arg2) ;
if (tmp18) {
/* empty */
} else {
tmp19 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp19 ;
tmp20 = ATS_MALLOC(sizeof(anairiats_sum_4)) ;
((ats_sum_ptr_type)tmp20)->tag = 3 ;
ats_selptrset_mac(anairiats_sum_4, tmp20, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_4, tmp20, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_4, tmp20, atslab_2, arg2) ;
/* tmp17 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp20) ;
} /* end of [if] */
return /* (tmp17) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__clokind_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 3713(line=190, offs=1) -- 3838(line=200, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp21) ;
ATSlocal (ats_int_type, tmp22) ;
// ATSlocal_void (tmp23) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve:
/* ats_int_type tmp22 ; */
tmp22 = 0 ;
/* tmp23 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve_err (arg0, arg1, arg2, (&tmp22)) ;
tmp21 = tmp22 ;
return (tmp21) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 3915(line=204, offs=3) -- 4127(line=218, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve_err (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp24) ;
ATSlocal (ats_bool_type, tmp25) ;
ATSlocal (ats_int_type, tmp26) ;
ATSlocal (ats_ptr_type, tmp27) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve_err:
tmp25 = atspre_eq_int_int (arg1, arg2) ;
if (tmp25) {
/* empty */
} else {
tmp26 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp26 ;
tmp27 = ATS_MALLOC(sizeof(anairiats_sum_4)) ;
((ats_sum_ptr_type)tmp27)->tag = 4 ;
ats_selptrset_mac(anairiats_sum_4, tmp27, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_4, tmp27, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_4, tmp27, atslab_2, arg2) ;
/* tmp24 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp27) ;
} /* end of [if] */
return /* (tmp24) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 4241(line=226, offs=1) -- 4364(line=236, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp28) ;
ATSlocal (ats_int_type, tmp29) ;
// ATSlocal_void (tmp30) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve:
/* ats_int_type tmp29 ; */
tmp29 = 0 ;
/* tmp30 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err (arg0, arg1, arg2, (&tmp29)) ;
tmp28 = tmp29 ;
return (tmp28) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 4437(line=240, offs=3) -- 4647(line=255, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp31) ;
ATSlocal (ats_bool_type, tmp32) ;
ATSlocal (ats_int_type, tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err:
tmp32 = atspre_eq_int_int (arg1, arg2) ;
if (tmp32) {
/* empty */
} else {
tmp33 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp33 ;
tmp34 = ATS_MALLOC(sizeof(anairiats_sum_4)) ;
((ats_sum_ptr_type)tmp34)->tag = 5 ;
ats_selptrset_mac(anairiats_sum_4, tmp34, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_4, tmp34, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_4, tmp34, atslab_2, arg2) ;
/* tmp31 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp34) ;
} /* end of [if] */
return /* (tmp31) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 4764(line=263, offs=3) -- 5099(line=282, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__boxity_equal_solve_err (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp35) ;
ATSlocal (ats_int_type, tmp36) ;
ATSlocal (ats_bool_type, tmp37) ;
ATSlocal (ats_bool_type, tmp38) ;
ATSlocal (ats_int_type, tmp39) ;
ATSlocal (ats_ptr_type, tmp40) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__boxity_equal_solve_err:
tmp37 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_boxed (arg2) ;
if (tmp37) {
tmp36 = atspre_sub_int_int (1, arg1) ;
} else {
tmp36 = arg1 ;
} /* end of [if] */
tmp38 = atspre_eq_int_int (tmp36, 0) ;
if (tmp38) {
/* empty */
} else {
tmp39 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp39 ;
tmp40 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
((ats_sum_ptr_type)tmp40)->tag = 7 ;
ats_selptrset_mac(anairiats_sum_5, tmp40, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_5, tmp40, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_5, tmp40, atslab_2, arg2) ;
/* tmp35 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp40) ;
} /* end of [if] */
return /* (tmp35) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__boxity_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 5174(line=286, offs=3) -- 5382(line=300, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__tyreckind_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp41) ;
ATSlocal (ats_bool_type, tmp42) ;
ATSlocal (ats_int_type, tmp43) ;
ATSlocal (ats_ptr_type, tmp44) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__tyreckind_equal_solve_err:
tmp42 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_tyreckind_tyreckind (arg1, arg2) ;
if (tmp42) {
/* empty */
} else {
tmp43 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp43 ;
tmp44 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp44)->tag = 8 ;
ats_selptrset_mac(anairiats_sum_3, tmp44, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp44, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_3, tmp44, atslab_2, arg2) ;
/* tmp41 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp44) ;
} /* end of [if] */
return /* (tmp41) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__tyreckind_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 5503(line=308, offs=3) -- 5708(line=322, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (ats_ptr_type arg0, ats_int_type arg1, ats_int_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp45) ;
ATSlocal (ats_bool_type, tmp46) ;
ATSlocal (ats_int_type, tmp47) ;
ATSlocal (ats_ptr_type, tmp48) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err:
tmp46 = atspre_eq_int_int (arg1, arg2) ;
if (tmp46) {
/* empty */
} else {
tmp47 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp47 ;
tmp48 = ATS_MALLOC(sizeof(anairiats_sum_4)) ;
((ats_sum_ptr_type)tmp48)->tag = 9 ;
ats_selptrset_mac(anairiats_sum_4, tmp48, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_4, tmp48, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_4, tmp48, atslab_2, arg2) ;
/* tmp45 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp48) ;
} /* end of [if] */
return /* (tmp45) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 5965(line=338, offs=3) -- 6323(line=357, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp49) ;
ATSlocal (ats_ptr_type, tmp50) ;
ATSlocal (ats_ptr_type, tmp51) ;
// ATSlocal_void (tmp52) ;
ATSlocal (ats_bool_type, tmp53) ;
ATSlocal (ats_int_type, tmp54) ;
ATSlocal (ats_ptr_type, tmp55) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err:
tmp50 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_szexp (arg1) ;
tmp51 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2zexp_merge (tmp50, arg2) ;
tmp53 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_is_bot (tmp51) ;
if (tmp53) {
tmp54 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp54 ;
tmp55 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp55)->tag = 10 ;
ats_selptrset_mac(anairiats_sum_3, tmp55, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp55, atslab_1, tmp50) ;
ats_selptrset_mac(anairiats_sum_3, tmp55, atslab_2, arg2) ;
/* tmp52 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp55) ;
} else {
/* empty */
} /* end of [if] */
/* tmp49 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_set_szexp (arg1, tmp51) ;
return /* (tmp49) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 6551(line=370, offs=3) -- 6887(line=388, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp56) ;
ATSlocal (ats_ptr_type, tmp57) ;
ATSlocal (ats_ptr_type, tmp58) ;
ATSlocal (ats_bool_type, tmp59) ;
ATSlocal (ats_bool_type, tmp60) ;
ATSlocal (ats_int_type, tmp61) ;
ATSlocal (ats_ptr_type, tmp62) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err:
tmp57 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_srt (arg1) ;
tmp58 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg2), atslab_s2exp_srt) ;
tmp59 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_ltmat1 (tmp58, tmp57) ;
tmp60 = atspre_neg_bool (tmp59) ;
if (tmp60) {
tmp61 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp61 ;
tmp62 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp62)->tag = 13 ;
ats_selptrset_mac(anairiats_sum_3, tmp62, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp62, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_3, tmp62, atslab_2, arg2) ;
/* tmp56 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp62) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp56) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 7641(line=428, offs=1) -- 8475(line=466, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp63) ;
ATSlocal (ats_ptr_type, tmp64) ;
ATSlocal (ats_ptr_type, tmp65) ;
ATSlocal (anairiats_rec_1, tmp66) ;
ATSlocal (ats_int_type, tmp67) ;
ATSlocal (ats_ptr_type, tmp68) ;
ATSlocal (ats_ptr_type, tmp69) ;
ATSlocal (ats_ptr_type, tmp70) ;
ATSlocal (ats_bool_type, tmp71) ;
// ATSlocal_void (tmp72) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err:
tmp64 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp65 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp66 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2Var_occurcheck_s2exp (arg3, tmp65) ;
tmp67 = ats_select_mac(tmp66, atslab_0) ;
tmp68 = ats_select_mac(tmp66, atslab_1) ;
tmp69 = ats_select_mac(tmp66, atslab_2) ;
tmp70 = ats_select_mac(tmp66, atslab_3) ;
tmp71 = atspre_eq_int_int (tmp67, 0) ;
if (tmp71) {
/* tmp72 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Varlst_add_sVarlst (tmp70, arg3) ;
/* tmp63 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err_nck (arg0, arg1, arg2, arg3, arg4) ;
} else {
/* tmp63 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_eqeq (arg0, tmp64, tmp65) ;
} /* end of [if] */
return /* (tmp63) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 8557(line=470, offs=1) -- 9264(line=516, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err_nck (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp73) ;
ATSlocal (ats_ptr_type, tmp74) ;
// ATSlocal_void (tmp75) ;
ATSlocal (ats_bool_type, tmp76) ;
// ATSlocal_void (tmp77) ;
ATSlocal (ats_ptr_type, tmp78) ;
// ATSlocal_void (tmp79) ;
ATSlocal (ats_ptr_type, tmp80) ;
ATSlocal (ats_ptr_type, tmp81) ;
// ATSlocal_void (tmp82) ;
ATSlocal (ats_ptr_type, tmp83) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err_nck:
tmp74 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
/* tmp75 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err (arg0, arg3, tmp74, arg4) ;
tmp76 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_impred (tmp74) ;
if (tmp76) {
tmp78 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_make_s2exp (tmp74) ;
/* tmp77 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err (arg0, arg3, tmp78, arg4) ;
} else {
/* empty */
} /* end of [if] */
tmp80 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
ats_selptrset_mac(anairiats_sum_7, tmp80, atslab_0, tmp74) ;
/* tmp79 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_set_link (arg3, tmp80) ;
if (tmp76) {
tmp81 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_lbs (arg3) ;
/* tmp82 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err (arg0, tmp81, arg2, arg4) ;
tmp83 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_ubs (arg3) ;
/* tmp73 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err (arg0, arg2, tmp83, arg4) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp73) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err_nck] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 9711(line=539, offs=3) -- 10677(line=579, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp84) ;
ATSlocal (ats_ptr_type, tmp85) ;
ATSlocal (ats_ptr_type, tmp86) ;
ATSlocal (anairiats_rec_1, tmp87) ;
ATSlocal (ats_int_type, tmp88) ;
ATSlocal (ats_ptr_type, tmp89) ;
ATSlocal (ats_ptr_type, tmp90) ;
ATSlocal (ats_ptr_type, tmp91) ;
ATSlocal (ats_bool_type, tmp92) ;
// ATSlocal_void (tmp93) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err:
tmp85 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp86 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp87 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2Var_occurcheck_s2exp (arg3, tmp85) ;
tmp88 = ats_select_mac(tmp87, atslab_0) ;
tmp89 = ats_select_mac(tmp87, atslab_1) ;
tmp90 = ats_select_mac(tmp87, atslab_2) ;
tmp91 = ats_select_mac(tmp87, atslab_3) ;
tmp92 = atspre_eq_int_int (tmp88, 0) ;
if (tmp92) {
/* tmp93 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Varlst_add_sVarlst (tmp91, arg3) ;
/* tmp84 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err_nck (arg0, arg1, arg2, arg3, arg4) ;
} else {
/* tmp84 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_eqeq (arg0, tmp85, tmp86) ;
} /* end of [if] */
return /* (tmp84) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 10761(line=583, offs=3) -- 11449(line=622, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err_nck (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp94) ;
ATSlocal (ats_ptr_type, tmp95) ;
// ATSlocal_void (tmp96) ;
ATSlocal (ats_bool_type, tmp97) ;
// ATSlocal_void (tmp98) ;
ATSlocal (ats_ptr_type, tmp99) ;
// ATSlocal_void (tmp100) ;
ATSlocal (ats_ptr_type, tmp101) ;
ATSlocal (ats_ptr_type, tmp102) ;
// ATSlocal_void (tmp103) ;
ATSlocal (ats_ptr_type, tmp104) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err_nck:
tmp95 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
/* tmp96 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err (arg0, arg3, tmp95, arg4) ;
tmp97 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_impred (tmp95) ;
if (tmp97) {
tmp99 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_make_s2exp (tmp95) ;
/* tmp98 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err (arg0, arg3, tmp99, arg4) ;
} else {
/* empty */
} /* end of [if] */
tmp101 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
ats_selptrset_mac(anairiats_sum_7, tmp101, atslab_0, tmp95) ;
/* tmp100 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_set_link (arg3, tmp101) ;
if (tmp97) {
tmp102 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_lbs (arg3) ;
/* tmp103 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err (arg0, tmp102, arg1, arg4) ;
tmp104 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_ubs (arg3) ;
/* tmp94 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err (arg0, arg1, tmp104, arg4) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp94) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err_nck] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 11543(line=628, offs=1) -- 11672(line=636, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp105) ;
ATSlocal (ats_int_type, tmp106) ;
// ATSlocal_void (tmp107) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve:
/* ats_int_type tmp106 ; */
tmp106 = 0 ;
/* tmp107 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve_err (arg0, arg1, arg2, (&tmp106)) ;
tmp105 = tmp106 ;
return (tmp105) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 11738(line=640, offs=3) -- 12819(line=682, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp108) ;
ATSlocal (ats_ptr_type, tmp109) ;
ATSlocal (ats_ptr_type, tmp110) ;
ATSlocal (ats_uint_type, tmp111) ;
ATSlocal (ats_bool_type, tmp112) ;
ATSlocal (ats_uint_type, tmp113) ;
ATSlocal (ats_bool_type, tmp114) ;
ATSlocal (ats_uint_type, tmp115) ;
ATSlocal (ats_uint_type, tmp116) ;
ATSlocal (ats_bool_type, tmp117) ;
ATSlocal (ats_ptr_type, tmp118) ;
ATSlocal (ats_ptr_type, tmp119) ;
ATSlocal (ats_bool_type, tmp120) ;
ATSlocal (ats_ptr_type, tmp121) ;
ATSlocal (ats_ptr_type, tmp122) ;
ATSlocal (ats_ptr_type, tmp123) ;
ATSlocal (ats_ptr_type, tmp124) ;
ATSlocal (ats_ptr_type, tmp125) ;
ATSlocal (ats_ptr_type, tmp126) ;
ATSlocal (ats_int_type, tmp127) ;
ATSlocal (ats_ptr_type, tmp128) ;
ATSlocal (ats_int_type, tmp129) ;
ATSlocal (ats_ptr_type, tmp130) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve_err:
tmp109 = _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2eff_hnfize (arg1) ;
tmp110 = _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2eff_hnfize (arg2) ;
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (((ats_sum_ptr_type)tmp109)->tag != 0) { goto __ats_lab_1_0 ; }
__ats_lab_0_1:
__ats_lab_0_2:
tmp111 = ats_caselptrlab_mac(anairiats_sum_8, tmp109, atslab_0) ;
tmp112 = _2tmp_2ATS_2dPostiats_2src_2pats_effect_2esats__effset_isnil (tmp111) ;
if (!tmp112) { goto __ats_lab_1_1 ; }
break ;

/* branch: __ats_lab_1 */
__ats_lab_1_0:
__ats_lab_1_1:
if (((ats_sum_ptr_type)tmp110)->tag != 0) { goto __ats_lab_2_0 ; }
__ats_lab_1_2:
tmp113 = ats_caselptrlab_mac(anairiats_sum_8, tmp110, atslab_0) ;
tmp114 = _2tmp_2ATS_2dPostiats_2src_2pats_effect_2esats__effset_isall (tmp113) ;
if (!tmp114) { goto __ats_lab_2_0 ; }
break ;

/* branch: __ats_lab_2 */
__ats_lab_2_0:
if (((ats_sum_ptr_type)tmp109)->tag != 0) { goto __ats_lab_3_0 ; }
__ats_lab_2_1:
if (((ats_sum_ptr_type)tmp110)->tag != 0) { goto __ats_lab_4_1 ; }
__ats_lab_2_2:
tmp115 = ats_caselptrlab_mac(anairiats_sum_8, tmp109, atslab_0) ;
tmp116 = ats_caselptrlab_mac(anairiats_sum_8, tmp110, atslab_0) ;
tmp117 = _2tmp_2ATS_2dPostiats_2src_2pats_effect_2esats__effset_subset (tmp115, tmp116) ;
if (!tmp117) { goto __ats_lab_7_2 ; }
break ;

/* branch: __ats_lab_3 */
__ats_lab_3_0:
if (((ats_sum_ptr_type)tmp109)->tag != 1) { goto __ats_lab_4_0 ; }
__ats_lab_3_1:
if (((ats_sum_ptr_type)tmp110)->tag != 1) { goto __ats_lab_4_1 ; }
__ats_lab_3_2:
tmp118 = ats_caselptrlab_mac(anairiats_sum_9, tmp109, atslab_0) ;
tmp119 = ats_caselptrlab_mac(anairiats_sum_9, tmp110, atslab_0) ;
tmp120 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_syneq (tmp118, tmp119) ;
if (!tmp120) { goto __ats_lab_4_2 ; }
break ;

/* branch: __ats_lab_4 */
__ats_lab_4_0:
__ats_lab_4_1:
if (((ats_sum_ptr_type)tmp110)->tag != 1) { goto __ats_lab_7_1 ; }
__ats_lab_4_2:
tmp121 = ats_caselptrlab_mac(anairiats_sum_9, tmp110, atslab_0) ;
tmp122 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp121), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_5 */
__ats_lab_5_0:
if (((ats_sum_ptr_type)tmp122)->tag != 8) { goto __ats_lab_6_0 ; }
__ats_lab_5_1:
tmp123 = ats_caselptrlab_mac(anairiats_sum_9, tmp122, atslab_0) ;
tmp124 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_eff (tmp109) ;
tmp125 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf_cast (tmp124) ;
tmp126 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf_cast (tmp121) ;
/* tmp108 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err (arg0, tmp125, tmp126, tmp123, arg3) ;
break ;

/* branch: __ats_lab_6 */
__ats_lab_6_0:
__ats_lab_6_1:
tmp127 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp127 ;
tmp128 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp128)->tag = 6 ;
ats_selptrset_mac(anairiats_sum_3, tmp128, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp128, atslab_1, tmp109) ;
ats_selptrset_mac(anairiats_sum_3, tmp128, atslab_2, tmp110) ;
/* tmp108 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp128) ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
__ats_lab_7_1:
__ats_lab_7_2:
tmp129 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp129 ;
tmp130 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp130)->tag = 6 ;
ats_selptrset_mac(anairiats_sum_3, tmp130, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp130, atslab_1, tmp109) ;
ats_selptrset_mac(anairiats_sum_3, tmp130, atslab_2, tmp110) ;
/* tmp108 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp130) ;
break ;
} while (0) ;
return /* (tmp108) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 12904(line=688, offs=1) -- 13034(line=697, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp131) ;
ATSlocal (ats_int_type, tmp132) ;
// ATSlocal_void (tmp133) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve:
/* ats_int_type tmp132 ; */
tmp132 = 0 ;
/* tmp133 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err (arg0, arg1, arg2, (&tmp132)) ;
tmp131 = tmp132 ;
return (tmp131) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 13097(line=701, offs=1) -- 13227(line=710, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp134) ;
ATSlocal (ats_int_type, tmp135) ;
// ATSlocal_void (tmp136) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve:
/* ats_int_type tmp135 ; */
tmp135 = 0 ;
/* tmp136 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, arg1, arg2, (&tmp135)) ;
tmp134 = tmp135 ;
return (tmp134) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 13454(line=725, offs=1) -- 13917(line=753, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_solve_23 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp140) ;
ATSlocal (ats_ptr_type, tmp141) ;
ATSlocal (ats_ptr_type, tmp142) ;
ATSlocal (ats_ptr_type, tmp143) ;
ATSlocal (ats_ptr_type, tmp144) ;
ATSlocal (ats_ptr_type, tmp145) ;
ATSlocal (ats_ptr_type, tmp146) ;
// ATSlocal_void (tmp147) ;

__ats_lab_aux_solve_23:
tmp141 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg1), atslab_s2exp_node) ;
tmp142 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg2), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_8 */
__ats_lab_8_0:
if (((ats_sum_ptr_type)tmp141)->tag != 17) { goto __ats_lab_9_0 ; }
__ats_lab_8_1:
if (((ats_sum_ptr_type)tmp142)->tag != 17) { goto __ats_lab_9_1 ; }
__ats_lab_8_2:
tmp143 = ats_caselptrlab_mac(anairiats_sum_10, tmp141, atslab_0) ;
tmp144 = ats_caselptrlab_mac(anairiats_sum_10, tmp141, atslab_1) ;
tmp145 = ats_caselptrlab_mac(anairiats_sum_10, tmp142, atslab_0) ;
tmp146 = ats_caselptrlab_mac(anairiats_sum_10, tmp142, atslab_1) ;
/* tmp147 = */ aux_solve_23 (arg0, tmp143, tmp145, arg3) ;
/* tmp140 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err (arg0, tmp144, tmp146, arg3) ;
break ;

/* branch: __ats_lab_9 */
__ats_lab_9_0:
__ats_lab_9_1:
__ats_lab_9_2:
break ;
} while (0) ;
return /* (tmp140) */ ;
} /* end of [aux_solve_23] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 13947(line=756, offs=1) -- 14260(line=775, offs=4)
*/
ATSstaticdec()
ats_bool_type
aux_check_24 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp148) ;
ATSlocal (ats_ptr_type, 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) ;

__ats_lab_aux_check_24:
tmp149 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg0), atslab_s2exp_node) ;
tmp150 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg1), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_10 */
__ats_lab_10_0:
if (((ats_sum_ptr_type)tmp149)->tag != 4) { goto __ats_lab_11_0 ; }
__ats_lab_10_1:
if (((ats_sum_ptr_type)tmp150)->tag != 4) { goto __ats_lab_12_1 ; }
__ats_lab_10_2:
tmp151 = ats_caselptrlab_mac(anairiats_sum_9, tmp149, atslab_0) ;
tmp152 = ats_caselptrlab_mac(anairiats_sum_9, tmp150, atslab_0) ;
tmp148 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2cst_s2cst (tmp151, tmp152) ;
break ;

/* branch: __ats_lab_11 */
__ats_lab_11_0:
if (((ats_sum_ptr_type)tmp149)->tag != 17) { goto __ats_lab_12_0 ; }
__ats_lab_11_1:
if (((ats_sum_ptr_type)tmp150)->tag != 17) { goto __ats_lab_12_1 ; }
__ats_lab_11_2:
tmp153 = ats_caselptrlab_mac(anairiats_sum_10, tmp149, atslab_0) ;
tmp154 = ats_caselptrlab_mac(anairiats_sum_10, tmp150, atslab_0) ;
arg0 = tmp153 ;
arg1 = tmp154 ;
goto __ats_lab_aux_check_24 ; // tail call
break ;

/* branch: __ats_lab_12 */
__ats_lab_12_0:
__ats_lab_12_1:
__ats_lab_12_2:
tmp148 = ats_false_bool ;
break ;
} while (0) ;
return (tmp148) ;
} /* end of [aux_check_24] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 13287(line=715, offs=1) -- 14412(line=784, offs=4)
*/
ATSstaticdec()
ats_void_type
s2hnf_equal_solve_abscon_err_22 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp137) ;
ATSlocal (ats_ptr_type, tmp138) ;
ATSlocal (ats_ptr_type, tmp139) ;
ATSlocal (ats_bool_type, tmp155) ;
ATSlocal (ats_int_type, tmp156) ;

__ats_lab_s2hnf_equal_solve_abscon_err_22:
tmp138 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp139 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp155 = aux_check_24 (tmp138, tmp139) ;
if (tmp155) {
/* tmp137 = */ aux_solve_23 (arg0, tmp138, tmp139, arg3) ;
} else {
tmp156 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp156 ;
} /* end of [if] */
return /* (tmp137) */ ;
} /* end of [s2hnf_equal_solve_abscon_err_22] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 14508(line=790, offs=1) -- 18472(line=958, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp157) ;
ATSlocal (ats_int_type, tmp158) ;
ATSlocal (ats_ptr_type, tmp159) ;
ATSlocal (ats_ptr_type, tmp160) ;
ATSlocal (ats_ptr_type, tmp161) ;
ATSlocal (ats_ptr_type, tmp162) ;
// ATSlocal_void (tmp163) ;
ATSlocal (ats_ptr_type, tmp164) ;
ATSlocal (ats_ptr_type, tmp165) ;
ATSlocal (ats_ptr_type, tmp166) ;
ATSlocal (ats_ptr_type, tmp167) ;
ATSlocal (ats_ptr_type, tmp168) ;
ATSlocal (ats_ptr_type, tmp169) ;
ATSlocal (ats_bool_type, tmp170) ;
ATSlocal (ats_ptr_type, tmp171) ;
ATSlocal (ats_ptr_type, tmp172) ;
ATSlocal (ats_ptr_type, tmp173) ;
ATSlocal (ats_bool_type, tmp174) ;
ATSlocal (ats_int_type, tmp175) ;
ATSlocal (ats_int_type, tmp176) ;
ATSlocal (ats_ptr_type, tmp177) ;
ATSlocal (ats_int_type, tmp178) ;
ATSlocal (ats_ptr_type, tmp179) ;
ATSlocal (ats_bool_type, tmp180) ;
ATSlocal (ats_int_type, tmp181) ;
ATSlocal (ats_int_type, tmp182) ;
ATSlocal (ats_ptr_type, tmp183) ;
ATSlocal (ats_ptr_type, tmp184) ;
ATSlocal (ats_ptr_type, tmp185) ;
ATSlocal (ats_ptr_type, tmp186) ;
// ATSlocal_void (tmp187) ;
ATSlocal (ats_int_type, tmp188) ;
ATSlocal (ats_ptr_type, tmp189) ;
ATSlocal (ats_ptr_type, tmp190) ;
ATSlocal (ats_ptr_type, tmp191) ;
ATSlocal (ats_ptr_type, tmp192) ;
// ATSlocal_void (tmp193) ;
ATSlocal (ats_int_type, tmp194) ;
ATSlocal (ats_ptr_type, tmp195) ;
ATSlocal (ats_int_type, tmp196) ;
ATSlocal (ats_ptr_type, tmp197) ;
ATSlocal (ats_ptr_type, tmp198) ;
ATSlocal (ats_int_type, tmp199) ;
ATSlocal (ats_ptr_type, tmp200) ;
// ATSlocal_void (tmp201) ;
// ATSlocal_void (tmp202) ;
ATSlocal (ats_bool_type, tmp203) ;
ATSlocal (ats_int_type, tmp204) ;
ATSlocal (ats_ptr_type, tmp205) ;
ATSlocal (ats_ptr_type, tmp206) ;
ATSlocal (ats_int_type, tmp207) ;
ATSlocal (ats_ptr_type, tmp208) ;
ATSlocal (ats_ptr_type, tmp209) ;
ATSlocal (ats_ptr_type, tmp210) ;
ATSlocal (ats_ptr_type, tmp211) ;
// ATSlocal_void (tmp212) ;
ATSlocal (ats_int_type, tmp213) ;
ATSlocal (ats_bool_type, tmp214) ;
ATSlocal (ats_bool_type, tmp215) ;
ATSlocal (ats_bool_type, tmp216) ;
ATSlocal (ats_bool_type, tmp217) ;
ATSlocal (ats_bool_type, tmp218) ;
ATSlocal (ats_ptr_type, tmp219) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err:
tmp158 = ats_ptrget_mac(ats_int_type, arg3) ;
tmp159 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp160 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp161 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp159), atslab_s2exp_node) ;
tmp162 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp160), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_13 */
__ats_lab_13_0:
if (((ats_sum_ptr_type)tmp161)->tag != 26) { goto __ats_lab_14_0 ; }
__ats_lab_13_1:
__ats_lab_13_2:
tmp164 = ats_caselptrlab_mac(anairiats_sum_9, tmp161, atslab_0) ;
tmp165 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp164) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err (arg0, tmp165, arg2, arg3) ;
break ;

/* branch: __ats_lab_14 */
__ats_lab_14_0:
__ats_lab_14_1:
if (((ats_sum_ptr_type)tmp162)->tag != 26) { goto __ats_lab_15_0 ; }
__ats_lab_14_2:
tmp166 = ats_caselptrlab_mac(anairiats_sum_9, tmp162, atslab_0) ;
tmp167 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp166) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err (arg0, arg1, tmp167, arg3) ;
break ;

/* branch: __ats_lab_15 */
__ats_lab_15_0:
if (((ats_sum_ptr_type)tmp161)->tag != 8) { goto __ats_lab_18_0 ; }
__ats_lab_15_1:
__ats_lab_15_2:
tmp168 = ats_caselptrlab_mac(anairiats_sum_9, tmp161, atslab_0) ;
do {
/* branch: __ats_lab_16 */
__ats_lab_16_0:
if (((ats_sum_ptr_type)tmp162)->tag != 8) { goto __ats_lab_17_0 ; }
__ats_lab_16_1:
tmp169 = ats_caselptrlab_mac(anairiats_sum_9, tmp162, atslab_0) ;
tmp170 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2Var_s2Var (tmp168, tmp169) ;
if (!tmp170) { goto __ats_lab_17_1 ; }
break ;

/* branch: __ats_lab_17 */
__ats_lab_17_0:
__ats_lab_17_1:
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_lVar_err (arg0, arg1, arg2, tmp168, arg3) ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_18 */
__ats_lab_18_0:
__ats_lab_18_1:
if (((ats_sum_ptr_type)tmp162)->tag != 8) { goto __ats_lab_19_0 ; }
__ats_lab_18_2:
tmp171 = ats_caselptrlab_mac(anairiats_sum_9, tmp162, atslab_0) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err (arg0, arg1, arg2, tmp171, arg3) ;
break ;

/* branch: __ats_lab_19 */
__ats_lab_19_0:
if (((ats_sum_ptr_type)tmp161)->tag != 4) { goto __ats_lab_22_0 ; }
__ats_lab_19_1:
__ats_lab_19_2:
tmp172 = ats_caselptrlab_mac(anairiats_sum_9, tmp161, atslab_0) ;
do {
/* branch: __ats_lab_20 */
__ats_lab_20_0:
if (((ats_sum_ptr_type)tmp162)->tag != 4) { goto __ats_lab_21_0 ; }
__ats_lab_20_1:
tmp173 = ats_caselptrlab_mac(anairiats_sum_9, tmp162, atslab_0) ;
tmp174 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__neq_s2cst_s2cst (tmp172, tmp173) ;
if (tmp174) {
tmp175 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp175 ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_21 */
__ats_lab_21_0:
__ats_lab_21_1:
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_eqeq (arg0, tmp159, tmp160) ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_22 */
__ats_lab_22_0:
if (((ats_sum_ptr_type)tmp161)->tag != 22) { goto __ats_lab_25_0 ; }
__ats_lab_22_1:
__ats_lab_22_2:
tmp176 = ats_caselptrlab_mac(anairiats_sum_11, tmp161, atslab_0) ;
tmp177 = ats_caselptrlab_mac(anairiats_sum_11, tmp161, atslab_1) ;
do {
/* branch: __ats_lab_23 */
__ats_lab_23_0:
if (((ats_sum_ptr_type)tmp162)->tag != 22) { goto __ats_lab_24_0 ; }
__ats_lab_23_1:
tmp178 = ats_caselptrlab_mac(anairiats_sum_11, tmp162, atslab_0) ;
tmp179 = ats_caselptrlab_mac(anairiats_sum_11, tmp162, atslab_1) ;
tmp180 = atspre_gte_int_int (tmp176, tmp178) ;
if (tmp180) {
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp177, tmp179, arg3) ;
} else {
tmp181 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp181 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_24 */
__ats_lab_24_0:
__ats_lab_24_1:
tmp182 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp182 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_25 */
__ats_lab_25_0:
if (((ats_sum_ptr_type)tmp161)->tag != 12) { goto __ats_lab_28_0 ; }
__ats_lab_25_1:
__ats_lab_25_2:
tmp183 = ats_caselptrlab_mac(anairiats_sum_10, tmp161, atslab_0) ;
tmp184 = ats_caselptrlab_mac(anairiats_sum_10, tmp161, atslab_1) ;
do {
/* branch: __ats_lab_26 */
__ats_lab_26_0:
if (((ats_sum_ptr_type)tmp162)->tag != 12) { goto __ats_lab_27_0 ; }
__ats_lab_26_1:
tmp185 = ats_caselptrlab_mac(anairiats_sum_10, tmp162, atslab_0) ;
tmp186 = ats_caselptrlab_mac(anairiats_sum_10, tmp162, atslab_1) ;
/* tmp187 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp183, tmp185, arg3) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp184, tmp186, arg3) ;
break ;

/* branch: __ats_lab_27 */
__ats_lab_27_0:
__ats_lab_27_1:
tmp188 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp188 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_28 */
__ats_lab_28_0:
if (((ats_sum_ptr_type)tmp161)->tag != 24) { goto __ats_lab_31_0 ; }
__ats_lab_28_1:
__ats_lab_28_2:
tmp189 = ats_caselptrlab_mac(anairiats_sum_10, tmp161, atslab_0) ;
tmp190 = ats_caselptrlab_mac(anairiats_sum_10, tmp161, atslab_1) ;
do {
/* branch: __ats_lab_29 */
__ats_lab_29_0:
if (((ats_sum_ptr_type)tmp162)->tag != 24) { goto __ats_lab_30_0 ; }
__ats_lab_29_1:
tmp191 = ats_caselptrlab_mac(anairiats_sum_10, tmp162, atslab_0) ;
tmp192 = ats_caselptrlab_mac(anairiats_sum_10, tmp162, atslab_1) ;
/* tmp193 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp189, tmp191, arg3) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err (arg0, tmp190, tmp192, arg3) ;
break ;

/* branch: __ats_lab_30 */
__ats_lab_30_0:
__ats_lab_30_1:
tmp194 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp194 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_31 */
__ats_lab_31_0:
if (((ats_sum_ptr_type)tmp161)->tag != 25) { goto __ats_lab_34_0 ; }
__ats_lab_31_1:
__ats_lab_31_2:
tmp195 = ats_caselptrlab_mac(anairiats_sum_5, tmp161, atslab_0) ;
tmp196 = ats_caselptrlab_mac(anairiats_sum_5, tmp161, atslab_1) ;
tmp197 = ats_caselptrlab_mac(anairiats_sum_5, tmp161, atslab_2) ;
do {
/* branch: __ats_lab_32 */
__ats_lab_32_0:
if (((ats_sum_ptr_type)tmp162)->tag != 25) { goto __ats_lab_33_0 ; }
__ats_lab_32_1:
tmp198 = ats_caselptrlab_mac(anairiats_sum_5, tmp162, atslab_0) ;
tmp199 = ats_caselptrlab_mac(anairiats_sum_5, tmp162, atslab_1) ;
tmp200 = ats_caselptrlab_mac(anairiats_sum_5, tmp162, atslab_2) ;
/* tmp201 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__tyreckind_equal_solve_err (arg0, tmp195, tmp198, arg3) ;
/* tmp202 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err (arg0, tmp196, tmp199, arg3) ;
tmp203 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__tyreckind_is_nameless (tmp195) ;
if (tmp203) {
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_equal_solve_err (arg0, tmp197, tmp200, arg3) ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_33 */
__ats_lab_33_0:
__ats_lab_33_1:
tmp204 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp204 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_34 */
__ats_lab_34_0:
if (((ats_sum_ptr_type)tmp161)->tag != 30) { goto __ats_lab_37_0 ; }
__ats_lab_34_1:
__ats_lab_34_2:
tmp205 = ats_caselptrlab_mac(anairiats_sum_9, tmp161, atslab_0) ;
do {
/* branch: __ats_lab_35 */
__ats_lab_35_0:
if (((ats_sum_ptr_type)tmp162)->tag != 30) { goto __ats_lab_36_0 ; }
__ats_lab_35_1:
tmp206 = ats_caselptrlab_mac(anairiats_sum_9, tmp162, atslab_0) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp205, tmp206, arg3) ;
break ;

/* branch: __ats_lab_36 */
__ats_lab_36_0:
__ats_lab_36_1:
tmp207 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp207 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_37 */
__ats_lab_37_0:
if (((ats_sum_ptr_type)tmp161)->tag != 31) { goto __ats_lab_40_0 ; }
__ats_lab_37_1:
__ats_lab_37_2:
tmp208 = ats_caselptrlab_mac(anairiats_sum_10, tmp161, atslab_0) ;
tmp209 = ats_caselptrlab_mac(anairiats_sum_10, tmp161, atslab_1) ;
do {
/* branch: __ats_lab_38 */
__ats_lab_38_0:
if (((ats_sum_ptr_type)tmp162)->tag != 31) { goto __ats_lab_39_0 ; }
__ats_lab_38_1:
tmp210 = ats_caselptrlab_mac(anairiats_sum_10, tmp162, atslab_0) ;
tmp211 = ats_caselptrlab_mac(anairiats_sum_10, tmp162, atslab_1) ;
/* tmp212 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp208, tmp210, arg3) ;
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_equal_solve_err (arg0, tmp209, tmp211, arg3) ;
break ;

/* branch: __ats_lab_39 */
__ats_lab_39_0:
__ats_lab_39_1:
tmp213 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp213 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_40 */
__ats_lab_40_0:
__ats_lab_40_1:
__ats_lab_40_2:
tmp215 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_is_abscon (arg1) ;
tmp216 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_is_abscon (arg2) ;
tmp214 = atspre_mul_bool_bool (tmp215, tmp216) ;
if (!tmp214) { goto __ats_lab_41_2 ; }
/* tmp163 = */ s2hnf_equal_solve_abscon_err_22 (arg0, arg1, arg2, arg3) ;
break ;

/* branch: __ats_lab_41 */
__ats_lab_41_0:
__ats_lab_41_1:
__ats_lab_41_2:
tmp217 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_syneq2 (arg1, arg2) ;
if (!tmp217) { goto __ats_lab_42_2 ; }
break ;

/* branch: __ats_lab_42 */
__ats_lab_42_0:
__ats_lab_42_1:
__ats_lab_42_2:
/* tmp163 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_eqeq (arg0, tmp159, tmp160) ;
break ;
} while (0) ;
tmp218 = atspre_gt_int_int (ats_ptrget_mac(ats_int_type, arg3), tmp158) ;
if (tmp218) {
tmp219 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp219)->tag = 11 ;
ats_selptrset_mac(anairiats_sum_3, tmp219, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp219, atslab_1, tmp159) ;
ats_selptrset_mac(anairiats_sum_3, tmp219, atslab_2, tmp160) ;
/* tmp157 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp219) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp157) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 18540(line=962, offs=1) -- 18697(line=971, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp220) ;
ATSlocal (ats_ptr_type, tmp221) ;
ATSlocal (ats_ptr_type, tmp222) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err:
tmp221 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (arg1) ;
tmp222 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (arg2) ;
/* tmp220 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_equal_solve_err (arg0, tmp221, tmp222, arg3) ;
return /* (tmp220) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 18832(line=981, offs=5) -- 19289(line=1004, offs=2)
*/
ATSstaticdec()
ats_int_type
loop_28 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp224) ;
ATSlocal (ats_ptr_type, tmp225) ;
ATSlocal (ats_ptr_type, tmp226) ;
ATSlocal (ats_ptr_type, tmp227) ;
ATSlocal (ats_ptr_type, tmp228) ;
// ATSlocal_void (tmp229) ;

__ats_lab_loop_28:
do {
/* branch: __ats_lab_43 */
__ats_lab_43_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_46_0 ; }
__ats_lab_43_1:
do {
/* branch: __ats_lab_44 */
__ats_lab_44_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_45_0 ; }
__ats_lab_44_1:
tmp224 = 0 ;
break ;

/* branch: __ats_lab_45 */
__ats_lab_45_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_45_1:
tmp224 = -1 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_46 */
__ats_lab_46_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_46_1:
tmp225 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp226 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
do {
/* branch: __ats_lab_47 */
__ats_lab_47_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_48_0 ; }
__ats_lab_47_1:
tmp224 = 1 ;
break ;

/* branch: __ats_lab_48 */
__ats_lab_48_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_48_1:
tmp227 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp228 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;
/* tmp229 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp225, tmp227, arg3) ;
arg0 = arg0 ;
arg1 = tmp226 ;
arg2 = tmp228 ;
arg3 = arg3 ;
goto __ats_lab_loop_28 ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp224) ;
} /* end of [loop_28] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 18789(line=977, offs=1) -- 19565(line=1023, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp223) ;
ATSlocal (ats_int_type, tmp230) ;
ATSlocal (ats_bool_type, tmp231) ;
ATSlocal (ats_int_type, tmp232) ;
ATSlocal (ats_ptr_type, tmp233) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err:
tmp230 = loop_28 (arg0, arg1, arg2, arg3) ;
tmp231 = atspre_neq_int_int (tmp230, 0) ;
if (tmp231) {
tmp232 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp232 ;
tmp233 = ATS_MALLOC(sizeof(anairiats_sum_13)) ;
((ats_sum_ptr_type)tmp233)->tag = 14 ;
ats_selptrset_mac(anairiats_sum_13, tmp233, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_13, tmp233, atslab_1, tmp230) ;
/* tmp223 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp233) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp223) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 19708(line=1034, offs=1) -- 20299(line=1058, offs=4)
*/
ATSstaticdec()
ats_int_type
loop_30 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp235) ;
ATSlocal (ats_ptr_type, tmp236) ;
ATSlocal (ats_ptr_type, tmp237) ;
ATSlocal (ats_ptr_type, tmp238) ;
ATSlocal (ats_ptr_type, tmp239) ;
ATSlocal (ats_ptr_type, tmp240) ;
ATSlocal (ats_ptr_type, tmp241) ;
ATSlocal (ats_ptr_type, tmp242) ;
ATSlocal (ats_ptr_type, tmp243) ;
// ATSlocal_void (tmp244) ;
// ATSlocal_void (tmp245) ;

__ats_lab_loop_30:
do {
/* branch: __ats_lab_49 */
__ats_lab_49_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_52_0 ; }
__ats_lab_49_1:
do {
/* branch: __ats_lab_50 */
__ats_lab_50_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_51_0 ; }
__ats_lab_50_1:
tmp235 = 0 ;
break ;

/* branch: __ats_lab_51 */
__ats_lab_51_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_51_1:
tmp235 = -1 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_52 */
__ats_lab_52_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_52_1:
tmp236 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp237 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
do {
/* branch: __ats_lab_53 */
__ats_lab_53_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_54_0 ; }
__ats_lab_53_1:
tmp235 = 1 ;
break ;

/* branch: __ats_lab_54 */
__ats_lab_54_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_54_1:
tmp238 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp239 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;

tmp240 = ats_caselptrlab_mac(anairiats_sum_14, tmp236, atslab_0) ;
tmp241 = ats_caselptrlab_mac(anairiats_sum_14, tmp236, atslab_2) ;

tmp242 = ats_caselptrlab_mac(anairiats_sum_14, tmp238, atslab_0) ;
tmp243 = ats_caselptrlab_mac(anairiats_sum_14, tmp238, atslab_2) ;
/* tmp244 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__label_equal_solve_err (arg0, tmp240, tmp242, arg3) ;
/* tmp245 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp241, tmp243, arg3) ;
arg0 = arg0 ;
arg1 = tmp237 ;
arg2 = tmp239 ;
arg3 = arg3 ;
goto __ats_lab_loop_30 ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp235) ;
} /* end of [loop_30] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 19663(line=1029, offs=1) -- 20594(line=1077, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp234) ;
ATSlocal (ats_int_type, tmp246) ;
ATSlocal (ats_bool_type, tmp247) ;
ATSlocal (ats_int_type, tmp248) ;
ATSlocal (ats_ptr_type, tmp249) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_equal_solve_err:
tmp246 = loop_30 (arg0, arg1, arg2, arg3) ;
tmp247 = atspre_neq_int_int (tmp246, 0) ;
if (tmp247) {
tmp248 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp248 ;
tmp249 = ATS_MALLOC(sizeof(anairiats_sum_13)) ;
((ats_sum_ptr_type)tmp249)->tag = 15 ;
ats_selptrset_mac(anairiats_sum_13, tmp249, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_13, tmp249, atslab_1, tmp246) ;
/* tmp234 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp249) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp234) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 20734(line=1087, offs=5) -- 21591(line=1121, offs=4)
*/
ATSstaticdec()
ats_int_type
loop_32 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp251) ;
ATSlocal (ats_int_type, tmp252) ;
ATSlocal (ats_ptr_type, tmp253) ;
ATSlocal (ats_ptr_type, tmp254) ;
ATSlocal (ats_int_type, tmp255) ;
ATSlocal (ats_ptr_type, tmp256) ;
ATSlocal (ats_ptr_type, tmp257) ;
// ATSlocal_void (tmp258) ;
// ATSlocal_void (tmp259) ;
ATSlocal (ats_int_type, tmp260) ;
ATSlocal (ats_ptr_type, tmp261) ;
ATSlocal (ats_ptr_type, tmp262) ;
ATSlocal (ats_int_type, tmp263) ;
ATSlocal (ats_ptr_type, tmp264) ;
ATSlocal (ats_ptr_type, tmp265) ;
// ATSlocal_void (tmp266) ;
// ATSlocal_void (tmp267) ;
ATSlocal (ats_ptr_type, tmp268) ;
ATSlocal (ats_ptr_type, tmp269) ;
ATSlocal (ats_int_type, tmp270) ;

__ats_lab_loop_32:
do {
/* branch: __ats_lab_55 */
__ats_lab_55_0:
if (((ats_sum_ptr_type)arg1)->tag != 2) { goto __ats_lab_56_0 ; }
__ats_lab_55_1:
if (((ats_sum_ptr_type)arg2)->tag != 2) { goto __ats_lab_59_1 ; }
__ats_lab_55_2:
tmp252 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_0) ;
tmp253 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_1) ;
tmp254 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_2) ;
tmp255 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_0) ;
tmp256 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_1) ;
tmp257 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_2) ;
/* tmp258 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (arg0, tmp252, tmp255, arg3) ;
/* tmp259 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp253, tmp256, arg3) ;
arg0 = arg0 ;
arg1 = tmp254 ;
arg2 = tmp257 ;
arg3 = arg3 ;
goto __ats_lab_loop_32 ; // tail call
break ;

/* branch: __ats_lab_56 */
__ats_lab_56_0:
if (((ats_sum_ptr_type)arg1)->tag != 3) { goto __ats_lab_57_0 ; }
__ats_lab_56_1:
if (((ats_sum_ptr_type)arg2)->tag != 3) { goto __ats_lab_59_1 ; }
__ats_lab_56_2:
tmp260 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_0) ;
tmp261 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_1) ;
tmp262 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_2) ;
tmp263 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_0) ;
tmp264 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_1) ;
tmp265 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_2) ;
/* tmp266 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (arg0, tmp260, tmp263, arg3) ;
/* tmp267 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp261, tmp264, arg3) ;
arg0 = arg0 ;
arg1 = tmp262 ;
arg2 = tmp265 ;
arg3 = arg3 ;
goto __ats_lab_loop_32 ; // tail call
break ;

/* branch: __ats_lab_57 */
__ats_lab_57_0:
if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_58_0 ; }
__ats_lab_57_1:
if (((ats_sum_ptr_type)arg2)->tag != 1) { goto __ats_lab_59_1 ; }
__ats_lab_57_2:
tmp268 = ats_caselptrlab_mac(anairiats_sum_9, arg1, atslab_0) ;
tmp269 = ats_caselptrlab_mac(anairiats_sum_9, arg2, atslab_0) ;
arg0 = arg0 ;
arg1 = tmp268 ;
arg2 = tmp269 ;
arg3 = arg3 ;
goto __ats_lab_loop_32 ; // tail call
break ;

/* 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:
if (((ats_sum_ptr_type)arg2)->tag != 0) { goto __ats_lab_59_1 ; }
__ats_lab_58_2:
tmp251 = 0 ;
break ;

/* branch: __ats_lab_59 */
__ats_lab_59_0:
__ats_lab_59_1:
__ats_lab_59_2:
tmp270 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp270 ;
tmp251 = 1 ;
break ;
} while (0) ;
return (tmp251) ;
} /* end of [loop_32] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 20695(line=1083, offs=1) -- 21773(line=1132, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_equal_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp250) ;
ATSlocal (ats_int_type, tmp271) ;
ATSlocal (ats_bool_type, tmp272) ;
ATSlocal (ats_ptr_type, tmp273) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_equal_solve_err:
tmp271 = loop_32 (arg0, arg1, arg2, arg3) ;
tmp272 = atspre_gt_int_int (tmp271, 0) ;
if (tmp272) {
tmp273 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp273)->tag = 16 ;
ats_selptrset_mac(anairiats_sum_3, tmp273, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp273, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_3, tmp273, atslab_2, arg2) ;
/* tmp250 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp273) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp250) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_equal_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 22034(line=1146, offs=1) -- 22751(line=1188, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lVar_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp274) ;
ATSlocal (ats_ptr_type, tmp275) ;
// ATSlocal_void (tmp276) ;
ATSlocal (ats_ptr_type, tmp277) ;
// ATSlocal_void (tmp278) ;
ATSlocal (ats_ptr_type, tmp279) ;
// ATSlocal_void (tmp280) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lVar_err:
tmp275 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
/* tmp276 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err (arg0, arg3, tmp275, arg4) ;
tmp277 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_make_s2exp (tmp275) ;
/* tmp278 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err (arg0, arg3, tmp277, arg4) ;
tmp279 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_lbs (arg3) ;
/* tmp280 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err (arg0, tmp279, arg2, arg4) ;
/* tmp274 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_ub_insert (arg0, arg3, tmp275) ;
return /* (tmp274) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lVar_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 23011(line=1202, offs=1) -- 23591(line=1235, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_rVar_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp281) ;
ATSlocal (ats_ptr_type, tmp282) ;
// ATSlocal_void (tmp283) ;
ATSlocal (ats_ptr_type, tmp284) ;
// ATSlocal_void (tmp285) ;
ATSlocal (ats_ptr_type, tmp286) ;
// ATSlocal_void (tmp287) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_rVar_err:
tmp282 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
/* tmp283 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_s2exp_srtck_err (arg0, arg3, tmp282, arg4) ;
tmp284 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2zexp_make_s2exp (tmp282) ;
/* tmp285 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2Var_merge_szexp_err (arg0, arg3, tmp284, arg4) ;
tmp286 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_get_ubs (arg3) ;
/* tmp287 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err (arg0, arg1, tmp286, arg4) ;
/* tmp281 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2Var_lb_insert (arg0, arg3, tmp282) ;
return /* (tmp281) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_rVar_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 23681(line=1241, offs=1) -- 23811(line=1250, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp288) ;
ATSlocal (ats_int_type, tmp289) ;
// ATSlocal_void (tmp290) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve:
/* ats_int_type tmp289 ; */
tmp289 = 0 ;
/* tmp290 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (arg0, arg1, arg2, (&tmp289)) ;
tmp288 = tmp289 ;
return (tmp288) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 23871(line=1254, offs=1) -- 24001(line=1263, offs=2)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
ATSlocal (ats_int_type, tmp291) ;
ATSlocal (ats_int_type, tmp292) ;
// ATSlocal_void (tmp293) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve:
/* ats_int_type tmp292 ; */
tmp292 = 0 ;
/* tmp293 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, arg1, arg2, (&tmp292)) ;
tmp291 = tmp292 ;
return (tmp291) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 24089(line=1269, offs=1) -- 33168(line=1643, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp294) ;
ATSlocal (ats_int_type, tmp295) ;
ATSlocal (ats_ptr_type, tmp296) ;
ATSlocal (ats_ptr_type, tmp297) ;
ATSlocal (ats_ptr_type, tmp298) ;
ATSlocal (ats_ptr_type, tmp299) ;
// ATSlocal_void (tmp300) ;
ATSlocal (ats_ptr_type, tmp301) ;
ATSlocal (ats_ptr_type, tmp302) ;
ATSlocal (ats_ptr_type, tmp303) ;
ATSlocal (ats_ptr_type, tmp304) ;
ATSlocal (ats_ptr_type, tmp305) ;
ATSlocal (ats_ptr_type, tmp306) ;
ATSlocal (ats_ptr_type, tmp307) ;
ATSlocal (ats_ptr_type, tmp308) ;
ATSlocal (ats_ptr_type, tmp309) ;
ATSlocal (ats_int_type, tmp310) ;
ATSlocal (ats_ptr_type, tmp311) ;
ATSlocal (ats_int_type, tmp312) ;
ATSlocal (ats_ptr_type, tmp313) ;
ATSlocal (ats_bool_type, tmp314) ;
ATSlocal (ats_int_type, tmp315) ;
ATSlocal (ats_int_type, tmp316) ;
ATSlocal (ats_int_type, tmp317) ;
ATSlocal (ats_bool_type, tmp318) ;
ATSlocal (ats_bool_type, tmp319) ;
ATSlocal (ats_bool_type, tmp320) ;
ATSlocal (ats_int_type, tmp321) ;
ATSlocal (ats_int_type, tmp322) ;
ATSlocal (ats_int_type, tmp323) ;
// ATSlocal_void (tmp324) ;
// ATSlocal_void (tmp325) ;
ATSlocal (ats_ptr_type, tmp326) ;
ATSlocal (anairiats_rec_2, tmp327) ;
ATSlocal (ats_ptr_type, tmp328) ;
ATSlocal (ats_ptr_type, tmp329) ;
// ATSlocal_void (tmp330) ;
// ATSlocal_void (tmp331) ;
// ATSlocal_void (tmp332) ;
// ATSlocal_void (tmp333) ;
ATSlocal (ats_ptr_type, tmp334) ;
ATSlocal (anairiats_rec_2, tmp335) ;
ATSlocal (ats_ptr_type, tmp336) ;
ATSlocal (ats_ptr_type, tmp337) ;
// ATSlocal_void (tmp338) ;
// ATSlocal_void (tmp339) ;
// ATSlocal_void (tmp340) ;
// ATSlocal_void (tmp341) ;
ATSlocal (ats_ptr_type, tmp342) ;
// ATSlocal_void (tmp343) ;
// ATSlocal_void (tmp344) ;
// ATSlocal_void (tmp345) ;
ATSlocal (ats_ptr_type, tmp346) ;
// ATSlocal_void (tmp347) ;
ATSlocal (ats_ptr_type, tmp348) ;
ATSlocal (ats_ptr_type, tmp349) ;
ATSlocal (ats_bool_type, tmp350) ;
ATSlocal (ats_bool_type, tmp351) ;
ATSlocal (ats_int_type, tmp352) ;
ATSlocal (ats_int_type, tmp353) ;
ATSlocal (ats_ptr_type, tmp354) ;
ATSlocal (ats_ptr_type, tmp355) ;
ATSlocal (ats_ptr_type, tmp356) ;
ATSlocal (ats_ptr_type, tmp357) ;
ATSlocal (ats_ptr_type, tmp358) ;
ATSlocal (ats_bool_type, tmp359) ;
ATSlocal (ats_bool_type, tmp360) ;
ATSlocal (ats_int_type, tmp361) ;
ATSlocal (ats_int_type, tmp362) ;
ATSlocal (ats_ptr_type, tmp363) ;
ATSlocal (ats_ptr_type, tmp364) ;
ATSlocal (ats_ptr_type, tmp365) ;
ATSlocal (ats_ptr_type, tmp366) ;
ATSlocal (ats_ptr_type, tmp367) ;
ATSlocal (ats_ptr_type, tmp368) ;
ATSlocal (ats_bool_type, tmp369) ;
ATSlocal (ats_ptr_type, tmp370) ;
ATSlocal (ats_ptr_type, tmp371) ;
ATSlocal (ats_int_type, tmp372) ;
// ATSlocal_void (tmp373) ;
ATSlocal (ats_int_type, tmp374) ;
ATSlocal (ats_ptr_type, tmp375) ;
ATSlocal (ats_int_type, tmp376) ;
ATSlocal (ats_ptr_type, tmp377) ;
ATSlocal (ats_int_type, tmp378) ;
ATSlocal (ats_ptr_type, tmp379) ;
ATSlocal (ats_ptr_type, tmp380) ;
ATSlocal (ats_ptr_type, tmp381) ;
ATSlocal (ats_int_type, tmp382) ;
ATSlocal (ats_ptr_type, tmp383) ;
ATSlocal (ats_int_type, tmp384) ;
ATSlocal (ats_ptr_type, tmp385) ;
ATSlocal (ats_ptr_type, tmp386) ;
// ATSlocal_void (tmp387) ;
// ATSlocal_void (tmp388) ;
// ATSlocal_void (tmp389) ;
// ATSlocal_void (tmp390) ;
// ATSlocal_void (tmp391) ;
ATSlocal (ats_int_type, tmp392) ;
ATSlocal (ats_ptr_type, tmp393) ;
ATSlocal (ats_ptr_type, tmp394) ;
ATSlocal (ats_ptr_type, tmp395) ;
ATSlocal (ats_ptr_type, tmp396) ;
// ATSlocal_void (tmp397) ;
ATSlocal (ats_int_type, tmp398) ;
ATSlocal (ats_ptr_type, tmp399) ;
ATSlocal (ats_ptr_type, tmp400) ;
ATSlocal (ats_ptr_type, tmp401) ;
ATSlocal (ats_ptr_type, tmp402) ;
// ATSlocal_void (tmp403) ;
ATSlocal (ats_int_type, tmp404) ;
ATSlocal (ats_ptr_type, tmp405) ;
ATSlocal (ats_int_type, tmp406) ;
ATSlocal (ats_ptr_type, tmp407) ;
ATSlocal (ats_ptr_type, tmp408) ;
ATSlocal (ats_int_type, tmp409) ;
ATSlocal (ats_ptr_type, tmp410) ;
// ATSlocal_void (tmp411) ;
// ATSlocal_void (tmp412) ;
ATSlocal (ats_int_type, tmp413) ;
ATSlocal (ats_ptr_type, tmp414) ;
ATSlocal (ats_ptr_type, tmp415) ;
ATSlocal (ats_ptr_type, tmp416) ;
ATSlocal (ats_ptr_type, tmp417) ;
ATSlocal (ats_ptr_type, tmp418) ;
ATSlocal (ats_ptr_type, tmp419) ;
ATSlocal (ats_bool_type, tmp420) ;
// ATSlocal_void (tmp421) ;
ATSlocal (ats_int_type, tmp422) ;
ATSlocal (ats_int_type, tmp423) ;
ATSlocal (ats_int_type, tmp424) ;
ATSlocal (ats_ptr_type, tmp425) ;
ATSlocal (ats_int_type, tmp426) ;
ATSlocal (ats_ptr_type, tmp427) ;
// ATSlocal_void (tmp428) ;
ATSlocal (ats_int_type, tmp429) ;
ATSlocal (ats_ptr_type, tmp430) ;
ATSlocal (ats_ptr_type, tmp431) ;
ATSlocal (ats_int_type, tmp432) ;
ATSlocal (ats_ptr_type, tmp433) ;
ATSlocal (ats_ptr_type, tmp434) ;
ATSlocal (ats_ptr_type, tmp435) ;
ATSlocal (ats_ptr_type, tmp436) ;
// ATSlocal_void (tmp437) ;
ATSlocal (ats_int_type, tmp438) ;
ATSlocal (ats_ptr_type, tmp439) ;
ATSlocal (ats_ptr_type, tmp440) ;
ATSlocal (ats_bool_type, tmp441) ;
ATSlocal (ats_bool_type, tmp442) ;
ATSlocal (ats_int_type, tmp443) ;
ATSlocal (ats_int_type, tmp444) ;
ATSlocal (ats_bool_type, tmp445) ;
ATSlocal (ats_int_type, tmp446) ;
ATSlocal (ats_bool_type, tmp447) ;
ATSlocal (ats_ptr_type, tmp448) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err:
tmp295 = ats_ptrget_mac(ats_int_type, arg3) ;
tmp296 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp297 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp298 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp296), atslab_s2exp_node) ;
tmp299 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp297), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_60 */
__ats_lab_60_0:
if (((ats_sum_ptr_type)tmp298)->tag != 26) { goto __ats_lab_61_0 ; }
__ats_lab_60_1:
__ats_lab_60_2:
tmp301 = ats_caselptrlab_mac(anairiats_sum_9, tmp298, atslab_0) ;
tmp302 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp301) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (arg0, tmp302, arg2, arg3) ;
break ;

/* branch: __ats_lab_61 */
__ats_lab_61_0:
__ats_lab_61_1:
if (((ats_sum_ptr_type)tmp299)->tag != 26) { goto __ats_lab_64_1 ; }
__ats_lab_61_2:
tmp303 = ats_caselptrlab_mac(anairiats_sum_9, tmp299, atslab_0) ;
tmp304 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp303) ;
tmp305 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (tmp304) ;
tmp306 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp305), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_62 */
__ats_lab_62_0:
if (((ats_sum_ptr_type)tmp306)->tag != 8) { goto __ats_lab_63_0 ; }
__ats_lab_62_1:
tmp307 = ats_caselptrlab_mac(anairiats_sum_9, tmp306, atslab_0) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_equal_solve_rVar_err (arg0, arg1, tmp304, tmp307, arg3) ;
break ;

/* branch: __ats_lab_63 */
__ats_lab_63_0:
__ats_lab_63_1:
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (arg0, arg1, tmp304, arg3) ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_64 */
__ats_lab_64_0:
__ats_lab_64_1:
if (((ats_sum_ptr_type)tmp299)->tag != 8) { goto __ats_lab_65_0 ; }
__ats_lab_64_2:
tmp308 = ats_caselptrlab_mac(anairiats_sum_9, tmp299, atslab_0) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_rVar_err (arg0, arg1, arg2, tmp308, arg3) ;
break ;

/* branch: __ats_lab_65 */
__ats_lab_65_0:
if (((ats_sum_ptr_type)tmp298)->tag != 8) { goto __ats_lab_66_0 ; }
__ats_lab_65_1:
__ats_lab_65_2:
tmp309 = ats_caselptrlab_mac(anairiats_sum_9, tmp298, atslab_0) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lVar_err (arg0, arg1, arg2, tmp309, arg3) ;
break ;

/* branch: __ats_lab_66 */
__ats_lab_66_0:
if (((ats_sum_ptr_type)tmp298)->tag != 22) { goto __ats_lab_69_0 ; }
__ats_lab_66_1:
__ats_lab_66_2:
tmp310 = ats_caselptrlab_mac(anairiats_sum_11, tmp298, atslab_0) ;
tmp311 = ats_caselptrlab_mac(anairiats_sum_11, tmp298, atslab_1) ;
do {
/* branch: __ats_lab_67 */
__ats_lab_67_0:
if (((ats_sum_ptr_type)tmp299)->tag != 22) { goto __ats_lab_68_0 ; }
__ats_lab_67_1:
tmp312 = ats_caselptrlab_mac(anairiats_sum_11, tmp299, atslab_0) ;
tmp313 = ats_caselptrlab_mac(anairiats_sum_11, tmp299, atslab_1) ;
tmp314 = atspre_lt_int_int (tmp310, tmp312) ;
if (tmp314) {
tmp315 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp315 ;
} else {
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp311, tmp313, arg3) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_68 */
__ats_lab_68_0:
__ats_lab_68_1:
tmp316 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp316 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_69 */
__ats_lab_69_0:
__ats_lab_69_1:
if (((ats_sum_ptr_type)tmp299)->tag != 22) { goto __ats_lab_72_0 ; }
__ats_lab_69_2:
tmp317 = ats_caselptrlab_mac(anairiats_sum_11, tmp299, atslab_0) ;
do {
/* branch: __ats_lab_70 */
__ats_lab_70_0:
__ats_lab_70_1:
tmp318 = atspre_eq_int_int (tmp317, 0) ;
if (!tmp318) { goto __ats_lab_71_1 ; }
tmp319 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_is_nonlin (tmp296) ;
if (tmp319) {
tmp320 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_tszeq (tmp296, tmp297) ;
if (tmp320) {
/* empty */
} else {
tmp321 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp321 ;
} /* end of [if] */
} else {
tmp322 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp322 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_71 */
__ats_lab_71_0:
__ats_lab_71_1:
tmp323 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp323 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_72 */
__ats_lab_72_0:
if (((ats_sum_ptr_type)tmp298)->tag != 28) { goto __ats_lab_73_0 ; }
__ats_lab_72_1:
__ats_lab_72_2:
/* tmp324 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_push () ;
/* tmp325 = ats_selsin_mac(tmp324, atslab_1) */ ;
tmp326 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_absuni_and_add (arg0, arg2) ;
tmp327 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_uni_instantiate_all (tmp296, arg0, arg3) ;
tmp328 = ats_select_mac(tmp327, atslab_0) ;
tmp329 = ats_select_mac(tmp327, atslab_1) ;
/* tmp330 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt (arg0, tmp329) ;
/* tmp331 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp328, tmp326, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_pop_and_add_main (arg0) ;
break ;

/* branch: __ats_lab_73 */
__ats_lab_73_0:
__ats_lab_73_1:
if (((ats_sum_ptr_type)tmp299)->tag != 27) { goto __ats_lab_74_1 ; }
__ats_lab_73_2:
/* tmp332 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_push () ;
/* tmp333 = ats_selsin_mac(tmp332, atslab_1) */ ;
tmp334 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_opnexi_and_add (arg0, arg1) ;
tmp335 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2exp_exi_instantiate_all (tmp297, arg0, arg3) ;
tmp336 = ats_select_mac(tmp335, atslab_0) ;
tmp337 = ats_select_mac(tmp335, atslab_1) ;
/* tmp338 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_proplst_vt (arg0, tmp337) ;
/* tmp339 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp334, tmp336, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_pop_and_add_main (arg0) ;
break ;

/* branch: __ats_lab_74 */
__ats_lab_74_0:
__ats_lab_74_1:
if (((ats_sum_ptr_type)tmp299)->tag != 28) { goto __ats_lab_75_0 ; }
__ats_lab_74_2:
/* tmp340 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_push () ;
/* tmp341 = ats_selsin_mac(tmp340, atslab_1) */ ;
tmp342 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_absuni_and_add (arg0, arg2) ;
/* tmp343 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp296, tmp342, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_pop_and_add_main (arg0) ;
break ;

/* branch: __ats_lab_75 */
__ats_lab_75_0:
if (((ats_sum_ptr_type)tmp298)->tag != 27) { goto __ats_lab_76_0 ; }
__ats_lab_75_1:
__ats_lab_75_2:
/* tmp344 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_push () ;
/* tmp345 = ats_selsin_mac(tmp344, atslab_1) */ ;
tmp346 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_opnexi_and_add (arg0, arg1) ;
/* tmp347 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp346, tmp297, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_pop_and_add_main (arg0) ;
break ;

/* branch: __ats_lab_76 */
__ats_lab_76_0:
if (((ats_sum_ptr_type)tmp298)->tag != 4) { goto __ats_lab_79_0 ; }
__ats_lab_76_1:
__ats_lab_76_2:
tmp348 = ats_caselptrlab_mac(anairiats_sum_9, tmp298, atslab_0) ;
do {
/* branch: __ats_lab_77 */
__ats_lab_77_0:
if (((ats_sum_ptr_type)tmp299)->tag != 4) { goto __ats_lab_78_0 ; }
__ats_lab_77_1:
tmp349 = ats_caselptrlab_mac(anairiats_sum_9, tmp299, atslab_0) ;
tmp350 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_subeq (tmp348, tmp349) ;
tmp351 = atspre_neg_bool (tmp350) ;
if (tmp351) {
tmp352 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp352 ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_78 */
__ats_lab_78_0:
__ats_lab_78_1:
tmp353 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp353 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_79 */
__ats_lab_79_0:
if (((ats_sum_ptr_type)tmp298)->tag != 17) { goto __ats_lab_87_0 ; }
__ats_lab_79_1:
__ats_lab_79_2:
tmp354 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_0) ;
tmp355 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_1) ;
do {
/* branch: __ats_lab_80 */
__ats_lab_80_0:
if (((ats_sum_ptr_type)tmp299)->tag != 4) { goto __ats_lab_83_0 ; }
__ats_lab_80_1:
tmp356 = ats_caselptrlab_mac(anairiats_sum_9, tmp299, atslab_0) ;
tmp357 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp354), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_81 */
__ats_lab_81_0:
if (((ats_sum_ptr_type)tmp357)->tag != 4) { goto __ats_lab_82_0 ; }
__ats_lab_81_1:
tmp358 = ats_caselptrlab_mac(anairiats_sum_9, tmp357, atslab_0) ;
tmp359 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_subeq (tmp358, tmp356) ;
tmp360 = atspre_neg_bool (tmp359) ;
if (tmp360) {
tmp361 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp361 ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_82 */
__ats_lab_82_0:
__ats_lab_82_1:
tmp362 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp362 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_83 */
__ats_lab_83_0:
if (((ats_sum_ptr_type)tmp299)->tag != 17) { goto __ats_lab_86_0 ; }
__ats_lab_83_1:
tmp363 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_0) ;
tmp364 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_1) ;
tmp365 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp354), atslab_s2exp_node) ;
tmp366 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp363), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_84 */
__ats_lab_84_0:
if (((ats_sum_ptr_type)tmp365)->tag != 4) { goto __ats_lab_85_0 ; }
__ats_lab_84_1:
if (((ats_sum_ptr_type)tmp366)->tag != 4) { goto __ats_lab_85_1 ; }
__ats_lab_84_2:
tmp367 = ats_caselptrlab_mac(anairiats_sum_9, tmp365, atslab_0) ;
tmp368 = ats_caselptrlab_mac(anairiats_sum_9, tmp366, atslab_0) ;
tmp369 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_subeq (tmp367, tmp368) ;
if (tmp369) {
tmp370 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2cst_get_argsrtss (tmp367) ;
if (tmp370 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 28711(line=1475, offs=11) -- 28769(line=1476, offs=35)") ; }
tmp371 = ats_caselptrlab_mac(anairiats_sum_12, tmp370, atslab_0) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_argsrtlst_err (arg0, tmp371, tmp355, tmp364, arg3) ;
} else {
tmp372 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp372 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_85 */
__ats_lab_85_0:
__ats_lab_85_1:
__ats_lab_85_2:
/* tmp373 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp354, tmp363, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err (arg0, tmp355, tmp364, arg3) ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_86 */
__ats_lab_86_0:
__ats_lab_86_1:
tmp374 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp374 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_87 */
__ats_lab_87_0:
if (((ats_sum_ptr_type)tmp298)->tag != 19) { goto __ats_lab_90_0 ; }
__ats_lab_87_1:
__ats_lab_87_2:
tmp375 = ats_caselptrlab_mac(anairiats_sum_16, tmp298, atslab_0) ;
tmp376 = ats_caselptrlab_mac(anairiats_sum_16, tmp298, atslab_1) ;
tmp377 = ats_caselptrlab_mac(anairiats_sum_16, tmp298, atslab_2) ;
tmp378 = ats_caselptrlab_mac(anairiats_sum_16, tmp298, atslab_3) ;
tmp379 = ats_caselptrlab_mac(anairiats_sum_16, tmp298, atslab_4) ;
tmp380 = ats_caselptrlab_mac(anairiats_sum_16, tmp298, atslab_5) ;
do {
/* branch: __ats_lab_88 */
__ats_lab_88_0:
if (((ats_sum_ptr_type)tmp299)->tag != 19) { goto __ats_lab_89_0 ; }
__ats_lab_88_1:
tmp381 = ats_caselptrlab_mac(anairiats_sum_16, tmp299, atslab_0) ;
tmp382 = ats_caselptrlab_mac(anairiats_sum_16, tmp299, atslab_1) ;
tmp383 = ats_caselptrlab_mac(anairiats_sum_16, tmp299, atslab_2) ;
tmp384 = ats_caselptrlab_mac(anairiats_sum_16, tmp299, atslab_3) ;
tmp385 = ats_caselptrlab_mac(anairiats_sum_16, tmp299, atslab_4) ;
tmp386 = ats_caselptrlab_mac(anairiats_sum_16, tmp299, atslab_5) ;
/* tmp387 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__funclo_equal_solve_err (arg0, tmp375, tmp381, arg3) ;
/* tmp388 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err (arg0, tmp378, tmp384, arg3) ;
/* tmp389 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__linearity_equal_solve_err (arg0, tmp376, tmp382, arg3) ;
/* tmp390 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2eff_subeq_solve_err (arg0, tmp377, tmp383, arg3) ;
/* tmp391 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp380, tmp386, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_err (arg0, tmp385, tmp379, arg3) ;
break ;

/* branch: __ats_lab_89 */
__ats_lab_89_0:
__ats_lab_89_1:
tmp392 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp392 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_90 */
__ats_lab_90_0:
if (((ats_sum_ptr_type)tmp298)->tag != 12) { goto __ats_lab_93_0 ; }
__ats_lab_90_1:
__ats_lab_90_2:
tmp393 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_0) ;
tmp394 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_1) ;
do {
/* branch: __ats_lab_91 */
__ats_lab_91_0:
if (((ats_sum_ptr_type)tmp299)->tag != 12) { goto __ats_lab_92_0 ; }
__ats_lab_91_1:
tmp395 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_0) ;
tmp396 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_1) ;
/* tmp397 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp393, tmp395, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp394, tmp396, arg3) ;
break ;

/* branch: __ats_lab_92 */
__ats_lab_92_0:
__ats_lab_92_1:
tmp398 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp398 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_93 */
__ats_lab_93_0:
if (((ats_sum_ptr_type)tmp298)->tag != 24) { goto __ats_lab_96_0 ; }
__ats_lab_93_1:
__ats_lab_93_2:
tmp399 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_0) ;
tmp400 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_1) ;
do {
/* branch: __ats_lab_94 */
__ats_lab_94_0:
if (((ats_sum_ptr_type)tmp299)->tag != 24) { goto __ats_lab_95_0 ; }
__ats_lab_94_1:
tmp401 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_0) ;
tmp402 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_1) ;
/* tmp403 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp399, tmp401, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err (arg0, tmp400, tmp402, arg3) ;
break ;

/* branch: __ats_lab_95 */
__ats_lab_95_0:
__ats_lab_95_1:
tmp404 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp404 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_96 */
__ats_lab_96_0:
if (((ats_sum_ptr_type)tmp298)->tag != 25) { goto __ats_lab_99_0 ; }
__ats_lab_96_1:
__ats_lab_96_2:
tmp405 = ats_caselptrlab_mac(anairiats_sum_5, tmp298, atslab_0) ;
tmp406 = ats_caselptrlab_mac(anairiats_sum_5, tmp298, atslab_1) ;
tmp407 = ats_caselptrlab_mac(anairiats_sum_5, tmp298, atslab_2) ;
do {
/* branch: __ats_lab_97 */
__ats_lab_97_0:
if (((ats_sum_ptr_type)tmp299)->tag != 25) { goto __ats_lab_98_0 ; }
__ats_lab_97_1:
tmp408 = ats_caselptrlab_mac(anairiats_sum_5, tmp299, atslab_0) ;
tmp409 = ats_caselptrlab_mac(anairiats_sum_5, tmp299, atslab_1) ;
tmp410 = ats_caselptrlab_mac(anairiats_sum_5, tmp299, atslab_2) ;
/* tmp411 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__tyreckind_equal_solve_err (arg0, tmp405, tmp408, arg3) ;
/* tmp412 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve_err (arg0, tmp406, tmp409, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_tyleq_solve_err (arg0, tmp407, tmp410, arg3) ;
break ;

/* branch: __ats_lab_98 */
__ats_lab_98_0:
__ats_lab_98_1:
tmp413 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp413 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_99 */
__ats_lab_99_0:
if (((ats_sum_ptr_type)tmp298)->tag != 11) { goto __ats_lab_102_0 ; }
__ats_lab_99_1:
__ats_lab_99_2:
tmp414 = ats_caselptrlab_mac(anairiats_sum_3, tmp298, atslab_0) ;
tmp415 = ats_caselptrlab_mac(anairiats_sum_3, tmp298, atslab_1) ;
tmp416 = ats_caselptrlab_mac(anairiats_sum_3, tmp298, atslab_2) ;
do {
/* branch: __ats_lab_100 */
__ats_lab_100_0:
if (((ats_sum_ptr_type)tmp299)->tag != 11) { goto __ats_lab_101_0 ; }
__ats_lab_100_1:
tmp417 = ats_caselptrlab_mac(anairiats_sum_3, tmp299, atslab_0) ;
tmp418 = ats_caselptrlab_mac(anairiats_sum_3, tmp299, atslab_1) ;
tmp419 = ats_caselptrlab_mac(anairiats_sum_3, tmp299, atslab_2) ;
tmp420 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_d2con_d2con (tmp414, tmp417) ;
if (tmp420) {
/* tmp421 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp415, tmp418, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_equal_solve_err (arg0, tmp416, tmp419, arg3) ;
} else {
tmp422 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp422 ;
} /* end of [if] */
break ;

/* branch: __ats_lab_101 */
__ats_lab_101_0:
__ats_lab_101_1:
tmp423 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp423 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_102 */
__ats_lab_102_0:
if (((ats_sum_ptr_type)tmp298)->tag != 29) { goto __ats_lab_105_0 ; }
__ats_lab_102_1:
__ats_lab_102_2:
tmp424 = ats_caselptrlab_mac(anairiats_sum_11, tmp298, atslab_0) ;
tmp425 = ats_caselptrlab_mac(anairiats_sum_11, tmp298, atslab_1) ;
do {
/* branch: __ats_lab_103 */
__ats_lab_103_0:
if (((ats_sum_ptr_type)tmp299)->tag != 29) { goto __ats_lab_104_0 ; }
__ats_lab_103_1:
tmp426 = ats_caselptrlab_mac(anairiats_sum_11, tmp299, atslab_0) ;
tmp427 = ats_caselptrlab_mac(anairiats_sum_11, tmp299, atslab_1) ;
/* tmp428 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (arg0, tmp424, tmp426, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp425, tmp427, arg3) ;
break ;

/* branch: __ats_lab_104 */
__ats_lab_104_0:
__ats_lab_104_1:
tmp429 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp429 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_105 */
__ats_lab_105_0:
if (((ats_sum_ptr_type)tmp298)->tag != 30) { goto __ats_lab_108_0 ; }
__ats_lab_105_1:
__ats_lab_105_2:
tmp430 = ats_caselptrlab_mac(anairiats_sum_9, tmp298, atslab_0) ;
do {
/* branch: __ats_lab_106 */
__ats_lab_106_0:
if (((ats_sum_ptr_type)tmp299)->tag != 30) { goto __ats_lab_107_0 ; }
__ats_lab_106_1:
tmp431 = ats_caselptrlab_mac(anairiats_sum_9, tmp299, atslab_0) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp430, tmp431, arg3) ;
break ;

/* branch: __ats_lab_107 */
__ats_lab_107_0:
__ats_lab_107_1:
tmp432 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp432 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_108 */
__ats_lab_108_0:
if (((ats_sum_ptr_type)tmp298)->tag != 31) { goto __ats_lab_111_0 ; }
__ats_lab_108_1:
__ats_lab_108_2:
tmp433 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_0) ;
tmp434 = ats_caselptrlab_mac(anairiats_sum_10, tmp298, atslab_1) ;
do {
/* branch: __ats_lab_109 */
__ats_lab_109_0:
if (((ats_sum_ptr_type)tmp299)->tag != 31) { goto __ats_lab_110_0 ; }
__ats_lab_109_1:
tmp435 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_0) ;
tmp436 = ats_caselptrlab_mac(anairiats_sum_10, tmp299, atslab_1) ;
/* tmp437 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp433, tmp435, arg3) ;
/* tmp300 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_tyleq_solve_err (arg0, tmp434, tmp436, arg3) ;
break ;

/* branch: __ats_lab_110 */
__ats_lab_110_0:
__ats_lab_110_1:
tmp438 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp438 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_111 */
__ats_lab_111_0:
if (((ats_sum_ptr_type)tmp298)->tag != 23) { goto __ats_lab_114_0 ; }
__ats_lab_111_1:
__ats_lab_111_2:
tmp439 = ats_caselptrlab_mac(anairiats_sum_9, tmp298, atslab_0) ;
do {
/* branch: __ats_lab_112 */
__ats_lab_112_0:
if (((ats_sum_ptr_type)tmp299)->tag != 23) { goto __ats_lab_113_0 ; }
__ats_lab_112_1:
tmp440 = ats_caselptrlab_mac(anairiats_sum_9, tmp299, atslab_0) ;
tmp442 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_tszeq (tmp439, tmp440) ;
tmp441 = atspre_neg_bool (tmp442) ;
if (tmp441) {
tmp443 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp443 ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_113 */
__ats_lab_113_0:
__ats_lab_113_1:
tmp444 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp444 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_114 */
__ats_lab_114_0:
__ats_lab_114_1:
__ats_lab_114_2:
tmp445 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_syneq2 (arg1, arg2) ;
if (!tmp445) { goto __ats_lab_115_2 ; }
break ;

/* branch: __ats_lab_115 */
__ats_lab_115_0:
__ats_lab_115_1:
__ats_lab_115_2:
tmp446 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp446 ;
break ;
} while (0) ;
tmp447 = atspre_gt_int_int (ats_ptrget_mac(ats_int_type, arg3), tmp295) ;
if (tmp447) {
tmp448 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp448)->tag = 12 ;
ats_selptrset_mac(anairiats_sum_3, tmp448, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp448, atslab_1, tmp296) ;
ats_selptrset_mac(anairiats_sum_3, tmp448, atslab_2, tmp297) ;
/* tmp294 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp448) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp294) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 33236(line=1647, offs=1) -- 33406(line=1655, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp449) ;
ATSlocal (ats_ptr_type, tmp450) ;
ATSlocal (ats_ptr_type, tmp451) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err:
tmp450 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (arg1) ;
tmp451 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (arg2) ;
/* tmp449 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (arg0, tmp450, tmp451, arg3) ;
return /* (tmp449) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 33541(line=1666, offs=1) -- 34039(line=1690, offs=2)
*/
ATSstaticdec()
ats_int_type
loop_40 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp453) ;
ATSlocal (ats_ptr_type, tmp454) ;
ATSlocal (ats_ptr_type, tmp455) ;
ATSlocal (ats_ptr_type, tmp456) ;
ATSlocal (ats_ptr_type, tmp457) ;
// ATSlocal_void (tmp458) ;

__ats_lab_loop_40:
do {
/* branch: __ats_lab_116 */
__ats_lab_116_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_119_0 ; }
__ats_lab_116_1:
do {
/* branch: __ats_lab_117 */
__ats_lab_117_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_118_0 ; }
__ats_lab_117_1:
tmp453 = 0 ;
break ;

/* branch: __ats_lab_118 */
__ats_lab_118_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_118_1:
tmp453 = -1 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_119 */
__ats_lab_119_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_119_1:
tmp454 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp455 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
do {
/* branch: __ats_lab_120 */
__ats_lab_120_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_121_0 ; }
__ats_lab_120_1:
tmp453 = 1 ;
break ;

/* branch: __ats_lab_121 */
__ats_lab_121_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_121_1:
tmp456 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp457 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;
/* tmp458 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp454, tmp456, arg3) ;
arg0 = arg0 ;
arg1 = tmp455 ;
arg2 = tmp457 ;
arg3 = arg3 ;
goto __ats_lab_loop_40 ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp453) ;
} /* end of [loop_40] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 33498(line=1661, offs=1) -- 34296(line=1711, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp452) ;
ATSlocal (ats_int_type, tmp459) ;
ATSlocal (ats_bool_type, tmp460) ;
ATSlocal (ats_int_type, tmp461) ;
ATSlocal (ats_ptr_type, tmp462) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_err:
tmp459 = loop_40 (arg0, arg1, arg2, arg3) ;
tmp460 = atspre_neq_int_int (tmp459, 0) ;
if (tmp460) {
tmp461 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp461 ;
tmp462 = ATS_MALLOC(sizeof(anairiats_sum_13)) ;
((ats_sum_ptr_type)tmp462)->tag = 14 ;
ats_selptrset_mac(anairiats_sum_13, tmp462, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_13, tmp462, atslab_1, tmp459) ;
/* tmp452 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp462) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp452) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 34439(line=1721, offs=5) -- 35055(line=1746, offs=2)
*/
ATSstaticdec()
ats_int_type
loop_42 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp464) ;
ATSlocal (ats_ptr_type, tmp465) ;
ATSlocal (ats_ptr_type, tmp466) ;
ATSlocal (ats_ptr_type, tmp467) ;
ATSlocal (ats_ptr_type, tmp468) ;
ATSlocal (ats_ptr_type, tmp469) ;
ATSlocal (ats_ptr_type, tmp470) ;
ATSlocal (ats_ptr_type, tmp471) ;
ATSlocal (ats_ptr_type, tmp472) ;
// ATSlocal_void (tmp473) ;
// ATSlocal_void (tmp474) ;

__ats_lab_loop_42:
do {
/* branch: __ats_lab_122 */
__ats_lab_122_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_125_0 ; }
__ats_lab_122_1:
do {
/* branch: __ats_lab_123 */
__ats_lab_123_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_124_0 ; }
__ats_lab_123_1:
tmp464 = 0 ;
break ;

/* branch: __ats_lab_124 */
__ats_lab_124_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_124_1:
tmp464 = -1 ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_125 */
__ats_lab_125_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_125_1:
tmp465 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp466 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
do {
/* branch: __ats_lab_126 */
__ats_lab_126_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_127_0 ; }
__ats_lab_126_1:
tmp464 = 1 ;
break ;

/* branch: __ats_lab_127 */
__ats_lab_127_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_127_1:
tmp467 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp468 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;

tmp469 = ats_caselptrlab_mac(anairiats_sum_14, tmp465, atslab_0) ;
tmp470 = ats_caselptrlab_mac(anairiats_sum_14, tmp465, atslab_2) ;

tmp471 = ats_caselptrlab_mac(anairiats_sum_14, tmp467, atslab_0) ;
tmp472 = ats_caselptrlab_mac(anairiats_sum_14, tmp467, atslab_2) ;
/* tmp473 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__label_equal_solve_err (arg0, tmp469, tmp471, arg3) ;
/* tmp474 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp470, tmp472, arg3) ;
arg0 = arg0 ;
arg1 = tmp466 ;
arg2 = tmp468 ;
arg3 = arg3 ;
goto __ats_lab_loop_42 ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return (tmp464) ;
} /* end of [loop_42] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 34394(line=1717, offs=1) -- 35311(line=1764, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_tyleq_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp463) ;
ATSlocal (ats_int_type, tmp475) ;
ATSlocal (ats_bool_type, tmp476) ;
ATSlocal (ats_int_type, tmp477) ;
ATSlocal (ats_ptr_type, tmp478) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_tyleq_solve_err:
tmp475 = loop_42 (arg0, arg1, arg2, arg3) ;
tmp476 = atspre_neq_int_int (tmp475, 0) ;
if (tmp476) {
tmp477 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp477 ;
tmp478 = ATS_MALLOC(sizeof(anairiats_sum_13)) ;
((ats_sum_ptr_type)tmp478)->tag = 15 ;
ats_selptrset_mac(anairiats_sum_13, tmp478, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_13, tmp478, atslab_1, tmp475) ;
/* tmp463 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp478) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp463) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__labs2explst_tyleq_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 35451(line=1775, offs=1) -- 36574(line=1821, offs=4)
*/
ATSstaticdec()
ats_int_type
loop_44 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp480) ;
ATSlocal (ats_int_type, tmp481) ;
ATSlocal (ats_ptr_type, tmp482) ;
ATSlocal (ats_ptr_type, tmp483) ;
ATSlocal (ats_int_type, tmp484) ;
ATSlocal (ats_ptr_type, tmp485) ;
ATSlocal (ats_ptr_type, tmp486) ;
// ATSlocal_void (tmp487) ;
// ATSlocal_void (tmp488) ;
ATSlocal (ats_int_type, tmp489) ;
ATSlocal (ats_ptr_type, tmp490) ;
ATSlocal (ats_ptr_type, tmp491) ;
ATSlocal (ats_int_type, tmp492) ;
ATSlocal (ats_ptr_type, tmp493) ;
ATSlocal (ats_ptr_type, tmp494) ;
// ATSlocal_void (tmp495) ;
// ATSlocal_void (tmp496) ;
ATSlocal (ats_int_type, tmp497) ;
ATSlocal (ats_ptr_type, tmp498) ;
ATSlocal (ats_ptr_type, tmp499) ;
ATSlocal (ats_int_type, tmp500) ;
ATSlocal (ats_ptr_type, tmp501) ;
ATSlocal (ats_ptr_type, tmp502) ;
// ATSlocal_void (tmp503) ;
// ATSlocal_void (tmp504) ;
ATSlocal (ats_ptr_type, tmp505) ;
ATSlocal (ats_ptr_type, tmp506) ;
ATSlocal (ats_int_type, tmp507) ;

__ats_lab_loop_44:
do {
/* branch: __ats_lab_128 */
__ats_lab_128_0:
if (((ats_sum_ptr_type)arg1)->tag != 2) { goto __ats_lab_129_0 ; }
__ats_lab_128_1:
if (((ats_sum_ptr_type)arg2)->tag != 2) { goto __ats_lab_129_1 ; }
__ats_lab_128_2:
tmp481 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_0) ;
tmp482 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_1) ;
tmp483 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_2) ;
tmp484 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_0) ;
tmp485 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_1) ;
tmp486 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_2) ;
/* tmp487 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (arg0, tmp481, tmp484, arg3) ;
/* tmp488 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp482, tmp485, arg3) ;
arg0 = arg0 ;
arg1 = tmp483 ;
arg2 = tmp486 ;
arg3 = arg3 ;
goto __ats_lab_loop_44 ; // tail call
break ;

/* branch: __ats_lab_129 */
__ats_lab_129_0:
if (((ats_sum_ptr_type)arg1)->tag != 2) { goto __ats_lab_130_0 ; }
__ats_lab_129_1:
if (((ats_sum_ptr_type)arg2)->tag != 3) { goto __ats_lab_133_1 ; }
__ats_lab_129_2:
tmp489 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_0) ;
tmp490 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_1) ;
tmp491 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_2) ;
tmp492 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_0) ;
tmp493 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_1) ;
tmp494 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_2) ;
/* tmp495 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (arg0, tmp489, tmp492, arg3) ;
/* tmp496 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp490, tmp493, arg3) ;
arg0 = arg0 ;
arg1 = tmp491 ;
arg2 = tmp494 ;
arg3 = arg3 ;
goto __ats_lab_loop_44 ; // tail call
break ;

/* branch: __ats_lab_130 */
__ats_lab_130_0:
if (((ats_sum_ptr_type)arg1)->tag != 3) { goto __ats_lab_131_0 ; }
__ats_lab_130_1:
if (((ats_sum_ptr_type)arg2)->tag != 3) { goto __ats_lab_133_1 ; }
__ats_lab_130_2:
tmp497 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_0) ;
tmp498 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_1) ;
tmp499 = ats_caselptrlab_mac(anairiats_sum_15, arg1, atslab_2) ;
tmp500 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_0) ;
tmp501 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_1) ;
tmp502 = ats_caselptrlab_mac(anairiats_sum_15, arg2, atslab_2) ;
/* tmp503 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__refval_equal_solve_err (arg0, tmp497, tmp500, arg3) ;
/* tmp504 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp498, tmp501, arg3) ;
arg0 = arg0 ;
arg1 = tmp499 ;
arg2 = tmp502 ;
arg3 = arg3 ;
goto __ats_lab_loop_44 ; // tail call
break ;

/* branch: __ats_lab_131 */
__ats_lab_131_0:
if (((ats_sum_ptr_type)arg1)->tag != 1) { goto __ats_lab_132_0 ; }
__ats_lab_131_1:
if (((ats_sum_ptr_type)arg2)->tag != 1) { goto __ats_lab_133_1 ; }
__ats_lab_131_2:
tmp505 = ats_caselptrlab_mac(anairiats_sum_9, arg1, atslab_0) ;
tmp506 = ats_caselptrlab_mac(anairiats_sum_9, arg2, atslab_0) ;
arg0 = arg0 ;
arg1 = tmp505 ;
arg2 = tmp506 ;
arg3 = arg3 ;
goto __ats_lab_loop_44 ; // tail call
break ;

/* branch: __ats_lab_132 */
__ats_lab_132_0:
if (((ats_sum_ptr_type)arg1)->tag != 0) { goto __ats_lab_133_0 ; }
__ats_lab_132_1:
if (((ats_sum_ptr_type)arg2)->tag != 0) { goto __ats_lab_133_1 ; }
__ats_lab_132_2:
tmp480 = 0 ;
break ;

/* branch: __ats_lab_133 */
__ats_lab_133_0:
__ats_lab_133_1:
__ats_lab_133_2:
tmp507 = atspre_add_int_int (ats_ptrget_mac(ats_int_type, arg3), 1) ;
ats_ptrget_mac(ats_int_type, arg3) = tmp507 ;
tmp480 = 1 ;
break ;
} while (0) ;
return (tmp480) ;
} /* end of [loop_44] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 35412(line=1770, offs=1) -- 36770(line=1837, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_tyleq_solve_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp479) ;
ATSlocal (ats_int_type, tmp508) ;
ATSlocal (ats_bool_type, tmp509) ;
ATSlocal (ats_ptr_type, tmp510) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_tyleq_solve_err:
tmp508 = loop_44 (arg0, arg1, arg2, arg3) ;
tmp509 = atspre_gt_int_int (tmp508, 0) ;
if (tmp509) {
tmp510 = ATS_MALLOC(sizeof(anairiats_sum_3)) ;
((ats_sum_ptr_type)tmp510)->tag = 16 ;
ats_selptrset_mac(anairiats_sum_3, tmp510, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_3, tmp510, atslab_1, arg1) ;
ats_selptrset_mac(anairiats_sum_3, tmp510, atslab_2, arg2) ;
/* tmp479 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__the_staerrlst_add (tmp510) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp479) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__wths2explst_tyleq_solve_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 36871(line=1843, offs=3) -- 37488(line=1882, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp511) ;
ATSlocal (ats_ptr_type, tmp512) ;
ATSlocal (ats_ptr_type, tmp513) ;
ATSlocal (ats_ptr_type, tmp514) ;
ATSlocal (ats_ptr_type, tmp515) ;
// ATSlocal_void (tmp516) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err:
do {
/* branch: __ats_lab_134 */
__ats_lab_134_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_135_0 ; }
__ats_lab_134_1:
break ;

/* branch: __ats_lab_135 */
__ats_lab_135_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_135_1:
tmp512 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp513 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
tmp515 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2VarBound_get_val (tmp512) ;
tmp514 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp515) ;
/* tmp516 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (arg0, tmp514, arg2, arg3) ;
arg0 = arg0 ;
arg1 = tmp513 ;
arg2 = arg2 ;
arg3 = arg3 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err ; // tail call
break ;
} while (0) ;
return /* (tmp511) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_lbs_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 37566(line=1886, offs=3) -- 37946(line=1907, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp517) ;
ATSlocal (ats_ptr_type, tmp518) ;
ATSlocal (ats_ptr_type, tmp519) ;
ATSlocal (ats_ptr_type, tmp520) ;
ATSlocal (ats_ptr_type, tmp521) ;
// ATSlocal_void (tmp522) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err:
do {
/* branch: __ats_lab_136 */
__ats_lab_136_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_137_0 ; }
__ats_lab_136_1:
break ;

/* branch: __ats_lab_137 */
__ats_lab_137_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_137_1:
tmp518 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp519 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;
tmp521 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2VarBound_get_val (tmp518) ;
tmp520 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp521) ;
/* tmp522 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_tyleq_solve_err (arg0, arg1, tmp520, arg3) ;
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = tmp519 ;
arg3 = arg3 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err ; // tail call
break ;
} while (0) ;
return /* (tmp517) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__s2hnf_tyleq_solve_ubs_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 38054(line=1913, offs=3) -- 38913(line=1946, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_argsrtlst_err (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_ref_type arg4) {
/* local vardec */
// ATSlocal_void (tmp523) ;
ATSlocal (ats_ptr_type, tmp524) ;
ATSlocal (ats_ptr_type, tmp525) ;
ATSlocal (ats_ptr_type, tmp526) ;
ATSlocal (ats_ptr_type, tmp527) ;
ATSlocal (anairiats_rec_2, tmp528) ;
ATSlocal (ats_ptr_type, tmp529) ;
ATSlocal (ats_int_type, tmp530) ;
ATSlocal (ats_ptr_type, tmp531) ;
// ATSlocal_void (tmp532) ;
ATSlocal (ats_bool_type, tmp533) ;
ATSlocal (ats_bool_type, tmp534) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_argsrtlst_err:
do {
/* branch: __ats_lab_138 */
__ats_lab_138_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_139_0 ; }
__ats_lab_138_1:
break ;

/* branch: __ats_lab_139 */
__ats_lab_139_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_139_1:
tmp524 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp525 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;
do {
/* branch: __ats_lab_140 */
__ats_lab_140_0:
if (arg3 != (ats_sum_ptr_type)0) { goto __ats_lab_141_0 ; }
__ats_lab_140_1:
break ;

/* branch: __ats_lab_141 */
__ats_lab_141_0:
// if (arg3 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_141_1:
tmp526 = ats_caselptrlab_mac(anairiats_sum_12, arg3, atslab_0) ;
tmp527 = ats_caselptrlab_mac(anairiats_sum_12, arg3, atslab_1) ;
if (arg1 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 38345(line=1928, offs=11) -- 38390(line=1929, offs=36)") ; }
tmp528 = ats_caselptrlab_mac(anairiats_sum_17, arg1, atslab_0) ;
tmp529 = ats_caselptrlab_mac(anairiats_sum_17, arg1, atslab_1) ;
tmp531 = ats_select_mac(tmp528, atslab_1) ;
tmp530 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_get_pol (tmp531) ;
tmp533 = atspre_eq_int_int (tmp530, 0) ;
if (tmp533) {
/* tmp532 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_equal_solve_err (arg0, tmp524, tmp526, arg4) ;
} else {
tmp534 = atspre_gt_int_int (tmp530, 0) ;
if (tmp534) {
/* tmp532 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp524, tmp526, arg4) ;
} else {
/* tmp532 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_tyleq_solve_err (arg0, tmp526, tmp524, arg4) ;
} /* end of [if] */
} /* end of [if] */
arg0 = arg0 ;
arg1 = tmp529 ;
arg2 = tmp525 ;
arg3 = tmp527 ;
arg4 = arg4 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_argsrtlst_err ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return /* (tmp523) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_tyleq_solve_argsrtlst_err] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 39292(line=1968, offs=1) -- 39671(line=1985, offs=45)
*/
ATSstaticdec()
ats_void_type
auxsolve_49 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp538) ;
ATSlocal (ats_ptr_type, tmp539) ;
ATSlocal (ats_ptr_type, tmp540) ;
ATSlocal (ats_ptr_type, tmp541) ;
ATSlocal (ats_ptr_type, tmp542) ;
ATSlocal (ats_ptr_type, tmp543) ;
ATSlocal (ats_ptr_type, tmp544) ;
// ATSlocal_void (tmp545) ;

__ats_lab_auxsolve_49:
tmp539 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg1), atslab_s2exp_node) ;
tmp540 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg2), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_142 */
__ats_lab_142_0:
if (((ats_sum_ptr_type)tmp539)->tag != 17) { goto __ats_lab_143_0 ; }
__ats_lab_142_1:
if (((ats_sum_ptr_type)tmp540)->tag != 17) { goto __ats_lab_143_1 ; }
__ats_lab_142_2:
tmp541 = ats_caselptrlab_mac(anairiats_sum_10, tmp539, atslab_0) ;
tmp542 = ats_caselptrlab_mac(anairiats_sum_10, tmp539, atslab_1) ;
tmp543 = ats_caselptrlab_mac(anairiats_sum_10, tmp540, atslab_0) ;
tmp544 = ats_caselptrlab_mac(anairiats_sum_10, tmp540, atslab_1) ;
/* tmp545 = */ auxsolve_49 (arg0, tmp541, tmp543) ;
/* tmp538 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve (arg0, tmp542, tmp544) ;
break ;

/* branch: __ats_lab_143 */
__ats_lab_143_0:
__ats_lab_143_1:
__ats_lab_143_2:
break ;
} while (0) ;
return /* (tmp538) */ ;
} /* end of [auxsolve_49] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 39700(line=1989, offs=1) -- 39999(line=2007, offs=2)
*/
ATSstaticdec()
ats_bool_type
auxcheck_50 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_bool_type, tmp546) ;
ATSlocal (ats_ptr_type, tmp547) ;
ATSlocal (ats_ptr_type, tmp548) ;
ATSlocal (ats_ptr_type, tmp549) ;
ATSlocal (ats_ptr_type, tmp550) ;
ATSlocal (ats_ptr_type, tmp551) ;
ATSlocal (ats_ptr_type, tmp552) ;

__ats_lab_auxcheck_50:
tmp547 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg0), atslab_s2exp_node) ;
tmp548 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, arg1), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_144 */
__ats_lab_144_0:
if (((ats_sum_ptr_type)tmp547)->tag != 4) { goto __ats_lab_145_0 ; }
__ats_lab_144_1:
if (((ats_sum_ptr_type)tmp548)->tag != 4) { goto __ats_lab_146_1 ; }
__ats_lab_144_2:
tmp549 = ats_caselptrlab_mac(anairiats_sum_9, tmp547, atslab_0) ;
tmp550 = ats_caselptrlab_mac(anairiats_sum_9, tmp548, atslab_0) ;
tmp546 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2cst_s2cst (tmp549, tmp550) ;
break ;

/* branch: __ats_lab_145 */
__ats_lab_145_0:
if (((ats_sum_ptr_type)tmp547)->tag != 17) { goto __ats_lab_146_0 ; }
__ats_lab_145_1:
if (((ats_sum_ptr_type)tmp548)->tag != 17) { goto __ats_lab_146_1 ; }
__ats_lab_145_2:
tmp551 = ats_caselptrlab_mac(anairiats_sum_10, tmp547, atslab_0) ;
tmp552 = ats_caselptrlab_mac(anairiats_sum_10, tmp548, atslab_0) ;
arg0 = tmp551 ;
arg1 = tmp552 ;
goto __ats_lab_auxcheck_50 ; // tail call
break ;

/* branch: __ats_lab_146 */
__ats_lab_146_0:
__ats_lab_146_1:
__ats_lab_146_2:
tmp546 = ats_false_bool ;
break ;
} while (0) ;
return (tmp546) ;
} /* end of [auxcheck_50] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 38987(line=1951, offs=1) -- 40227(line=2024, offs=4)
*/
ATSstaticdec()
ats_void_type
s2hnf_hypequal_solve_abscon_48 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp535) ;
ATSlocal (ats_ptr_type, tmp536) ;
ATSlocal (ats_ptr_type, tmp537) ;
ATSlocal (ats_bool_type, tmp553) ;
ATSlocal (ats_ptr_type, tmp554) ;

__ats_lab_s2hnf_hypequal_solve_abscon_48:
tmp536 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp537 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp553 = auxcheck_50 (tmp536, tmp537) ;
if (tmp553) {
/* tmp535 = */ auxsolve_49 (arg0, tmp536, tmp537) ;
} else {
tmp554 = _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2exp_bool (ats_false_bool) ;
/* tmp535 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_prop (arg0, tmp554) ;
} /* end of [if] */
return /* (tmp535) */ ;
} /* end of [s2hnf_hypequal_solve_abscon_48] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 40323(line=2030, offs=3) -- 42042(line=2104, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_hypequal_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp555) ;
ATSlocal (ats_ptr_type, tmp556) ;
ATSlocal (ats_ptr_type, tmp557) ;
ATSlocal (ats_ptr_type, tmp558) ;
ATSlocal (ats_ptr_type, tmp559) ;
ATSlocal (ats_bool_type, tmp560) ;
ATSlocal (ats_bool_type, tmp561) ;
ATSlocal (ats_bool_type, tmp562) ;
ATSlocal (ats_ptr_type, tmp563) ;
ATSlocal (ats_ptr_type, tmp564) ;
ATSlocal (ats_bool_type, tmp565) ;
ATSlocal (ats_ptr_type, tmp566) ;
ATSlocal (ats_ptr_type, tmp567) ;
ATSlocal (ats_int_type, tmp568) ;
ATSlocal (ats_bool_type, tmp569) ;
ATSlocal (ats_bool_type, tmp570) ;
ATSlocal (ats_ptr_type, tmp571) ;
ATSlocal (ats_bool_type, tmp572) ;
ATSlocal (ats_ptr_type, tmp573) ;
ATSlocal (ats_bool_type, tmp574) ;
ATSlocal (ats_ptr_type, tmp575) ;
ATSlocal (ats_ptr_type, tmp576) ;
ATSlocal (ats_ptr_type, tmp577) ;
ATSlocal (ats_ptr_type, tmp578) ;
// ATSlocal_void (tmp579) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_hypequal_solve:
tmp556 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp557 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg2) ;
tmp558 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp556), atslab_s2exp_node) ;
tmp559 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_6, tmp557), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_147 */
__ats_lab_147_0:
__ats_lab_147_1:
__ats_lab_147_2:
tmp561 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_is_abscon (arg1) ;
tmp562 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_is_abscon (arg2) ;
tmp560 = atspre_mul_bool_bool (tmp561, tmp562) ;
if (!tmp560) { goto __ats_lab_148_0 ; }
/* tmp555 = */ s2hnf_hypequal_solve_abscon_48 (arg0, arg1, arg2) ;
break ;

/* branch: __ats_lab_148 */
__ats_lab_148_0:
if (((ats_sum_ptr_type)tmp558)->tag != 4) { goto __ats_lab_149_0 ; }
__ats_lab_148_1:
if (((ats_sum_ptr_type)tmp559)->tag != 4) { goto __ats_lab_154_1 ; }
__ats_lab_148_2:
tmp563 = ats_caselptrlab_mac(anairiats_sum_9, tmp558, atslab_0) ;
tmp564 = ats_caselptrlab_mac(anairiats_sum_9, tmp559, atslab_0) ;
tmp565 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2cst_s2cst (tmp563, tmp564) ;
if (!tmp565) { goto __ats_lab_156_2 ; }
break ;

/* branch: __ats_lab_149 */
__ats_lab_149_0:
if (((ats_sum_ptr_type)tmp558)->tag != 7) { goto __ats_lab_153_0 ; }
__ats_lab_149_1:
if (((ats_sum_ptr_type)tmp559)->tag != 7) { goto __ats_lab_153_1 ; }
__ats_lab_149_2:
tmp566 = ats_caselptrlab_mac(anairiats_sum_9, tmp558, atslab_0) ;
tmp567 = ats_caselptrlab_mac(anairiats_sum_9, tmp559, atslab_0) ;
tmp568 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__compare_s2var_s2var (tmp566, tmp567) ;
do {
/* branch: __ats_lab_150 */
__ats_lab_150_0:
__ats_lab_150_1:
tmp569 = atspre_igt (tmp568, 0) ;
if (!tmp569) { goto __ats_lab_151_1 ; }
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_bind (arg0, tmp566, arg2) ;
break ;

/* branch: __ats_lab_151 */
__ats_lab_151_0:
__ats_lab_151_1:
tmp570 = atspre_ilt (tmp568, 0) ;
if (!tmp570) { goto __ats_lab_152_1 ; }
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_bind (arg0, tmp567, arg1) ;
break ;

/* branch: __ats_lab_152 */
__ats_lab_152_0:
__ats_lab_152_1:
break ;
} while (0) ;
break ;

/* branch: __ats_lab_153 */
__ats_lab_153_0:
if (((ats_sum_ptr_type)tmp558)->tag != 7) { goto __ats_lab_154_0 ; }
__ats_lab_153_1:
__ats_lab_153_2:
tmp571 = ats_caselptrlab_mac(anairiats_sum_9, tmp558, atslab_0) ;
tmp572 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2var_occurcheck_s2exp (tmp571, tmp557) ;
if (tmp572) {
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_eqeq (arg0, arg1, arg2) ;
} else {
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_bind (arg0, tmp571, arg2) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_154 */
__ats_lab_154_0:
__ats_lab_154_1:
if (((ats_sum_ptr_type)tmp559)->tag != 7) { goto __ats_lab_155_0 ; }
__ats_lab_154_2:
tmp573 = ats_caselptrlab_mac(anairiats_sum_9, tmp559, atslab_0) ;
tmp574 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2var_occurcheck_s2exp (tmp573, tmp556) ;
if (tmp574) {
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_eqeq (arg0, arg1, arg2) ;
} else {
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_bind (arg0, tmp573, arg1) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_155 */
__ats_lab_155_0:
if (((ats_sum_ptr_type)tmp558)->tag != 19) { goto __ats_lab_156_0 ; }
__ats_lab_155_1:
if (((ats_sum_ptr_type)tmp559)->tag != 19) { goto __ats_lab_156_1 ; }
__ats_lab_155_2:
tmp575 = ats_caselptrlab_mac(anairiats_sum_16, tmp558, atslab_4) ;
tmp576 = ats_caselptrlab_mac(anairiats_sum_16, tmp558, atslab_5) ;
tmp577 = ats_caselptrlab_mac(anairiats_sum_16, tmp559, atslab_4) ;
tmp578 = ats_caselptrlab_mac(anairiats_sum_16, tmp559, atslab_5) ;
/* tmp579 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve (arg0, tmp576, tmp578) ;
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve (arg0, tmp577, tmp575) ;
break ;

/* branch: __ats_lab_156 */
__ats_lab_156_0:
__ats_lab_156_1:
__ats_lab_156_2:
/* tmp555 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_eqeq (arg0, arg1, arg2) ;
break ;
} while (0) ;
return /* (tmp555) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_hypequal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 42131(line=2110, offs=3) -- 42269(line=2115, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp580) ;
ATSlocal (ats_ptr_type, tmp581) ;
ATSlocal (ats_ptr_type, tmp582) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve:
tmp581 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (arg1) ;
tmp582 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (arg2) ;
/* tmp580 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2hnf_hypequal_solve (arg0, tmp581, tmp582) ;
return /* (tmp580) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve] */

/*
// /tmp/ATS-Postiats/src/pats_staexp2_solve.dats: 42340(line=2119, offs=3) -- 43053(line=2155, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp583) ;
ATSlocal (ats_ptr_type, tmp584) ;
ATSlocal (ats_ptr_type, tmp585) ;
ATSlocal (ats_ptr_type, tmp586) ;
ATSlocal (ats_ptr_type, tmp587) ;
ATSlocal (ats_ptr_type, tmp588) ;
ATSlocal (ats_ptr_type, tmp589) ;
// ATSlocal_void (tmp590) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve:
do {
/* branch: __ats_lab_157 */
__ats_lab_157_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_160_0 ; }
__ats_lab_157_1:
do {
/* branch: __ats_lab_158 */
__ats_lab_158_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_159_0 ; }
__ats_lab_158_1:
break ;

/* branch: __ats_lab_159 */
__ats_lab_159_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_159_1:
tmp584 = _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2exp_bool (ats_false_bool) ;
/* tmp583 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_prop (arg0, tmp584) ;
break ;
} while (0) ;
break ;

/* branch: __ats_lab_160 */
__ats_lab_160_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_160_1:
tmp585 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_0) ;
tmp586 = ats_caselptrlab_mac(anairiats_sum_12, arg1, atslab_1) ;
do {
/* branch: __ats_lab_161 */
__ats_lab_161_0:
if (arg2 != (ats_sum_ptr_type)0) { goto __ats_lab_162_0 ; }
__ats_lab_161_1:
tmp587 = _2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__s2exp_bool (ats_false_bool) ;
/* tmp583 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_prop (arg0, tmp587) ;
break ;

/* branch: __ats_lab_162 */
__ats_lab_162_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_162_1:
tmp588 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_0) ;
tmp589 = ats_caselptrlab_mac(anairiats_sum_12, arg2, atslab_1) ;
/* tmp590 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve (arg0, tmp585, tmp588) ;
arg0 = arg0 ;
arg1 = tmp586 ;
arg2 = tmp589 ;
goto __ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve ; // tail call
break ;
} while (0) ;
break ;
} while (0) ;
return /* (tmp583) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2explst_hypequal_solve] */

/* 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_basics_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_stamp_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_effect_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_stacst2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__staload (void) ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_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_basics_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_label_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_stamp_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_effect_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_stacst2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__staload () ;

return ;
} /* staload function */

/* dynamic load function */

// dynload flag declaration
extern ats_int_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_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_staexp2_solve_dats.c] */
