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

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

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

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_location.cats"

#include "pats_lexbuf.cats"

#include "pats_location.cats"

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

typedef
struct {
ats_ptr_type atslab_p2at_loc ;
ats_ptr_type atslab_p2at_svs ;
ats_ptr_type atslab_p2at_dvs ;
ats_ptr_type atslab_p2at_type ;
ats_ptr_type atslab_p2at_node ;
} anairiats_rec_1 ;

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

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

typedef struct {
anairiats_rec_3 atslab_0 ;
ats_ptr_type atslab_1 ;
} anairiats_sum_4 ;

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

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

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

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

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

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_10 ;

typedef
struct {
ats_ptr_type atslab_p3at_loc ;
ats_ptr_type atslab_p3at_node ;
ats_ptr_type atslab_p3at_type ;
ats_ptr_type atslab_p3at_dvaropt ;
ats_ptr_type atslab_p3at_type_left ;
} anairiats_rec_11 ;

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

/* external typedefs */
/* external dynamic constructor declarations */
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_cons_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_nil_1) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__None_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__Some_1) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_vt_cons_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_vt_nil_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Ecst_4) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Edatcontyp_10) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__S2Efun_19) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__D2VFINsome_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__PCKcon_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__PCKlincon_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__PCKfree_2) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__PCKunfold_3) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__P2Tcon_2) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__P3Tany_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__P3Tvar_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__P3Trefas_14) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_p2at_trdn_11) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_p2at_trup_con_14) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_p2at_trdn_con_arity_15) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__T3E_p2at_free_update_16) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__PATCONTRUP_0) ;

/* external dynamic constant declarations */
ATSextern_fun(ats_void_type, atspre_vbox_make_view_ptr) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_prerr_newline) () ;
ATSextern_fun(ats_bool_type, atspre_lt_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_lte_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_gt_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_eq_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_neq_int_int) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_isucc) (ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_iadd) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_isub) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_int_type, atspre_idiv) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_ilt) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_igt) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_igte) (ats_int_type, ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_size1_of_int1) (ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_add_size1_int1) (ats_size_type, ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_sub_size1_int1) (ats_size_type, ats_int_type) ;
ATSextern_fun(ats_size_type, atspre_mul2_size1_size1) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_bool_type, atspre_lt_size1_size1) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_bool_type, atspre_gt_size1_int1) (ats_size_type, ats_int_type) ;
ATSextern_fun(ats_bool_type, atspre_neq_size1_size1) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_ptr_type, atspre_ptr_alloc_tsz) (ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_ptr_zero_tsz) (ats_ref_type, ats_size_type) ;
ATSextern_fun(ats_ptr_type, atspre_ref_make_elt_tsz) (ats_ref_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_prerr_string) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_prerrf_exn) (ats_ptr_type, ...) ;
ATSextern_fun(ats_ptr_type, ListSubscriptException_make) () ;
ATSextern_fun(ats_ptr_type, atspre_array_ptr_alloc_tsz) (ats_size_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_free) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_initialize_funenv_tsz) (ats_ref_type, ats_size_type, ats_ptr_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_initialize_cloenv_tsz) (ats_ref_type, ats_size_type, ats_ref_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, atspre_array_ptr_split_tsz) (ats_ptr_type, ats_size_type, ats_size_type) ;
ATSextern_fun(ats_ptr_type, atspre_array_ptr_takeout_tsz) (ats_ptr_type, ats_size_type, ats_size_type) ;
ATSextern_fun(anairiats_rec_0, atspre_array_ptr_takeout2_tsz) (ats_ptr_type, ats_size_type, ats_size_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_foreach_funenv_tsz) (ats_ref_type, ats_ptr_type, ats_size_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, atspre_array_ptr_iforeach_funenv_tsz) (ats_ref_type, ats_ptr_type, ats_size_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, atspre_array2_ptr_takeout_tsz) (ats_ptr_type, ats_size_type, ats_size_type, ats_size_type) ;
ATSextern_fun(ats_void_type, atslib_qsort) (ats_ref_type, ats_size_type, ats_size_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, patsopt_prerrf_ifdebug) (ats_ptr_type, ...) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__prerr_location) (ats_ptr_type) ;
ATSextern_val(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_addr) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2cst_s2cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_make_srt) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__prerr_d2con) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_scst) (ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_vwtp) (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_var) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_datconptr) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_t0ype_err) () ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__pprerr_s2exp) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_get_head) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_topize_1) (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__s2hnf2exp) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__prerr_the_staerrlst) () ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_make_any) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_addr) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_finknd) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_type) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_mastype) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_is_linear) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__eq_pckind_pckind) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_con) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_int_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_errpat) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, patsopt_p3at_set_dvaropt) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_get_type_left) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, patsopt_p3at_set_type_left) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve) (ats_ptr_type, ats_int_type, ats_int_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_trans3_2esats__the_trans3errlst_add) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__p2atlst_trdn) (ats_ptr_type, ats_ptr_type, ats_ptr_type, ats_ref_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_svar) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_svarlst) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_proplst) (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_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__d2var_mutablize_none) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p2at_trup_con) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_lincon_update) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_free_update) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_unfold_update) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;

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

/* assuming abstract types */
/* sum constructor declarations */
ATSglobal(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__PATCONTRUP_0) ;

/* exn constructor declarations */
/* global dynamic (non-functional) constant declarations */
/* internal function declarations */
static
ats_void_type prerr_FILENAME_02083_ () ;
static
ats_void_type loop_2 (ats_ptr_type arg0) ;
static
ats_void_type loop_3 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type prerr_error3_loc_02089_ (ats_ptr_type arg0) ;
static
ats_ptr_type aux_5 (ats_ptr_type arg0) ;
static
ats_void_type auxvar_6 (ats_ptr_type arg0) ;
static
ats_void_type auxpat_7 (ats_ptr_type arg0) ;
static
ats_void_type loop_11 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_void_type list_app_funenv_01300_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_void_type list_app_fun_01301_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type auxck_12 (ats_ptr_type arg0) ;
static
ats_ptr_type auxpat1_14 (ats_ptr_type arg0) ;
static
ats_ptr_type auxpat2_15 (ats_ptr_type arg0) ;
static
ats_ptr_type s2dcp_make_16 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type loop_20 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) ;
static
ats_ptr_type list_map_funenv_01412_ats_ptr_type_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) ;
static
ats_ptr_type list_map_fun_01413_ats_ptr_type_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type auxerr_arity_21 (ats_ptr_type arg0, ats_int_type arg1) ;

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

