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

#include "pats_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_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_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_location.cats"

#include "pats_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_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"
/* external codes at top */
/* type definitions */
typedef
struct {
ats_ptr_type atslab_hisexp_name ;
ats_ptr_type atslab_hisexp_node ;
} anairiats_rec_0 ;

typedef
struct {
ats_ptr_type atslab_primval_loc ;
ats_ptr_type atslab_primval_type ;
ats_ptr_type atslab_primval_node ;
} anairiats_rec_1 ;

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

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

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

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

typedef struct {
ats_ptr_type atslab_0 ;
} anairiats_sum_6 ;

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

typedef
struct {
ats_ptr_type atslab_instr_loc ;
ats_ptr_type atslab_instr_node ;
} anairiats_rec_8 ;

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

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

/* external typedefs */
/* external dynamic constructor declarations */
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_cons_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__list_nil_1) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__None_0) ;
ATSextern_val(ats_sum_type, ATS_2d0_2e2_2e12_2prelude_2basics_sta_2esats__Some_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__FUNCLOfun_0) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__FUNCLOclo_1) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_histaexp_2esats__HSEfun_5) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVcst_6) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVrefarg_30) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVfunlab_31) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVcfunlab_32) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVtmpltcst_35) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVtmpltvar_36) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVtmpltcstmat_37) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__PMVtmpltvarmat_38) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__INSfcall_6) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__INSfcall2_7) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__INSextfcall_8) ;
ATSextern_val(ats_sum_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__INSextmcall_9) ;

/* external dynamic constant declarations */
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_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_void_type, atspre_fprintf_exn) (ats_ptr_type, ats_ptr_type, ...) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_fun_isbot) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_is_fundec) (ats_ptr_type) ;
ATSextern_val(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_histaexp_2esats__hisexp_cloptr) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__d2env_get_type) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__funent_eval_d2envlst) (ats_ptr_type) ;
ATSextern_fun(ats_ptr_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__funlab_get_funent) (ats_ptr_type) ;
ATSextern_fun(ats_bool_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__tmpvar_is_void) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_LPAREN) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_RPAREN) (ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_d2cst) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_int_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_d2envlst) (ats_ptr_type, ats_ptr_type, ats_int_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_tmpvar) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funlab) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit2_funlab) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_hisexp) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_hisexplst_sep) (ats_ptr_type, ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval) (ats_ptr_type, ats_ptr_type) ;
ATSextern_fun(ats_void_type, _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primvalist) (ats_ptr_type, ats_ptr_type) ;

/* external dynamic terminating constant declarations */
#ifdef _ATS_PROOFCHECK
#endif /* _ATS_PROOFCHECK */

/* assuming abstract types */
/* sum constructor declarations */
/* exn constructor declarations */
/* global dynamic (non-functional) constant declarations */
/* internal function declarations */
static
ats_bool_type funval_isbot_0 (ats_ptr_type arg0) ;
static
ats_void_type aux_funval_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_void_type aux_funval2_2 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) ;
static
ats_int_type auxflab_4 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_int_type aux_funenv_3 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type emit_fparamlst_5 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2) ;
static
ats_void_type emit_freeaft_fun_6 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_void_type aux1_8 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) ;
static
ats_void_type aux1lst_9 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) ;
static
ats_void_type aux2_10 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) ;
static
ats_void_type aux2lst_11 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) ;
static
ats_void_type auxgoto_12 (ats_ptr_type arg0, ats_ptr_type arg1) ;
static
ats_int_type loop_17 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_int_type arg3) ;
static
ats_void_type loop_19 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_int_type arg4) ;

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