/* function implementations */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 1671(line=52, offs=28) -- 1702(line=52, offs=59)
*/
ATSstaticdec()
ats_void_type
prerr_FILENAME_02083_ () {
/* local vardec */
// ATSlocal_void (tmp0) ;

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

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 2602(line=105, offs=7) -- 2825(line=112, offs=24)
*/
ATSstaticdec()
ats_void_type
loop_2 (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp9) ;
ATSlocal (anairiats_rec_3, tmp10) ;
ATSlocal (ats_ptr_type, tmp11) ;
// ATSlocal_void (tmp12) ;
ATSlocal (ats_ptr_type, tmp13) ;

__ats_lab_loop_2:
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_1_0 ; }
__ats_lab_0_1:
tmp10 = ats_caselptrlab_mac(anairiats_sum_4, arg0, atslab_0) ;
tmp11 = ats_caselptrlab_mac(anairiats_sum_4, arg0, atslab_1) ;
tmp13 = ats_select_mac(tmp10, atslab_s2qua_svs) ;
/* tmp12 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_svarlst (tmp13) ;
arg0 = tmp11 ;
goto __ats_lab_loop_2 ; // tail call
break ;

/* branch: __ats_lab_1 */
__ats_lab_1_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_1_1:
break ;
} while (0) ;
return /* (tmp9) */ ;
} /* end of [loop_2] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 2904(line=119, offs=7) -- 3160(line=127, offs=24)
*/
ATSstaticdec()
ats_void_type
loop_3 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp15) ;
ATSlocal (anairiats_rec_3, tmp16) ;
ATSlocal (ats_ptr_type, tmp17) ;
// ATSlocal_void (tmp18) ;
ATSlocal (ats_ptr_type, tmp19) ;

__ats_lab_loop_3:
do {
/* branch: __ats_lab_2 */
__ats_lab_2_0:
if (arg1 == (ats_sum_ptr_type)0) { goto __ats_lab_3_0 ; }
__ats_lab_2_1:
tmp16 = ats_caselptrlab_mac(anairiats_sum_4, arg1, atslab_0) ;
tmp17 = ats_caselptrlab_mac(anairiats_sum_4, arg1, atslab_1) ;
tmp19 = ats_select_mac(tmp16, atslab_s2qua_sps) ;
/* tmp18 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_hypadd_proplst (arg0, tmp19) ;
arg0 = arg0 ;
arg1 = tmp17 ;
goto __ats_lab_loop_3 ; // tail call
break ;

/* branch: __ats_lab_3 */
__ats_lab_3_0:
// if (arg1 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_3_1:
break ;
} while (0) ;
return /* (tmp15) */ ;
} /* end of [loop_3] */

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

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

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 4203(line=161, offs=11) -- 4453(line=168, offs=37)
*/
ATSstaticdec()
ats_ptr_type
aux_5 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp44) ;
ATSlocal (ats_ptr_type, tmp45) ;
ATSlocal (ats_ptr_type, tmp46) ;
ATSlocal (ats_ptr_type, tmp47) ;

__ats_lab_aux_5:
do {
/* branch: __ats_lab_6 */
__ats_lab_6_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_7_0 ; }
__ats_lab_6_1:
tmp45 = ats_caselptrlab_mac(anairiats_sum_9, arg0, atslab_1) ;
tmp46 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_t0ype_err () ;
tmp47 = aux_5 (tmp45) ;
tmp44 = ATS_MALLOC(sizeof(anairiats_sum_9)) ;
ats_selptrset_mac(anairiats_sum_9, tmp44, atslab_0, tmp46) ;
ats_selptrset_mac(anairiats_sum_9, tmp44, atslab_1, tmp47) ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_7_1:
tmp44 = (ats_sum_ptr_type)0 ;
break ;
} while (0) ;
return (tmp44) ;
} /* end of [aux_5] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 2461(line=97, offs=3) -- 4611(line=176, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p2at_trup_con (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp1) ;
ATSlocal (ats_ptr_type, tmp2) ;
ATSlocal (ats_ptr_type, tmp3) ;
ATSlocal (ats_ptr_type, tmp4) ;
ATSlocal (ats_ptr_type, tmp5) ;
ATSlocal (ats_ptr_type, tmp6) ;
ATSlocal (ats_int_type, tmp7) ;
ATSlocal (ats_ptr_type, tmp8) ;
// ATSlocal_void (tmp14) ;
// ATSlocal_void (tmp20) ;
ATSlocal (ats_ptr_type, tmp21) ;
ATSlocal (ats_int_type, tmp22) ;
ATSlocal (ats_ptr_type, tmp23) ;
ATSlocal (ats_ptr_type, tmp24) ;
ATSlocal (ats_int_type, tmp25) ;
// ATSlocal_void (tmp26) ;
ATSlocal (ats_bool_type, tmp27) ;
// ATSlocal_void (tmp28) ;
// ATSlocal_void (tmp31) ;
// ATSlocal_void (tmp32) ;
// ATSlocal_void (tmp33) ;
// ATSlocal_void (tmp34) ;
// ATSlocal_void (tmp35) ;
// ATSlocal_void (tmp36) ;
ATSlocal (ats_ptr_type, tmp37) ;
// ATSlocal_void (tmp38) ;
// ATSlocal_void (tmp39) ;
// ATSlocal_void (tmp40) ;
// ATSlocal_void (tmp41) ;
// ATSlocal_void (tmp42) ;
ATSlocal (ats_ptr_type, tmp43) ;
ATSlocal (ats_ptr_type, tmp48) ;
ATSlocal (ats_ptr_type, tmp49) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p2at_trup_con:
tmp2 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg0), atslab_p2at_loc) ;
tmp3 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg0), atslab_p2at_node) ;
if (((ats_sum_ptr_type)tmp3)->tag != 2) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 2506(line=100, offs=5) -- 2579(line=102, offs=19)") ; }
tmp4 = ats_caselptrlab_mac(anairiats_sum_2, tmp3, atslab_1) ;
tmp5 = ats_caselptrlab_mac(anairiats_sum_2, tmp3, atslab_2) ;
tmp6 = ats_caselptrlab_mac(anairiats_sum_2, tmp3, atslab_3) ;
tmp7 = ats_caselptrlab_mac(anairiats_sum_2, tmp3, atslab_4) ;
tmp8 = ats_caselptrlab_mac(anairiats_sum_2, tmp3, atslab_5) ;
/* tmp14 = */ loop_2 (tmp5) ;
/* tmp20 = */ loop_3 (tmp2, tmp5) ;
tmp21 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, tmp6), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (((ats_sum_ptr_type)tmp21)->tag != 19) { goto __ats_lab_5_0 ; }
__ats_lab_4_1:
tmp22 = ats_caselptrlab_mac(anairiats_sum_6, tmp21, atslab_3) ;
tmp23 = ats_caselptrlab_mac(anairiats_sum_6, tmp21, atslab_4) ;
tmp24 = ats_caselptrlab_mac(anairiats_sum_6, tmp21, atslab_5) ;
tmp25 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__pfarity_equal_solve (tmp2, tmp7, tmp22) ;
tmp27 = atspre_gt_int_int (tmp25, 0) ;
if (tmp27) {
/* tmp28 = */ prerr_error3_loc_02089_ (tmp2) ;
/* tmp31 = */ patsopt_prerrf_ifdebug (ATSstrcst(": [%s]: %s"), ATSstrcst("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats"), ATSstrcst("p2at_trup_con")) ;
/* tmp32 = */ atspre_prerr_string (ATSstrcst(": proof arity mismatch: the constructor [")) ;
/* tmp33 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__prerr_d2con (tmp4) ;
/* tmp34 = */ atspre_prerrf_exn (ATSstrcst("] requires [%i] arguments."), tmp22) ;
/* tmp35 = */ atspre_prerr_newline () ;
/* tmp36 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__prerr_the_staerrlst () ;
tmp37 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp37)->tag = 14 ;
ats_selptrset_mac(anairiats_sum_7, tmp37, atslab_0, arg0) ;
/* tmp26 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp37) ;
} else {
/* empty */
} /* end of [if] */
tmp1 = ATS_MALLOC(sizeof(anairiats_sum_8)) ;
ats_selptrset_mac(anairiats_sum_8, tmp1, atslab_0, tmp8) ;
ats_selptrset_mac(anairiats_sum_8, tmp1, atslab_1, tmp23) ;
ats_selptrset_mac(anairiats_sum_8, tmp1, atslab_2, tmp24) ;
break ;

/* branch: __ats_lab_5 */
__ats_lab_5_0:
__ats_lab_5_1:
/* tmp38 = */ prerr_error3_loc_02089_ (tmp2) ;
/* tmp39 = */ patsopt_prerrf_ifdebug (ATSstrcst(": [%s]: %s"), ATSstrcst("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats"), ATSstrcst("p2at_trup_con")) ;
/* tmp40 = */ atspre_prerr_string (ATSstrcst(": the constructor pattern is ill-typed.")) ;
/* tmp41 = */ atspre_prerr_newline () ;
tmp43 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp43)->tag = 14 ;
ats_selptrset_mac(anairiats_sum_7, tmp43, atslab_0, arg0) ;
/* tmp42 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp43) ;
tmp48 = aux_5 (tmp8) ;
tmp49 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_t0ype_err () ;
tmp1 = ATS_MALLOC(sizeof(anairiats_sum_8)) ;
ats_selptrset_mac(anairiats_sum_8, tmp1, atslab_0, tmp8) ;
ats_selptrset_mac(anairiats_sum_8, tmp1, atslab_1, tmp48) ;
ats_selptrset_mac(anairiats_sum_8, tmp1, atslab_2, tmp49) ;
break ;
} while (0) ;
return (tmp1) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p2at_trup_con] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 4809(line=190, offs=5) -- 5043(line=205, offs=4)
*/
ATSstaticdec()
ats_void_type
auxvar_6 (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp50) ;
ATSlocal (ats_bool_type, tmp51) ;
ATSlocal (ats_ptr_type, tmp52) ;
ATSlocal (ats_ptr_type, tmp53) ;
ATSlocal (ats_ptr_type, tmp54) ;

__ats_lab_auxvar_6:
tmp51 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_is_linear (arg0) ;
if (tmp51) {
tmp52 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_mastype (arg0) ;
if (tmp52 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 4913(line=198, offs=7) -- 4953(line=199, offs=36)") ; }
tmp53 = ats_caselptrlab_mac(anairiats_sum_10, tmp52, atslab_0) ;
tmp54 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp54)->tag = 1 ;
ats_selptrset_mac(anairiats_sum_7, tmp54, atslab_0, tmp53) ;
/* tmp50 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_finknd (arg0, tmp54) ;
} else {
/* empty */
} /* end of [if] */
return /* (tmp50) */ ;
} /* end of [auxvar_6] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 5068(line=207, offs=5) -- 5210(line=215, offs=4)
*/
ATSstaticdec()
ats_void_type
auxpat_7 (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp55) ;
ATSlocal (ats_ptr_type, tmp56) ;
ATSlocal (ats_ptr_type, tmp57) ;
ATSlocal (ats_ptr_type, tmp58) ;

__ats_lab_auxpat_7:
tmp56 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_node) ;
do {
/* branch: __ats_lab_8 */
__ats_lab_8_0:
if (((ats_sum_ptr_type)tmp56)->tag != 1) { goto __ats_lab_9_0 ; }
__ats_lab_8_1:
tmp57 = ats_caselptrlab_mac(anairiats_sum_7, tmp56, atslab_0) ;
/* tmp55 = */ auxvar_6 (tmp57) ;
break ;

/* branch: __ats_lab_9 */
__ats_lab_9_0:
if (((ats_sum_ptr_type)tmp56)->tag != 14) { goto __ats_lab_10_0 ; }
__ats_lab_9_1:
tmp58 = ats_caselptrlab_mac(anairiats_sum_12, tmp56, atslab_0) ;
/* tmp55 = */ auxvar_6 (tmp58) ;
break ;

/* branch: __ats_lab_10 */
__ats_lab_10_0:
__ats_lab_10_1:
break ;
} while (0) ;
return /* (tmp55) */ ;
} /* end of [auxpat_7] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 2457(line=87, offs=7) -- 2708(line=97, offs=6)
*/
ATSstaticdec()
ats_void_type
loop_11 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp63) ;
ATSlocal (ats_ptr_type, tmp64) ;
ATSlocal (ats_ptr_type, tmp65) ;
// ATSlocal_void (tmp66) ;

__ats_lab_loop_11:
do {
/* branch: __ats_lab_11 */
__ats_lab_11_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_12_0 ; }
__ats_lab_11_1:
tmp64 = ats_caselptrlab_mac(anairiats_sum_9, arg0, atslab_0) ;
tmp65 = ats_caselptrlab_mac(anairiats_sum_9, arg0, atslab_1) ;
/* tmp66 = */ ((ats_void_type(*)(ats_ptr_type, ats_ptr_type))arg1) (tmp64, arg2) ;
arg0 = tmp65 ;
arg1 = arg1 ;
arg2 = arg2 ;
goto __ats_lab_loop_11 ; // tail call
break ;

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

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 2381(line=85, offs=20) -- 2757(line=100, offs=4)
*/
ATSstaticdec()
ats_void_type
list_app_funenv_01300_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp62) ;