/* function implementations */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 1905(line=73, offs=1) -- 2107(line=84, offs=4)
*/
ATSstaticdec()
ats_bool_type
funval_isbot_0 (ats_ptr_type arg0) {
/* local vardec */
ATSlocal (ats_bool_type, tmp0) ;
ATSlocal (ats_ptr_type, tmp1) ;
ATSlocal (ats_ptr_type, tmp2) ;
ATSlocal (ats_ptr_type, tmp3) ;

__ats_lab_funval_isbot_0:
tmp1 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg0), atslab_primval_node) ;
do {
/* branch: __ats_lab_0 */
__ats_lab_0_0:
if (((ats_sum_ptr_type)tmp1)->tag != 6) { goto __ats_lab_1_0 ; }
__ats_lab_0_1:
tmp2 = ats_caselptrlab_mac(anairiats_sum_2, tmp1, atslab_0) ;
tmp3 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_get_type (tmp2) ;
tmp0 = _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__s2exp_fun_isbot (tmp3) ;
break ;

/* branch: __ats_lab_1 */
__ats_lab_1_0:
__ats_lab_1_1:
tmp0 = ats_false_bool ;
break ;
} while (0) ;
return (tmp0) ;
} /* end of [funval_isbot_0] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 2159(line=88, offs=5) -- 3159(line=128, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_funval_1 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp4) ;
ATSlocal (ats_ptr_type, tmp5) ;
ATSlocal (ats_ptr_type, tmp6) ;
ATSlocal (ats_bool_type, tmp7) ;
ATSlocal (ats_ptr_type, tmp8) ;
ATSlocal (ats_ptr_type, tmp9) ;

__ats_lab_aux_funval_1:
tmp5 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg1), atslab_primval_node) ;
do {
/* branch: __ats_lab_2 */
__ats_lab_2_0:
if (((ats_sum_ptr_type)tmp5)->tag != 6) { goto __ats_lab_3_0 ; }
__ats_lab_2_1:
tmp6 = ats_caselptrlab_mac(anairiats_sum_2, tmp5, atslab_0) ;
tmp7 = _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__d2cst_is_fundec (tmp6) ;
if (tmp7) {
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_d2cst (arg0, tmp6) ;
} else {
/* tmp4 = */ aux_funval2_2 (arg0, arg1, arg2, arg3) ;
} /* end of [if] */
break ;

/* branch: __ats_lab_3 */
__ats_lab_3_0:
if (((ats_sum_ptr_type)tmp5)->tag != 31) { goto __ats_lab_4_0 ; }
__ats_lab_3_1:
tmp8 = ats_caselptrlab_mac(anairiats_sum_2, tmp5, atslab_0) ;
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funlab (arg0, tmp8) ;
break ;

/* branch: __ats_lab_4 */
__ats_lab_4_0:
if (((ats_sum_ptr_type)tmp5)->tag != 32) { goto __ats_lab_5_0 ; }
__ats_lab_4_1:
tmp9 = ats_caselptrlab_mac(anairiats_sum_3, tmp5, atslab_1) ;
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funlab (arg0, tmp9) ;
break ;

/* branch: __ats_lab_5 */
__ats_lab_5_0:
if (((ats_sum_ptr_type)tmp5)->tag != 35) { goto __ats_lab_6_0 ; }
__ats_lab_5_1:
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, arg1) ;
break ;

/* branch: __ats_lab_6 */
__ats_lab_6_0:
if (((ats_sum_ptr_type)tmp5)->tag != 36) { goto __ats_lab_7_0 ; }
__ats_lab_6_1:
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, arg1) ;
break ;

/* branch: __ats_lab_7 */
__ats_lab_7_0:
if (((ats_sum_ptr_type)tmp5)->tag != 37) { goto __ats_lab_8_0 ; }
__ats_lab_7_1:
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, arg1) ;
break ;

/* branch: __ats_lab_8 */
__ats_lab_8_0:
if (((ats_sum_ptr_type)tmp5)->tag != 38) { goto __ats_lab_9_0 ; }
__ats_lab_8_1:
/* tmp4 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, arg1) ;
break ;

/* branch: __ats_lab_9 */
__ats_lab_9_0:
__ats_lab_9_1:
/* tmp4 = */ aux_funval2_2 (arg0, arg1, arg2, arg3) ;
break ;
} while (0) ;
return /* (tmp4) */ ;
} /* end of [aux_funval_1] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 3188(line=130, offs=5) -- 4169(line=179, offs=4)
*/
ATSstaticdec()
ats_void_type
aux_funval2_2 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_ref_type arg3) {
/* local vardec */
// ATSlocal_void (tmp10) ;
ATSlocal (ats_ptr_type, tmp11) ;
ATSlocal (ats_ptr_type, tmp12) ;
ATSlocal (ats_ptr_type, tmp13) ;
ATSlocal (ats_ptr_type, tmp14) ;
// ATSlocal_void (tmp15) ;
// ATSlocal_void (tmp17) ;
// ATSlocal_void (tmp18) ;
// ATSlocal_void (tmp19) ;
// ATSlocal_void (tmp20) ;
// ATSlocal_void (tmp21) ;
ATSlocal (ats_ptr_type, tmp22) ;
// ATSlocal_void (tmp23) ;
// ATSlocal_void (tmp24) ;
// ATSlocal_void (tmp25) ;
// ATSlocal_void (tmp26) ;

__ats_lab_aux_funval2_2:
tmp11 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_0, arg2), atslab_hisexp_node) ;
if (((ats_sum_ptr_type)tmp11)->tag != 5) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 3408(line=141, offs=5) -- 3464(line=144, offs=24)") ; }
tmp12 = ats_caselptrlab_mac(anairiats_sum_4, tmp11, atslab_0) ;
tmp13 = ats_caselptrlab_mac(anairiats_sum_4, tmp11, atslab_1) ;
tmp14 = ats_caselptrlab_mac(anairiats_sum_4, tmp11, atslab_2) ;
/* tmp15 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSfunclo")) ;
do {
/* branch: __ats_lab_10 */
__ats_lab_10_0:
if (tmp12 != (ats_sum_ptr_type)0) { goto __ats_lab_11_0 ; }
__ats_lab_10_1:
break ;