__ats_lab_list_app_funenv_01300_ats_ptr_type:
/* tmp62 = */ loop_11 (arg0, arg1, arg2) ;
return /* (tmp62) */ ;
} /* end of [list_app_funenv_01300_ats_ptr_type] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 2821(line=103, offs=22) -- 3078(line=112, offs=4)
*/
ATSstaticdec()
ats_void_type
list_app_fun_01301_ats_ptr_type (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp61) ;

__ats_lab_list_app_fun_01301_ats_ptr_type:
/* tmp61 = */ list_app_funenv_01300_ats_ptr_type (arg0, ats_castfn_mac(ats_ptr_type, arg1), atspre_null_ptr) ;
return /* (tmp61) */ ;
} /* end of [list_app_fun_01301_ats_ptr_type] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 5284(line=220, offs=20) -- 5422(line=226, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_lincon_update (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp59) ;
// ATSlocal_void (tmp60) ;
ATSlocal (ats_ptr_type, tmp67) ;
ATSlocal (ats_ptr_type, tmp68) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_lincon_update:
/* tmp60 = */ list_app_fun_01301_ats_ptr_type (arg2, &auxpat_7) ;
tmp68 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_type) ;
tmp67 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
ats_selptrset_mac(anairiats_sum_10, tmp67, atslab_0, tmp68) ;
/* tmp59 = */ patsopt_p3at_set_type_left (arg0, tmp67) ;
return /* (tmp59) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_lincon_update] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 5623(line=239, offs=5) -- 6133(line=258, offs=4)
*/
ATSstaticdec()
ats_void_type
auxck_12 (ats_ptr_type arg0) {
/* local vardec */
// ATSlocal_void (tmp69) ;
ATSlocal (ats_ptr_type, tmp70) ;
ATSlocal (ats_ptr_type, tmp71) ;
ATSlocal (ats_ptr_type, tmp72) ;
// ATSlocal_void (tmp73) ;
// ATSlocal_void (tmp74) ;
// ATSlocal_void (tmp75) ;
// ATSlocal_void (tmp76) ;
// ATSlocal_void (tmp77) ;
// ATSlocal_void (tmp78) ;
ATSlocal (ats_ptr_type, tmp79) ;

__ats_lab_auxck_12:
tmp70 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_loc) ;
tmp71 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_get_type_left (arg0) ;
do {
/* branch: __ats_lab_13 */
__ats_lab_13_0:
if (tmp71 == (ats_sum_ptr_type)0) { goto __ats_lab_14_0 ; }
__ats_lab_13_1:
tmp72 = ats_caselptrlab_mac(anairiats_sum_10, tmp71, atslab_0) ;
/* tmp73 = */ prerr_error3_loc_02089_ (tmp70) ;
/* tmp74 = */ atspre_prerr_string (ATSstrcst(": a value matching this pattern may not be freed")) ;
/* tmp75 = */ atspre_prerr_string (ATSstrcst(": it contains a linear component of the following type [")) ;
/* tmp76 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__pprerr_s2exp (tmp72) ;
/* tmp77 = */ atspre_prerr_string (ATSstrcst("].")) ;
/* tmp78 = */ atspre_prerr_newline () ;
tmp79 = ATS_MALLOC(sizeof(anairiats_sum_7)) ;
((ats_sum_ptr_type)tmp79)->tag = 16 ;
ats_selptrset_mac(anairiats_sum_7, tmp79, atslab_0, arg0) ;
/* tmp69 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp79) ;
break ;

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

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 6206(line=264, offs=3) -- 6268(line=265, offs=39)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_free_update (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp80) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_free_update:
/* tmp80 = */ list_app_fun_01301_ats_ptr_type (arg2, &auxck_12) ;
return /* (tmp80) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_free_update] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 6471(line=279, offs=5) -- 7526(line=326, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxpat1_14 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp81) ;
ATSlocal (ats_ptr_type, tmp82) ;
ATSlocal (ats_ptr_type, tmp83) ;
ATSlocal (ats_ptr_type, tmp84) ;
ATSlocal (ats_ptr_type, tmp85) ;
ATSlocal (ats_ptr_type, tmp86) ;
ATSlocal (ats_ptr_type, tmp87) ;
// ATSlocal_void (tmp88) ;
ATSlocal (ats_ptr_type, tmp89) ;
ATSlocal (ats_ptr_type, tmp90) ;
ATSlocal (ats_ptr_type, tmp91) ;
// ATSlocal_void (tmp92) ;
ATSlocal (ats_ptr_type, tmp93) ;
ATSlocal (ats_ptr_type, tmp94) ;
// ATSlocal_void (tmp95) ;
ATSlocal (ats_ptr_type, tmp96) ;
ATSlocal (ats_ptr_type, tmp97) ;
ATSlocal (ats_ptr_type, tmp98) ;
ATSlocal (ats_ptr_type, tmp99) ;
ATSlocal (ats_ptr_type, tmp100) ;
// ATSlocal_void (tmp101) ;

__ats_lab_auxpat1_14:
tmp82 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_node) ;
do {
/* branch: __ats_lab_15 */
__ats_lab_15_0:
if (((ats_sum_ptr_type)tmp82)->tag != 0) { goto __ats_lab_18_0 ; }
__ats_lab_15_1:
tmp83 = ats_caselptrlab_mac(anairiats_sum_7, tmp82, atslab_0) ;
tmp84 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_get_type_left (arg0) ;
do {
/* branch: __ats_lab_16 */
__ats_lab_16_0:
if (tmp84 == (ats_sum_ptr_type)0) { goto __ats_lab_17_0 ; }
__ats_lab_16_1:
tmp85 = tmp84 ;
break ;

/* branch: __ats_lab_17 */
__ats_lab_17_0:
// if (tmp84 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_17_1:
tmp87 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_type) ;
tmp86 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_topize_1 (tmp87) ;
tmp85 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
ats_selptrset_mac(anairiats_sum_10, tmp85, atslab_0, tmp86) ;
break ;
} while (0) ;
/* tmp88 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_type (tmp83, tmp85) ;
tmp81 = tmp83 ;
break ;

/* branch: __ats_lab_18 */
__ats_lab_18_0:
if (((ats_sum_ptr_type)tmp82)->tag != 1) { goto __ats_lab_19_0 ; }
__ats_lab_18_1:
tmp89 = ats_caselptrlab_mac(anairiats_sum_7, tmp82, atslab_0) ;
tmp81 = tmp89 ;
break ;