/* branch: __ats_lab_11 */
__ats_lab_11_0:
// if (tmp12 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_11_1:
ats_ptrget_mac(ats_bool_type, arg3) = ats_true_bool ;
break ;
} while (0) ;
if (ats_ptrget_mac(ats_bool_type, arg3)) {
/* tmp17 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("_clo")) ;
} else {
/* tmp17 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("_fun")) ;
} /* end of [if] */
/* tmp18 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_LPAREN (arg0) ;
/* tmp19 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, arg1) ;
/* tmp20 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp21 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_LPAREN (arg0) ;
if (ats_ptrget_mac(ats_bool_type, arg3)) {
tmp22 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp22, atslab_0, _2tmp_2ATS_2dPostiats_2src_2pats_histaexp_2esats__hisexp_cloptr) ;
ats_selptrset_mac(anairiats_sum_5, tmp22, atslab_1, tmp13) ;
} else {
tmp22 = tmp13 ;
} /* end of [if] */
/* tmp23 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_hisexplst_sep (arg0, tmp22, ATSstrcst(", ")) ;
/* tmp24 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_RPAREN (arg0) ;
/* tmp25 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp26 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_hisexp (arg0, tmp14) ;
/* tmp10 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_RPAREN (arg0) ;
return /* (tmp10) */ ;
} /* end of [aux_funval2_2] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 4295(line=188, offs=5) -- 4594(line=205, offs=4)
*/
ATSstaticdec()
ats_int_type
auxflab_4 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_int_type, tmp28) ;
ATSlocal (ats_ptr_type, tmp29) ;
ATSlocal (ats_ptr_type, tmp30) ;
ATSlocal (ats_ptr_type, tmp31) ;

__ats_lab_auxflab_4:
tmp29 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__funlab_get_funent (arg1) ;
do {
/* branch: __ats_lab_12 */
__ats_lab_12_0:
if (tmp29 == (ats_sum_ptr_type)0) { goto __ats_lab_13_0 ; }
__ats_lab_12_1:
tmp30 = ats_caselptrlab_mac(anairiats_sum_6, tmp29, atslab_0) ;
tmp31 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__funent_eval_d2envlst (tmp30) ;
tmp28 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_d2envlst (arg0, tmp31, 0) ;
break ;

/* branch: __ats_lab_13 */
__ats_lab_13_0:
// if (tmp29 != (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_13_1:
tmp28 = 0 ;
break ;
} while (0) ;
return (tmp28) ;
} /* end of [auxflab_4] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 4220(line=183, offs=5) -- 4785(line=217, offs=4)
*/
ATSstaticdec()
ats_int_type
aux_funenv_3 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_int_type, tmp27) ;
ATSlocal (ats_ptr_type, tmp32) ;
ATSlocal (ats_ptr_type, tmp33) ;
ATSlocal (ats_ptr_type, tmp34) ;

__ats_lab_aux_funenv_3:
tmp32 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg1), atslab_primval_node) ;
do {
/* branch: __ats_lab_14 */
__ats_lab_14_0:
if (((ats_sum_ptr_type)tmp32)->tag != 31) { goto __ats_lab_15_0 ; }
__ats_lab_14_1:
tmp33 = ats_caselptrlab_mac(anairiats_sum_2, tmp32, atslab_0) ;
tmp27 = auxflab_4 (arg0, tmp33) ;
break ;

/* branch: __ats_lab_15 */
__ats_lab_15_0:
if (((ats_sum_ptr_type)tmp32)->tag != 32) { goto __ats_lab_16_0 ; }
__ats_lab_15_1:
tmp34 = ats_caselptrlab_mac(anairiats_sum_3, tmp32, atslab_1) ;
tmp27 = auxflab_4 (arg0, tmp34) ;
break ;

/* branch: __ats_lab_16 */
__ats_lab_16_0:
__ats_lab_16_1:
tmp27 = 0 ;
break ;
} while (0) ;
return (tmp27) ;
} /* end of [aux_funenv_3] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 4835(line=222, offs=1) -- 5131(line=239, offs=4)
*/
ATSstaticdec()
ats_void_type
emit_fparamlst_5 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp35) ;
// ATSlocal_void (tmp36) ;
ATSlocal (ats_bool_type, tmp37) ;

__ats_lab_emit_fparamlst_5:
do {
/* branch: __ats_lab_17 */
__ats_lab_17_0:
if (arg2 == (ats_sum_ptr_type)0) { goto __ats_lab_18_0 ; }
__ats_lab_17_1:
tmp37 = atspre_gt_int_int (arg1, 0) ;
if (tmp37) {
/* tmp36 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp35 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primvalist (arg0, arg2) ;
break ;

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

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 5185(line=243, offs=5) -- 5485(line=260, offs=4)
*/
ATSstaticdec()
ats_void_type
emit_freeaft_fun_6 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp38) ;
ATSlocal (ats_ptr_type, tmp39) ;
ATSlocal (ats_int_type, tmp40) ;
ATSlocal (ats_ptr_type, tmp41) ;
ATSlocal (ats_bool_type, tmp42) ;
// ATSlocal_void (tmp43) ;
// ATSlocal_void (tmp44) ;

__ats_lab_emit_freeaft_fun_6:
tmp39 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_1, arg1), atslab_primval_node) ;
do {
/* branch: __ats_lab_19 */
__ats_lab_19_0:
if (((ats_sum_ptr_type)tmp39)->tag != 30) { goto __ats_lab_20_0 ; }
__ats_lab_19_1:
tmp40 = ats_caselptrlab_mac(anairiats_sum_7, tmp39, atslab_1) ;
tmp41 = ats_caselptrlab_mac(anairiats_sum_7, tmp39, atslab_2) ;
tmp42 = atspre_gt_int_int (tmp40, 0) ;
if (tmp42) {
/* tmp43 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSfreeclo(")) ;
/* tmp44 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, tmp41) ;
/* tmp38 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(") ;\n")) ;
} else {
/* empty */
} /* end of [if] */
break ;

/* branch: __ats_lab_20 */
__ats_lab_20_0:
__ats_lab_20_1:
break ;
} while (0) ;
return /* (tmp38) */ ;
} /* end of [emit_freeaft_fun_6] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 6356(line=308, offs=3) -- 7423(line=358, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_fcall (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp45) ;
ATSlocal (ats_ptr_type, tmp46) ;
ATSlocal (ats_ptr_type, tmp47) ;
ATSlocal (ats_ptr_type, tmp48) ;
ATSlocal (ats_ptr_type, tmp49) ;
ATSlocal (ats_ptr_type, tmp50) ;
ATSlocal (ats_ptr_type, tmp51) ;
ATSlocal (ats_bool_type, tmp52) ;
ATSlocal (ats_bool_type, tmp53) ;
// ATSlocal_void (tmp54) ;
// ATSlocal_void (tmp55) ;
// ATSlocal_void (tmp56) ;
// ATSlocal_void (tmp57) ;
// ATSlocal_void (tmp58) ;
ATSlocal (ats_bool_type, tmp59) ;
// ATSlocal_void (tmp60) ;
ATSlocal (ats_ptr_type, tmp61) ;
// ATSlocal_void (tmp62) ;
ATSlocal (ats_int_type, tmp63) ;
// ATSlocal_void (tmp64) ;
// ATSlocal_void (tmp65) ;
// ATSlocal_void (tmp66) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_fcall:
tmp46 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_loc) ;
tmp47 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_node) ;
if (((ats_sum_ptr_type)tmp47)->tag != 6) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 6405(line=311, offs=5) -- 6466(line=312, offs=53)") ; }
tmp48 = ats_caselptrlab_mac(anairiats_sum_9, tmp47, atslab_0) ;
tmp49 = ats_caselptrlab_mac(anairiats_sum_9, tmp47, atslab_1) ;
tmp50 = ats_caselptrlab_mac(anairiats_sum_9, tmp47, atslab_2) ;
tmp51 = ats_caselptrlab_mac(anairiats_sum_9, tmp47, atslab_3) ;
tmp52 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__tmpvar_is_void (tmp48) ;
if (tmp52) {
tmp53 = ats_true_bool ;
} else {
tmp53 = funval_isbot_0 (tmp49) ;
} /* end of [if] */
/* tmp54 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSmove")) ;
if (tmp53) {
/* tmp55 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("_void")) ;
} else {
/* empty */
} /* end of [if] */
/* tmp56 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("(")) ;
/* tmp57 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_tmpvar (arg0, tmp48) ;
/* tmp58 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* ats_bool_type tmp59 ; */
tmp59 = ats_false_bool ;
/* tmp60 = */ aux_funval_1 (arg0, tmp49, tmp50, (&tmp59)) ;
if (tmp59) {
tmp61 = ATS_MALLOC(sizeof(anairiats_sum_5)) ;
ats_selptrset_mac(anairiats_sum_5, tmp61, atslab_0, tmp49) ;
ats_selptrset_mac(anairiats_sum_5, tmp61, atslab_1, tmp51) ;
} else {
tmp61 = tmp51 ;
} /* end of [if] */
/* tmp62 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_LPAREN (arg0) ;
tmp63 = aux_funenv_3 (arg0, tmp49) ;
/* tmp64 = */ emit_fparamlst_5 (arg0, tmp63, tmp61) ;
/* tmp65 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_RPAREN (arg0) ;
/* tmp66 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(") ;\n")) ;
/* tmp45 = */ emit_freeaft_fun_6 (arg0, tmp49) ;
return /* (tmp45) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_fcall] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 7486(line=365, offs=1) -- 7869(line=388, offs=4)
*/
ATSstaticdec()
ats_void_type
aux1_8 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) {
/* local vardec */
// ATSlocal_void (tmp67) ;
// ATSlocal_void (tmp68) ;
// ATSlocal_void (tmp69) ;
ATSlocal (ats_bool_type, tmp70) ;
// ATSlocal_void (tmp71) ;
// ATSlocal_void (tmp72) ;

__ats_lab_aux1_8:
/* tmp68 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSmove_tlcal(")) ;
tmp70 = atspre_lte_int_int (arg1, 1) ;
if (tmp70) {
/* tmp69 = */ atspre_fprintf_exn (arg0, ATSstrcst("apy%i"), arg3) ;
} else {
/* tmp69 = */ atspre_fprintf_exn (arg0, ATSstrcst("a%ipy%i"), arg1, arg3) ;
} /* end of [if] */
/* tmp71 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp72 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, arg2) ;
/* tmp67 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(") ;\n")) ;
return /* (tmp67) */ ;
} /* end of [aux1_8] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 7892(line=391, offs=1) -- 8152(line=408, offs=4)
*/
ATSstaticdec()
ats_void_type
aux1lst_9 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) {
/* local vardec */
// ATSlocal_void (tmp73) ;
ATSlocal (ats_ptr_type, tmp74) ;
ATSlocal (ats_ptr_type, tmp75) ;
// ATSlocal_void (tmp76) ;
ATSlocal (ats_int_type, tmp77) ;

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

/* branch: __ats_lab_22 */
__ats_lab_22_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_22_1:
tmp74 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp75 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
/* tmp76 = */ aux1_8 (arg0, arg1, tmp74, arg3) ;
tmp77 = atspre_add_int_int (arg3, 1) ;
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = tmp75 ;
arg3 = tmp77 ;
goto __ats_lab_aux1lst_9 ; // tail call
break ;
} while (0) ;
return /* (tmp73) */ ;
} /* end of [aux1lst_9] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 8178(line=411, offs=1) -- 8661(line=444, offs=4)
*/
ATSstaticdec()
ats_void_type
aux2_10 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) {
/* local vardec */
// ATSlocal_void (tmp78) ;
// ATSlocal_void (tmp79) ;
// ATSlocal_void (tmp80) ;
ATSlocal (ats_bool_type, tmp81) ;
// ATSlocal_void (tmp82) ;
ATSlocal (ats_bool_type, tmp83) ;

__ats_lab_aux2_10:
/* tmp79 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSargmove_tlcal(")) ;
tmp81 = atspre_lte_int_int (arg1, 1) ;
if (tmp81) {
/* tmp80 = */ atspre_fprintf_exn (arg0, ATSstrcst("arg%i"), arg3) ;
} else {
/* tmp80 = */ atspre_fprintf_exn (arg0, ATSstrcst("a%irg%i"), arg1, arg3) ;
} /* end of [if] */
tmp83 = atspre_lte_int_int (arg1, 1) ;
if (tmp83) {
/* tmp82 = */ atspre_fprintf_exn (arg0, ATSstrcst(", apy%i"), arg3) ;
} else {
/* tmp82 = */ atspre_fprintf_exn (arg0, ATSstrcst(", a%ipy%i"), arg1, arg3) ;
} /* end of [if] */
/* tmp78 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(") ;\n")) ;
return /* (tmp78) */ ;
} /* end of [aux2_10] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 8684(line=447, offs=1) -- 8958(line=465, offs=4)
*/
ATSstaticdec()
ats_void_type
aux2lst_11 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_int_type arg3) {
/* local vardec */
// ATSlocal_void (tmp84) ;
ATSlocal (ats_ptr_type, tmp85) ;
ATSlocal (ats_ptr_type, tmp86) ;
// ATSlocal_void (tmp87) ;
ATSlocal (ats_int_type, tmp88) ;

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

/* branch: __ats_lab_24 */
__ats_lab_24_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_24_1:
tmp85 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp86 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
/* tmp87 = */ aux2_10 (arg0, arg1, tmp85, arg3) ;
tmp88 = atspre_add_int_int (arg3, 1) ;
arg0 = arg0 ;
arg1 = arg1 ;
arg2 = tmp86 ;
arg3 = tmp88 ;
goto __ats_lab_aux2lst_11 ; // tail call
break ;
} while (0) ;
return /* (tmp84) */ ;
} /* end of [aux2lst_11] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 8984(line=468, offs=1) -- 9238(line=488, offs=4)
*/
ATSstaticdec()
ats_void_type
auxgoto_12 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp89) ;
// ATSlocal_void (tmp90) ;
// ATSlocal_void (tmp91) ;
// ATSlocal_void (tmp92) ;