/* branch: __ats_lab_19 */
__ats_lab_19_0:
if (((ats_sum_ptr_type)tmp82)->tag != 14) { goto __ats_lab_22_0 ; }
__ats_lab_19_1:
tmp90 = ats_caselptrlab_mac(anairiats_sum_12, tmp82, atslab_0) ;
tmp91 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_get_type_left (arg0) ;
do {
/* branch: __ats_lab_20 */
__ats_lab_20_0:
if (tmp91 == (ats_sum_ptr_type)0) { goto __ats_lab_21_0 ; }
__ats_lab_20_1:
/* tmp92 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_type (tmp90, tmp91) ;
break ;

/* branch: __ats_lab_21 */
__ats_lab_21_0:
// if (tmp91 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_21_1:
break ;
} while (0) ;
tmp81 = tmp90 ;
break ;

/* branch: __ats_lab_22 */
__ats_lab_22_0:
__ats_lab_22_1:
tmp94 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_loc) ;
tmp93 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_make_any (tmp94) ;
tmp96 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
ats_selptrset_mac(anairiats_sum_10, tmp96, atslab_0, tmp93) ;
/* tmp95 = */ patsopt_p3at_set_dvaropt (arg0, tmp96) ;
tmp97 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_get_type_left (arg0) ;
do {
/* branch: __ats_lab_23 */
__ats_lab_23_0:
if (tmp97 == (ats_sum_ptr_type)0) { goto __ats_lab_24_0 ; }
__ats_lab_23_1:
tmp98 = tmp97 ;
break ;

/* branch: __ats_lab_24 */
__ats_lab_24_0:
// if (tmp97 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_24_1:
tmp100 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_type) ;
tmp99 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_topize_1 (tmp100) ;
tmp98 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
ats_selptrset_mac(anairiats_sum_10, tmp98, atslab_0, tmp99) ;
break ;
} while (0) ;
/* tmp101 = */ _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_set_type (tmp93, tmp98) ;
tmp81 = tmp93 ;
break ;
} while (0) ;
return (tmp81) ;
} /* end of [auxpat1_14] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 7552(line=328, offs=5) -- 7804(line=337, offs=4)
*/
ATSstaticdec()
ats_ptr_type
auxpat2_15 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp102) ;
ATSlocal (ats_ptr_type, tmp103) ;
ATSlocal (ats_ptr_type, tmp104) ;
ATSlocal (ats_ptr_type, tmp105) ;
ATSlocal (ats_ptr_type, tmp106) ;
ATSlocal (ats_ptr_type, tmp107) ;
ATSlocal (ats_ptr_type, tmp108) ;
ATSlocal (ats_ptr_type, tmp109) ;

__ats_lab_auxpat2_15:
tmp103 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_11, arg0), atslab_p3at_loc) ;
tmp104 = auxpat1_14 (arg0) ;
tmp105 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_type (tmp104) ;
if (tmp105 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 7644(line=332, offs=7) -- 7677(line=332, offs=40)") ; }
tmp106 = ats_caselptrlab_mac(anairiats_sum_10, tmp105, atslab_0) ;
tmp107 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__d2var_mutablize_none (tmp103, tmp104, tmp106) ;
tmp108 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2var_get_addr (tmp104) ;
if (tmp108 == (ats_sum_ptr_type)0) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 7758(line=334, offs=7) -- 7791(line=334, offs=40)") ; }
tmp109 = ats_caselptrlab_mac(anairiats_sum_10, tmp108, atslab_0) ;
tmp102 = tmp109 ;
return (tmp102) ;
} /* end of [auxpat2_15] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 7833(line=339, offs=5) -- 8072(line=347, offs=4)
*/
ATSstaticdec()
ats_ptr_type
s2dcp_make_16 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp110) ;
ATSlocal (ats_ptr_type, tmp111) ;
// ATSlocal_void (tmp112) ;
ATSlocal (ats_ptr_type, tmp113) ;

__ats_lab_s2dcp_make_16:
tmp111 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2var_make_srt (_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2rt_addr) ;
/* tmp112 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__trans3_env_add_svar (tmp111) ;
tmp113 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_var (tmp111) ;
tmp110 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__s2exp_datconptr (arg0, tmp113, arg1) ;
return (tmp110) ;
} /* end of [s2dcp_make_16] */