__ats_lab_auxgoto_12:
/* tmp90 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSfgoto(")) ;
/* tmp91 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("__patsflab_")) ;
/* tmp92 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit2_funlab (arg0, arg1) ;
/* tmp89 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(") ;\n")) ;
return /* (tmp89) */ ;
} /* end of [auxgoto_12] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 9314(line=494, offs=3) -- 9678(line=520, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_fcall2 (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (tmp93) ;
ATSlocal (ats_ptr_type, tmp94) ;
ATSlocal (ats_ptr_type, tmp95) ;
ATSlocal (ats_int_type, tmp96) ;
ATSlocal (ats_ptr_type, tmp97) ;
// ATSlocal_void (tmp98) ;
// ATSlocal_void (tmp99) ;
// ATSlocal_void (tmp100) ;
// ATSlocal_void (tmp101) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_fcall2:
tmp94 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_node) ;
if (((ats_sum_ptr_type)tmp94)->tag != 7) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 9339(line=497, offs=1) -- 9406(line=501, offs=19)") ; }
tmp95 = ats_caselptrlab_mac(anairiats_sum_10, tmp94, atslab_1) ;
tmp96 = ats_caselptrlab_mac(anairiats_sum_10, tmp94, atslab_2) ;
tmp97 = ats_caselptrlab_mac(anairiats_sum_10, tmp94, atslab_4) ;
/* tmp98 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATStailcal_beg()\n")) ;
/* tmp99 = */ aux1lst_9 (arg0, tmp96, tmp97, 0) ;
/* tmp100 = */ aux2lst_11 (arg0, tmp96, tmp97, 0) ;
/* tmp101 = */ auxgoto_12 (arg0, tmp95) ;
/* tmp93 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATStailcal_end()\n")) ;
return /* (tmp93) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_fcall2] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 9786(line=528, offs=3) -- 10394(line=568, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_extfcall (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
// ATSlocal_void (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_bool_type, tmp108) ;
// ATSlocal_void (tmp109) ;
ATSlocal (ats_bool_type, tmp110) ;
// ATSlocal_void (tmp111) ;
// ATSlocal_void (tmp112) ;
// ATSlocal_void (tmp113) ;
// ATSlocal_void (tmp114) ;
// ATSlocal_void (tmp115) ;
// ATSlocal_void (tmp116) ;
// ATSlocal_void (tmp117) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_extfcall:
tmp103 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_loc) ;
tmp104 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_node) ;
if (((ats_sum_ptr_type)tmp104)->tag != 8) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 9839(line=534, offs=1) -- 9896(line=537, offs=29)") ; }
tmp105 = ats_caselptrlab_mac(anairiats_sum_4, tmp104, atslab_0) ;
tmp106 = ats_caselptrlab_mac(anairiats_sum_4, tmp104, atslab_1) ;
tmp107 = ats_caselptrlab_mac(anairiats_sum_4, tmp104, atslab_2) ;
tmp108 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__tmpvar_is_void (tmp105) ;
tmp110 = atspre_neg_bool (tmp108) ;
if (tmp110) {
/* tmp109 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSmove(")) ;
} else {
/* tmp109 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSmove_void(")) ;
} /* end of [if] */
/* tmp111 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_tmpvar (arg0, tmp105) ;
/* tmp112 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp113 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSextfcall(")) ;
/* tmp114 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, tmp106) ;
/* tmp115 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp116 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("(")) ;
/* tmp117 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primvalist (arg0, tmp107) ;
/* tmp102 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("))) ;")) ;
return /* (tmp102) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_extfcall] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 10481(line=574, offs=3) -- 11168(line=617, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_extmcall (ats_ptr_type arg0, ats_ptr_type arg1) {
/* 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) ;
ATSlocal (ats_bool_type, tmp125) ;
// ATSlocal_void (tmp126) ;
ATSlocal (ats_bool_type, tmp127) ;
// ATSlocal_void (tmp128) ;
// ATSlocal_void (tmp129) ;
// ATSlocal_void (tmp130) ;
// ATSlocal_void (tmp131) ;
// ATSlocal_void (tmp132) ;
// ATSlocal_void (tmp133) ;
// ATSlocal_void (tmp134) ;
// ATSlocal_void (tmp135) ;
// ATSlocal_void (tmp136) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_extmcall:
tmp119 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_loc) ;
tmp120 = ats_selbox_mac(ats_castptr_mac(anairiats_rec_8, arg1), atslab_instr_node) ;
if (((ats_sum_ptr_type)tmp120)->tag != 9) { ats_caseof_failure_handle ("/tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 10531(line=578, offs=1) -- 10598(line=582, offs=29)") ; }
tmp121 = ats_caselptrlab_mac(anairiats_sum_9, tmp120, atslab_0) ;
tmp122 = ats_caselptrlab_mac(anairiats_sum_9, tmp120, atslab_1) ;
tmp123 = ats_caselptrlab_mac(anairiats_sum_9, tmp120, atslab_2) ;
tmp124 = ats_caselptrlab_mac(anairiats_sum_9, tmp120, atslab_3) ;
tmp125 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__tmpvar_is_void (tmp121) ;
tmp127 = atspre_neg_bool (tmp125) ;
if (tmp127) {
/* tmp126 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSmove(")) ;
} else {
/* tmp126 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSINSmove_void(")) ;
} /* end of [if] */
/* tmp128 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_tmpvar (arg0, tmp121) ;
/* tmp129 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp130 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("ATSextmcall(")) ;
/* tmp131 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primval (arg0, tmp122) ;
/* tmp132 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp133 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, tmp123) ;
/* tmp134 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst(", ")) ;
/* tmp135 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("(")) ;
/* tmp136 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_primvalist (arg0, tmp124) ;
/* tmp118 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, ATSstrcst("))) ;")) ;
return /* (tmp118) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_instr_extmcall] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 11374(line=634, offs=5) -- 11815(line=659, offs=4)
*/
ATSstaticdec()
ats_int_type
loop_17 (ats_ptr_type arg0, ats_ptr_type arg1, ats_ptr_type arg2, ats_int_type arg3) {
/* local vardec */
ATSlocal (ats_int_type, tmp138) ;
ATSlocal (ats_ptr_type, tmp139) ;
ATSlocal (ats_ptr_type, tmp140) ;
ATSlocal (ats_ptr_type, tmp141) ;
// ATSlocal_void (tmp142) ;
ATSlocal (ats_bool_type, tmp143) ;
// ATSlocal_void (tmp144) ;
// ATSlocal_void (tmp145) ;
ATSlocal (ats_int_type, tmp146) ;

__ats_lab_loop_17:
do {
/* branch: __ats_lab_25 */
__ats_lab_25_0:
if (arg1 != (ats_sum_ptr_type)0) { goto __ats_lab_26_0 ; }
__ats_lab_25_1:
tmp138 = arg3 ;
break ;

/* branch: __ats_lab_26 */
__ats_lab_26_0:
// if (arg1 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_26_1:
tmp139 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_0) ;
tmp140 = ats_caselptrlab_mac(anairiats_sum_5, arg1, atslab_1) ;
tmp141 = _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__d2env_get_type (tmp139) ;
tmp143 = atspre_gt_int_int (arg3, 0) ;
if (tmp143) {
/* tmp142 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, arg2) ;
} else {
/* empty */
} /* end of [if] */
/* tmp144 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_hisexp (arg0, tmp141) ;
/* tmp145 = */ atspre_fprintf_exn (arg0, ATSstrcst(" env%i"), arg3) ;
tmp146 = atspre_add_int_int (arg3, 1) ;
arg0 = arg0 ;
arg1 = tmp140 ;
arg2 = arg2 ;
arg3 = tmp146 ;
goto __ats_lab_loop_17 ; // tail call
break ;
} while (0) ;
return (tmp138) ;
} /* end of [loop_17] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 11273(line=625, offs=3) -- 11873(line=663, offs=4)
*/
ATSglobaldec()
ats_int_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funenvlst (ats_ptr_type arg0, ats_ptr_type arg1) {
/* local vardec */
ATSlocal (ats_int_type, tmp137) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funenvlst:
tmp137 = loop_17 (arg0, arg1, ATSstrcst(", "), 0) ;
return (tmp137) ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funenvlst] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 11960(line=670, offs=1) -- 12422(line=697, offs=4)
*/
ATSstaticdec()
ats_void_type
loop_19 (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2, ats_ptr_type arg3, ats_int_type arg4) {
/* local vardec */
// ATSlocal_void (tmp148) ;
ATSlocal (ats_ptr_type, tmp149) ;
ATSlocal (ats_ptr_type, tmp150) ;
// ATSlocal_void (tmp151) ;
ATSlocal (ats_bool_type, tmp152) ;
// ATSlocal_void (tmp153) ;
// ATSlocal_void (tmp154) ;
ATSlocal (ats_int_type, tmp155) ;
ATSlocal (ats_int_type, tmp156) ;

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

/* branch: __ats_lab_28 */
__ats_lab_28_0:
// if (arg2 == (ats_sum_ptr_type)0) { ats_deadcode_failure_handle () ; }
__ats_lab_28_1:
tmp149 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_0) ;
tmp150 = ats_caselptrlab_mac(anairiats_sum_5, arg2, atslab_1) ;
tmp152 = atspre_gt_int_int (arg1, 0) ;
if (tmp152) {
/* tmp151 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_text (arg0, arg3) ;
} else {
/* empty */
} /* end of [if] */
/* tmp153 = */ _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_hisexp (arg0, tmp149) ;
/* tmp154 = */ atspre_fprintf_exn (arg0, ATSstrcst(" arg%i"), arg4) ;
tmp155 = atspre_add_int_int (arg1, 1) ;
tmp156 = atspre_add_int_int (arg4, 1) ;
arg0 = arg0 ;
arg1 = tmp155 ;
arg2 = tmp150 ;
arg3 = arg3 ;
arg4 = tmp156 ;
goto __ats_lab_loop_19 ; // tail call
break ;
} while (0) ;
return /* (tmp148) */ ;
} /* end of [loop_19] */