/*
// /nix/store/rfja8ixrs5wb4kj3kiwlch1apnh7qgvy-ats-0.2.12/lib/ats-anairiats-0.2.12/prelude/DATS/list.dats: 52519(line=1874, offs=5) -- 52952(line=1891, offs=4)
*/
ATSstaticdec()
ats_void_type
loop_20 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ref_type arg2, ats_ptr_type arg3) {
/* local vardec */
// ATSlocal_void (tmp118) ;
ATSlocal (ats_ptr_type, tmp119) ;
ATSlocal (ats_ptr_type, tmp120) ;
ATSlocal (ats_ptr_type, tmp121) ;
ATSlocal (ats_ptr_type, tmp122) ;
ATSlocal (ats_ptr_type, tmp123) ;
ATSlocal (ats_ptr_type, tmp124) ;

__ats_lab_loop_20:
do {
/* branch: __ats_lab_25 */
__ats_lab_25_0:
if (arg0 == (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; }
__ats_lab_25_1:
tmp119 = ats_caselptrlab_mac(anairiats_sum_9, arg0, atslab_0) ;
tmp120 = ats_caselptrlab_mac(anairiats_sum_9, arg0, atslab_1) ;
tmp121 = ((ats_ptr_type(*)(ats_ptr_type, ats_ptr_type))arg1) (tmp119, arg3) ;
tmp122 = ATS_MALLOC(sizeof(anairiats_sum_9)) ;
ats_selptrset_mac(anairiats_sum_9, tmp122, atslab_0, tmp121) ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp122 ;
// if (ats_ptrget_mac(ats_ptr_type, arg2) == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
tmp123 = &ats_caselptrlab_mac(anairiats_sum_9, ats_ptrget_mac(ats_ptr_type, arg2), atslab_1) ;
arg0 = tmp120 ;
arg1 = arg1 ;
arg2 = tmp123 ;
arg3 = arg3 ;
goto __ats_lab_loop_20 ; // tail call
break ;

/* branch: __ats_lab_26 */
__ats_lab_26_0:
// if (arg0 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_26_1:
tmp124 = (ats_sum_ptr_type)0 ;
ats_ptrget_mac(ats_ptr_type, arg2) = tmp124 ;
break ;
} while (0) ;
return /* (tmp118) */ ;
} /* end of [loop_20] */

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

__ats_lab_list_map_funenv_01412_ats_ptr_type_ats_ptr_type:
/* ats_ptr_type tmp125 ; */
/* tmp126 = */ loop_20 (arg0, arg1, (&tmp125), arg2) ;
tmp117 = tmp125 ;
return (tmp117) ;
} /* end of [list_map_funenv_01412_ats_ptr_type_ats_ptr_type] */

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

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

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 8152(line=353, offs=3) -- 8545(line=369, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_unfold_update (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp114) ;
ATSlocal (ats_ptr_type, tmp115) ;
ATSlocal (ats_ptr_type, tmp127) ;
ATSlocal (ats_ptr_type, tmp128) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_unfold_update:
tmp115 = list_map_fun_01413_ats_ptr_type_ats_ptr_type (arg2, &auxpat2_15) ;
tmp127 = s2dcp_make_16 (arg1, ats_castfn_mac(ats_ptr_type, tmp115)) ;
tmp128 = ATS_MALLOC(sizeof(anairiats_sum_10)) ;
ats_selptrset_mac(anairiats_sum_10, tmp128, atslab_0, tmp127) ;
/* tmp114 = */ patsopt_p3at_set_type_left (arg0, tmp128) ;
return /* (tmp114) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_unfold_update] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 8633(line=378, offs=1) -- 9028(line=390, offs=4)
*/
ATSstaticdec()
ats_void_type
auxerr_arity_21 (ats_ptr_type arg0, ats_int_type arg1) {
/* local vardec */
// ATSlocal_void (tmp129) ;
ATSlocal (ats_ptr_type, tmp130) ;
// ATSlocal_void (tmp131) ;
// ATSlocal_void (tmp132) ;
// ATSlocal_void (tmp133) ;
ATSlocal (ats_bool_type, tmp134) ;
// ATSlocal_void (tmp135) ;
ATSlocal (ats_bool_type, tmp136) ;
// ATSlocal_void (tmp137) ;
ATSlocal (ats_ptr_type, tmp138) ;

__ats_lab_auxerr_arity_21:
tmp130 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg0), atslab_p2at_loc) ;
/* tmp131 = */ prerr_error3_loc_02089_ (tmp130) ;
/* tmp132 = */ atspre_prerr_string (ATSstrcst(": constructor arity mismatch")) ;
tmp134 = atspre_lt_int_int (arg1, 0) ;
if (tmp134) {
/* tmp133 = */ atspre_prerr_string (ATSstrcst(": more arguments are expected.")) ;
} else {
/* empty */
} /* end of [if] */
tmp136 = atspre_gt_int_int (arg1, 0) ;
if (tmp136) {
/* tmp135 = */ atspre_prerr_string (ATSstrcst(": fewer arguments are expected.")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp137 = */ atspre_prerr_newline () ;
tmp138 = ATS_MALLOC(sizeof(anairiats_sum_13)) ;
((ats_sum_ptr_type)tmp138)->tag = 15 ;
ats_selptrset_mac(anairiats_sum_13, tmp138, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_13, tmp138, atslab_1, arg1) ;
/* tmp129 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp138) ;
return /* (tmp129) */ ;
} /* end of [auxerr_arity_21] */

/*
// /tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 9096(line=396, offs=3) -- 12910(line=537, offs=4)
*/
ATSglobaldec()
ats_ptr_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__p2at_trdn_con (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp139) ;
ATSlocal (ats_ptr_type, tmp140) ;
ATSlocal (ats_ptr_type, tmp141) ;
ATSlocal (ats_ptr_type, tmp142) ;
ATSlocal (ats_ptr_type, tmp143) ;
ATSlocal (ats_ptr_type, tmp144) ;
ATSlocal (ats_int_type, tmp145) ;
ATSlocal (ats_ptr_type, tmp146) ;
ATSlocal (ats_ptr_type, tmp147) ;
ATSlocal (ats_ptr_type, tmp148) ;
ATSlocal (ats_ptr_type, tmp149) ;
ATSlocal (ats_ptr_type, tmp150) ;
ATSlocal (ats_ptr_type, tmp151) ;
ATSlocal (ats_ptr_type, tmp152) ;
ATSlocal (ats_int_type, tmp153) ;
ATSlocal (ats_ptr_type, tmp154) ;
ATSlocal (ats_ptr_type, tmp156) ;
ATSlocal (ats_ptr_type, tmp157) ;
ATSlocal (ats_bool_type, tmp158) ;
ATSlocal (ats_ptr_type, tmp159) ;
ATSlocal (ats_ptr_type, tmp160) ;
ATSlocal (ats_bool_type, tmp161) ;
// ATSlocal_void (tmp162) ;
ATSlocal (ats_bool_type, tmp163) ;
// ATSlocal_void (tmp164) ;
// ATSlocal_void (tmp165) ;
// ATSlocal_void (tmp166) ;
ATSlocal (ats_ptr_type, tmp167) ;
// ATSlocal_void (tmp168) ;
// ATSlocal_void (tmp169) ;
// ATSlocal_void (tmp170) ;
ATSlocal (ats_ptr_type, tmp171) ;
// ATSlocal_void (tmp172) ;
ATSlocal (ats_bool_type, tmp173) ;
// ATSlocal_void (tmp174) ;
// ATSlocal_void (tmp175) ;
// ATSlocal_void (tmp176) ;
// ATSlocal_void (tmp177) ;
// ATSlocal_void (tmp178) ;
ATSlocal (ats_ptr_type, tmp179) ;
ATSlocal (ats_int_type, tmp180) ;
ATSlocal (ats_bool_type, tmp181) ;
ATSlocal (ats_ptr_type, tmp182) ;
ATSlocal (ats_bool_type, tmp184) ;
ATSlocal (ats_ptr_type, tmp185) ;
ATSlocal (ats_bool_type, tmp186) ;
ATSlocal (ats_ptr_type, tmp187) ;
// ATSlocal_void (tmp188) ;
ATSlocal (ats_bool_type, tmp189) ;
// ATSlocal_void (tmp190) ;
// ATSlocal_void (tmp191) ;
// ATSlocal_void (tmp192) ;
ATSlocal (ats_ptr_type, tmp193) ;
// ATSlocal_void (tmp194) ;
// ATSlocal_void (tmp195) ;
// ATSlocal_void (tmp196) ;
ATSlocal (ats_ptr_type, tmp197) ;
ATSlocal (ats_bool_type, tmp198) ;
ATSlocal (ats_ptr_type, tmp199) ;
ATSlocal (ats_ptr_type, tmp200) ;
ATSlocal (ats_ptr_type, tmp201) ;
// ATSlocal_void (tmp202) ;
ATSlocal (ats_int_type, tmp203) ;
ATSlocal (ats_ptr_type, tmp204) ;
// ATSlocal_void (tmp205) ;
ATSlocal (ats_bool_type, tmp206) ;
ATSlocal (ats_ptr_type, tmp207) ;
// ATSlocal_void (tmp208) ;
ATSlocal (ats_bool_type, tmp209) ;
ATSlocal (ats_int_type, tmp210) ;
ATSlocal (ats_ptr_type, tmp211) ;
// ATSlocal_void (tmp212) ;
ATSlocal (ats_bool_type, tmp213) ;
ATSlocal (ats_ptr_type, tmp214) ;
// ATSlocal_void (tmp215) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__p2at_trdn_con:
tmp140 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg0), atslab_p2at_loc) ;
tmp141 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (arg1) ;
tmp142 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg0), atslab_p2at_node) ;
if (((ats_sum_ptr_type)tmp142)->tag != 2) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_trans3_patcon.dats: 9297(line=405, offs=5) -- 9365(line=407, offs=19)") ; }
tmp143 = ats_caselptrlab_mac(anairiats_sum_2, tmp142, atslab_0) ;
tmp144 = ats_caselptrlab_mac(anairiats_sum_2, tmp142, atslab_1) ;
tmp145 = ats_caselptrlab_mac(anairiats_sum_2, tmp142, atslab_4) ;
tmp146 = ats_caselptrlab_mac(anairiats_sum_2, tmp142, atslab_5) ;
tmp147 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_scst (tmp144) ;
tmp148 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__s2hnf_opnexi_and_add (tmp140, arg1) ;
tmp149 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp2hnf (tmp148) ;
tmp150 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (tmp149) ;
tmp151 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf_get_head (tmp149) ;
tmp152 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2hnf2exp (tmp151) ;
/* ats_int_type tmp153 ; */
tmp153 = -1 ;
/* ats_ptr_type tmp154 ; */
tmp154 = (ats_sum_ptr_type)0 ;
tmp156 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_5, tmp152), atslab_s2exp_node) ;
do {
/* branch: __ats_lab_27 */
__ats_lab_27_0:
if (((ats_sum_ptr_type)tmp156)->tag != 4) { goto __ats_lab_28_0 ; }
__ats_lab_27_1:
tmp157 = ats_caselptrlab_mac(anairiats_sum_7, tmp156, atslab_0) ;
tmp158 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_s2cst_s2cst (tmp147, tmp157) ;
if (tmp158) {
tmp153 = 0 ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_28 */
__ats_lab_28_0:
if (((ats_sum_ptr_type)tmp156)->tag != 10) { goto __ats_lab_29_0 ; }
__ats_lab_28_1:
tmp159 = ats_caselptrlab_mac(anairiats_sum_12, tmp156, atslab_0) ;
tmp160 = ats_caselptrlab_mac(anairiats_sum_12, tmp156, atslab_1) ;
tmp161 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__eq_d2con_d2con (tmp144, tmp159) ;
if (tmp161) {
tmp153 = 1 ;
tmp154 = tmp160 ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_29 */
__ats_lab_29_0:
__ats_lab_29_1:
break ;
} while (0) ;
tmp163 = atspre_gt_int_int (tmp153, 0) ;
if (tmp163) {
do {
/* branch: __ats_lab_30 */
__ats_lab_30_0:
if (((ats_sum_ptr_type)tmp143)->tag != 2) { goto __ats_lab_31_0 ; }
__ats_lab_30_1:
/* tmp164 = */ prerr_error3_loc_02089_ (tmp140) ;
/* tmp165 = */ atspre_prerr_string (ATSstrcst(": the pattern decoration ~(freeing) is wrongly applied.")) ;
/* tmp166 = */ atspre_prerr_newline () ;
tmp167 = ATS_MALLOC(sizeof(anairiats_sum_12)) ;
((ats_sum_ptr_type)tmp167)->tag = 11 ;
ats_selptrset_mac(anairiats_sum_12, tmp167, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_12, tmp167, atslab_1, tmp141) ;
/* tmp162 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp167) ;
break ;

/* branch: __ats_lab_31 */
__ats_lab_31_0:
if (((ats_sum_ptr_type)tmp143)->tag != 3) { goto __ats_lab_32_0 ; }
__ats_lab_31_1:
/* tmp168 = */ prerr_error3_loc_02089_ (tmp140) ;
/* tmp169 = */ atspre_prerr_string (ATSstrcst(": the pattern decoration @(unfolding) is wrongly applied.")) ;
/* tmp170 = */ atspre_prerr_newline () ;
tmp171 = ATS_MALLOC(sizeof(anairiats_sum_12)) ;
((ats_sum_ptr_type)tmp171)->tag = 11 ;
ats_selptrset_mac(anairiats_sum_12, tmp171, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_12, tmp171, atslab_1, tmp141) ;
/* tmp162 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp171) ;
break ;

/* branch: __ats_lab_32 */
__ats_lab_32_0:
__ats_lab_32_1:
break ;
} while (0) ;
} else {
/* empty */
} /* end of [if] */
tmp173 = atspre_lt_int_int (tmp153, 0) ;
if (tmp173) {
/* tmp174 = */ prerr_error3_loc_02089_ (tmp140) ;
/* tmp175 = */ atspre_prerr_string (ATSstrcst(": the constructor pattern cannot be assigned the type [")) ;
/* tmp176 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__pprerr_s2exp (tmp150) ;
/* tmp177 = */ atspre_prerr_string (ATSstrcst("].")) ;
/* tmp178 = */ atspre_prerr_newline () ;
tmp179 = ATS_MALLOC(sizeof(anairiats_sum_12)) ;
((ats_sum_ptr_type)tmp179)->tag = 11 ;
ats_selptrset_mac(anairiats_sum_12, tmp179, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_12, tmp179, atslab_1, tmp141) ;
/* tmp172 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp179) ;
} else {
/* empty */
} /* end of [if] */
tmp181 = atspre_gt_int_int (tmp153, 0) ;
if (tmp181) {
tmp180 = 1 ;
} else {
tmp180 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__d2con_get_vwtp (tmp144) ;
} /* end of [if] */
/* ats_ptr_type tmp182 ; */
tmp182 = tmp143 ;
tmp185 = (ats_sum_ptr_type)(&_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__PCKcon_0) ;
tmp184 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__eq_pckind_pckind (tmp182, tmp185) ;
if (tmp184) {
tmp186 = atspre_gt_int_int (tmp180, 0) ;
if (tmp186) {
tmp187 = (ats_sum_ptr_type)(&_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__PCKlincon_1) ;
tmp182 = tmp187 ;
} else {
/* empty */
} /* end of [if] */
} else {
/* empty */
} /* end of [if] */
tmp189 = atspre_eq_int_int (tmp180, 0) ;
if (tmp189) {
do {
/* branch: __ats_lab_33 */
__ats_lab_33_0:
if (((ats_sum_ptr_type)tmp182)->tag != 2) { goto __ats_lab_34_0 ; }
__ats_lab_33_1:
/* tmp190 = */ prerr_error3_loc_02089_ (tmp140) ;
/* tmp191 = */ atspre_prerr_string (ATSstrcst(": pattern decoration ~(freeing) cannot be applied.")) ;
/* tmp192 = */ atspre_prerr_newline () ;
tmp193 = ATS_MALLOC(sizeof(anairiats_sum_12)) ;
((ats_sum_ptr_type)tmp193)->tag = 11 ;
ats_selptrset_mac(anairiats_sum_12, tmp193, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_12, tmp193, atslab_1, tmp141) ;
/* tmp188 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp193) ;
break ;

/* branch: __ats_lab_34 */
__ats_lab_34_0:
if (((ats_sum_ptr_type)tmp182)->tag != 3) { goto __ats_lab_35_0 ; }
__ats_lab_34_1:
/* tmp194 = */ prerr_error3_loc_02089_ (tmp140) ;
/* tmp195 = */ atspre_prerr_string (ATSstrcst(": pattern decoration ~(unfolding) cannot be applied.")) ;
/* tmp196 = */ atspre_prerr_newline () ;
tmp197 = ATS_MALLOC(sizeof(anairiats_sum_12)) ;
((ats_sum_ptr_type)tmp197)->tag = 11 ;
ats_selptrset_mac(anairiats_sum_12, tmp197, atslab_0, arg0) ;
ats_selptrset_mac(anairiats_sum_12, tmp197, atslab_1, tmp141) ;
/* tmp188 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__the_trans3errlst_add (tmp197) ;
break ;

/* branch: __ats_lab_35 */
__ats_lab_35_0:
__ats_lab_35_1:
break ;
} while (0) ;
} else {
/* empty */
} /* end of [if] */
do {
/* branch: __ats_lab_36 */
__ats_lab_36_0:
__ats_lab_36_1:
tmp198 = atspre_eq_int_int (tmp153, 0) ;
if (!tmp198) { goto __ats_lab_41_1 ; }
tmp199 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p2at_trup_con (arg0) ;
// 
tmp200 = ats_caselptrlab_mac(anairiats_sum_8, tmp199, atslab_1) ;
tmp201 = ats_caselptrlab_mac(anairiats_sum_8, tmp199, atslab_2) ;
ATS_FREE(tmp199) ;
/* tmp202 = */ _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__s2exp_hypequal_solve (tmp140, tmp201, tmp150) ;
/* ats_int_type tmp203 ; */
tmp203 = 0 ;
tmp204 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__p2atlst_trdn (tmp140, tmp146, tmp200, (&tmp203)) ;
tmp206 = atspre_neq_int_int (tmp203, 0) ;
if (tmp206) {
/* tmp205 = */ auxerr_arity_21 (arg0, tmp203) ;
} else {
/* empty */
} /* end of [if] */
tmp207 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_con (tmp140, tmp150, tmp182, tmp144, tmp145, tmp204) ;
do {
/* branch: __ats_lab_37 */
__ats_lab_37_0:
if (((ats_sum_ptr_type)tmp182)->tag != 0) { goto __ats_lab_38_0 ; }
__ats_lab_37_1:
break ;

/* branch: __ats_lab_38 */
__ats_lab_38_0:
if (((ats_sum_ptr_type)tmp182)->tag != 1) { goto __ats_lab_39_0 ; }
__ats_lab_38_1:
/* tmp208 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_lincon_update (tmp207, tmp144, tmp204) ;
break ;

/* branch: __ats_lab_39 */
__ats_lab_39_0:
if (((ats_sum_ptr_type)tmp182)->tag != 2) { goto __ats_lab_40_0 ; }
__ats_lab_39_1:
/* tmp208 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_free_update (tmp207, tmp144, tmp204) ;
break ;

/* branch: __ats_lab_40 */
__ats_lab_40_0:
// if (((ats_sum_ptr_type)tmp182)->tag != 3) { ats_deadcode_failure_handle () ; }
__ats_lab_40_1:
/* tmp208 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_unfold_update (tmp207, tmp144, tmp204) ;
break ;
} while (0) ;
tmp139 = tmp207 ;
break ;

/* branch: __ats_lab_41 */
__ats_lab_41_0:
__ats_lab_41_1:
tmp209 = atspre_gt_int_int (tmp153, 0) ;
if (!tmp209) { goto __ats_lab_42_1 ; }
/* ats_int_type tmp210 ; */
tmp210 = 0 ;
tmp211 = _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__p2atlst_trdn (tmp140, tmp146, tmp154, (&tmp210)) ;
tmp213 = atspre_neq_int_int (tmp210, 0) ;
if (tmp213) {
/* tmp212 = */ auxerr_arity_21 (arg0, tmp210) ;
} else {
/* empty */
} /* end of [if] */
tmp214 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_con (tmp140, tmp150, tmp182, tmp144, tmp145, tmp211) ;
/* tmp215 = */ _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__p3at_unfold_update (tmp214, tmp144, tmp211) ;
tmp139 = tmp214 ;
break ;

/* branch: __ats_lab_42 */
__ats_lab_42_0:
__ats_lab_42_1:
tmp139 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__p3at_errpat (tmp140, tmp150) ;
break ;
} while (0) ;
return (tmp139) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__p2at_trdn_con] */

/* 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_errmsg_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_errmsg_2edats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_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_dynexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload (void) ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_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_errmsg_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_errmsg_2edats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_error_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_stacst2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp3_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_solve_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_env_2esats__staload () ;

// _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__PATCONTRUP_0.tag = 0 ;
return ;
} /* staload function */

/* dynamic load function */

// dynload flag declaration
extern ats_int_type _2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_trans3_patcon_2edats__staload () ;

#ifdef _ATS_PROOFCHECK
ATS_2d0_2e2_2e12_2prelude_2SATS_2list_2esats__list_length_is_nonnegative_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2SATS_2list_vt_2esats__list_vt_length_is_nonnegative_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2SATS_2array_2esats__array_v_takeout2_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2list_vt_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____copy_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____free_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____assert_prfck () ;
ATS_2d0_2e2_2e12_2prelude_2DATS_2array_2edats____assert_prfck () ;
#endif /* _ATS_PROOFCHECK */

/* marking static variables for GC */

/* marking external values for GC */

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

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

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

/* end of [pats_trans3_patcon_dats.c] */