/*
// /tmp/ATS-Postiats/src/pats_ccomp_emit2.dats: 11929(line=667, offs=3) -- 12482(line=701, offs=4)
*/
ATSglobaldec()
ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funarglst (ats_ptr_type arg0, ats_int_type arg1, ats_ptr_type arg2) {
/* local vardec */
// ATSlocal_void (tmp147) ;

__ats_lab__2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funarglst:
/* tmp147 = */ loop_19 (arg0, arg1, arg2, ATSstrcst(", "), 0) ;
return /* (tmp147) */ ;
} /* end of [_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__emit_funarglst] */

/* static load function */

// 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_location_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_histaexp_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_hidynexp_2esats__staload (void) ;
extern ats_void_type _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__staload (void) ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__staload () {
static int _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__staload_flag = 0 ;
if (_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__staload_flag) return ;
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__staload_flag = 1 ;

// ATS_2d0_2e2_2e12_2prelude_2SATS_2unsafe_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_basics_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_location_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_staexp2_util_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_dynexp2_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_histaexp_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_hidynexp_2esats__staload () ;
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_2esats__staload () ;

return ;
} /* staload function */

/* dynamic load function */

// dynload flag declaration
extern ats_int_type _2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__dynload_flag ;

ats_void_type
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__dynload () {
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__dynload_flag = 1 ;
_2tmp_2ATS_2dPostiats_2src_2pats_ccomp_emit2_2edats__staload () ;

#ifdef _ATS_PROOFCHECK
#endif /* _ATS_PROOFCHECK */

/* marking static variables for GC */

/* marking external values for GC */

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

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

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

/* end of [pats_ccomp_emit2_dats.c] */
